       Re: How to find solutions for conditioned equations?

• To: mathgroup at smc.vnet.net
• Subject: [mg19890] Re: [mg19861] How to find solutions for conditioned equations?
• From: BobHanlon at aol.com
• Date: Sun, 19 Sep 1999 18:47:37 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```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}];

Needs["Algebra`InequalitySolve`"];

soln[a_ /; 0 <= a <= 1] := Module[{x}, x /.
{ToRules[InequalitySolve[(x + 1)/2 == a || (3 - x)/2 == a, x]]}];

Table[soln[a], {a, 0, 1, .2}]

{{-1, 3}, {-0.6, 2.6}, {-0.2, 2.2}, {0.2, 1.8}, {0.6, 1.4}, {1.}}

Bob Hanlon

In a message dated 9/19/1999 5:43:39 AM, d8442803 at student.nsysu.edu.tw writes:

>Suppose I have an equation
>
>A(x)= (x+1)/2, for -1<x<=1
>    = (3-x)/2, for 1<x<=3
>    = 0      , otherwise
>
>Now if I want to find solutions for A(x)==a, how can I otain the
>solutions simultaneously (i.e., represented as (2a-1, 3-2a))? I always
>
>use the stupid method to solve them separately, but I found it's laborous
>
>when I have B(x), C(x) needed to be solved together. (I am trying to use
>
>alpha-cut to proceed the interval operations) Any suggestions?
>

```

• Prev by Date: Re: Where's the Speed?
• Next by Date: Re: Limits of multi-var. functions
• Previous by thread: Re: How to find solutions for conditioned equations?
• Next by thread: Re: How to find solutions for conditioned equations?