Re: Re: How to find solutions for conditioned equations?

*To*: mathgroup at smc.vnet.net*Subject*: [mg19958] Re: [mg19919] Re: How to find solutions for conditioned equations?*From*: BobHanlon at aol.com*Date*: Wed, 22 Sep 1999 04:11:29 -0400*Sender*: owner-wri-mathgroup at wolfram.com

A numerical approach comes to mind: Clear[A]; A[x_ /; -1 < x <= 1] := (x + 1)/2; A[x_ /; 1 < x <= 3] := (3 - x)/2; A[x_] := 0; Plot[A[x], {x, -1.2, 3.2}]; Rewrite the definition of A using UnitStep Clear[A] A[x_] := UnitStep[x + 1]*(x + 1)/2 + UnitStep[x - 1]*(-x + 1) + UnitStep[x - 3]*(x - 3)/2 Plot[A[x], {x, -1.2, 3.2}]; Look for a root in each region x /. FindRoot[A[x] == .4, {x, #}] & /@ {.5, 1.5} {-0.2, 2.2} x /. Table[FindRoot[A[x] == a, {x, #}] & /@ {.5, 1.5}, {a, 0, 1, .2}] {{-1., 3.}, {-0.6, 2.6}, {-0.2, 2.2}, {0.2, 1.8}, {0.6, 1.4}, {1., 1.}} Bob Hanlon In a message dated 9/21/1999 8:50:13 AM, d8442803 at student.nsysu.edu.tw writes: >Now my question is whether I can use A[x]==a directly in the solving >equation? Say, for example, > >soln[a_]=InequalitySolve[A[x]== a, x]]}]; // substituted by A[x]==a >