Re: Solve chokes on Piecewise input that Reduce handles quite well??

*To*: mathgroup at smc.vnet.net*Subject*: [mg72045] Re: [mg72007] Solve chokes on Piecewise input that Reduce handles quite well??*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Sat, 9 Dec 2006 06:09:54 -0500 (EST)*References*: <200612081117.GAA20182@smc.vnet.net>

I can see no reason at all why Solve should handle Piecewise with inequalities. Solve is meant for solving algebraic equations over the complex numbers and what you have got are inequalities, which do not make sense in this setting. The following does make sense Solve[Piecewise[{{2, x == 3}, {3, x == 2}}] == 3, x] {{x -> 2}} But but my aesthetic judgment would be seriously offended if this worked: Solve[Piecewise[{{2, x >= 2}, {3, x == 2}}] == 3, x] Fortunately, it does not. Andrzej Kozlowski On 8 Dec 2006, at 20:17, Chris Chiasson wrote: > Solve[{0 == Piecewise[{{1/(-1 + X[1] + X[2])^2, X[1] + X[2] <= -1}}, > (1/2)*(3/2 + (1/2)*(-1 + X[1] + X[2]))] + > Piecewise[{{(1/2)*(-(3/2) + X[1]/2), X[1] < 2}, {-(1/4), X[1] == > 2}}, -(1/X[1]^2)] + 2*(-1 + X[1]), > 0 == Piecewise[{{1/(-1 + X[1] + X[2])^2, X[1] + X[2] <= -1}}, > (1/2)*(3/2 + (1/2)*(-1 + X[1] + X[2]))] + > 2*(-1 + X[2])}, {X[1], X[2]}] > > Solve::eqf: X[1]+X[2]\[LessEqual]-1 is not a well-formed equation. > > ... > > (and it returns the input) > > Here is the same command using Reduce: > > Reduce[{0 == Piecewise[{{1/(-1 + X[1] + X[2])^2, X[1] + X[2] <= -1}}, > (1/2)*(3/2 + (1/2)*(-1 + X[1] + X[2]))] +Piecewise[{{(1/2)*(-(3/2) + > X[1]/2), X[1] < 2}, {-(1/4), X[1] == 2}}, -(1/X[1]^2)] + 2*(-1 + > X[1]), > 0 == Piecewise[{{1/(-1 + X[1] + X[2])^2, X[1] + X[2] <= -1}}, > (1/2)*(3/2 + (1/2)*(-1 + X[1] + X[2]))] + > 2*(-1 + X[2])}, {X[1], X[2]}] > > X[1] == 75/89 && X[2] == 51/89 > > Did I do anything wrong? Is this a bug? If it is a bug, please file it > and fix it. > > -- > http://chris.chiasson.name/ >

**References**:**Solve chokes on Piecewise input that Reduce handles quite well??***From:*"Chris Chiasson" <chris@chiasson.name>