Re: Solve chokes on Piecewise input that Reduce handles quite well??
- To: mathgroup at smc.vnet.net
- Subject: [mg72041] Re: Solve chokes on Piecewise input that Reduce handles quite well??
- From: "Lalu" <BhuvaneshBhatt at gmail.com>
- Date: Sat, 9 Dec 2006 06:09:49 -0500 (EST)
- References: <elbhsr$jto$1@smc.vnet.net>
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. This is pretty much expected. Solve does not handle inequalities. If you give Solve input with a Piecewise containing only equalities as conditions, that should work. Bhuvanesh, Wolfram Research.