Re: question about Solve

*To*: mathgroup at smc.vnet.net*Subject*: [mg91724] Re: [mg91690] question about Solve*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Sat, 6 Sep 2008 02:09:29 -0400 (EDT)*References*: <200809051114.HAA12167@smc.vnet.net>

Its basically the same old problem as has been discussed here many times before. The methods used by Solve are not really suitable for dealing with equations with MachinePrecision approximate numbers. Rationalize all your approximate numbers and you will get solutions that you expect. Note that when you use Reduce on your last system you obtain the message: Reduce::"ratnz" : "Reduce was unable to solve the system with inexact \ coefficients. The answer was obtained by solving a corresponding exact system \ and numericizing the result" which gives you the same advice as above. Clearly Solve uses a different approach from Reduce. I am sure that Solve also at some point replaces a non-exact system by an exact one (for example it would have to do so when it uses GrobnerBasis) but it does it at a different stage than Reduce, and in this particular case this approach fails to produce an answer (which suggests that your system is numerically unstable). Andrzej Kozowski On 5 Sep 2008, at 12:14, Jaccard Florian wrote: > Dear All, > > I don't understand the following behaviour of Solve. > > Consider the following system : > > Solve[{x*y==(a+2*b)/(c+2*d),1/Sqrt[2]==Sqrt[(e*y)/(z*f*g*h)], > 2*Pi*i==0.9/(z*f)},{x,y,z}] > > Everything fine, I obtain : > > {{z -> 0.1432394487827058/(f*i), > x -> (1.419827298426263*^-9*(9.83403688*^9*a + > 1.966807376*^10*b)*e*i)/((c + 2.*d)*g*h), > y -> (0.0716197243913529*g*h)/(e*i)}} > > But if I ask for the answer of almost the same (only a 4 in the > denominator > of the second equation), Solve isn't abble anymore to manage without > using > inverse functions... why? > > Solve[{x*y == (a + 2*b)/(c + 2*d), > 1/Sqrt[2] == Sqrt[(e*y)/(4*z*f*g*h)], > 2*Pi*i == 0.9/(z*f)}, {x, y, z}] > > Worse: > > If I have numerical values for a, b, c, d, e, f, g, h, i: > a = 65/10^6; > b = 1/10^3; > c = 1.9; > d = 0.19; > e = 1/(2.5/10^3); > v = 18; > w = 8; > g = (2*v)/((c + 2*d)*w); > i = 3000; > h = 0.2; > > Then Solve isn't able anymore! Mathematica thinks there is no > solution. But > there is one. I have to use Reduce or give the numerical values as > rules > after the Solve to find them. > > In[247]:= Solve[{x*y == (a + 2*b)/(c + 2*d), > 1/Sqrt[2] == Sqrt[(e*y)/(z*f*g*h)], > 2*Pi*i == 0.9/(z*f)}, {x, y, z}] > > Out[247]= {} > > Can somebody explain this? > > Thanks in advance, > > Regards > > > F.Jaccard >

**References**:**question about Solve***From:*"Jaccard Florian" <Florian.Jaccard@he-arc.ch>