|
[Date Index]
[Thread Index]
[Author Index]
Re: question about Solve
- To: mathgroup at smc.vnet.net
- Subject: [mg91708] Re: question about Solve
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Sat, 6 Sep 2008 02:06:35 -0400 (EDT)
On 9/5/08 at 7:14 AM, Florian.Jaccard at he-arc.ch (Jaccard Florian)
wrote:
>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.
I believe all of issues you are seeing here has to do with round
off as result of using machine precision numbers. I can do:
In[39]:= Solve[{x*y == (a + 2*b)/(c + 2*d),
1/Sqrt[2] == Sqrt[(e*y)/(z*f*g*h)], 2*Pi*i == 9/10/(z*f)},
{x, y,
z}]
getting:
Out[39]= {{x -> (3304*Pi)/27, z -> 3/(20000*f*Pi),
y -> 9/(1216000*Pi)}}
with no messages generated. Similarly if I do:
a = 65/10^6;
b = 1/10^3;
c = 19/10;
d = 19/100;
e = 1/(25/10^2);
v = 18;
w = 8;
g = (2*v)/((c + 2*d)*w);
i = 3000;
h = 2/10;
then Solve is able to find
In[37]:= Solve[{x*y == (a + 2*b)/(c + 2*d),
1/Sqrt[2] == Sqrt[(e*y)/(4*z*f*g*h)], 2*Pi*i == 9/10/(z*f)},
{x, y,
z}]
Out[37]= {{x -> (826*Pi)/27, z -> 3/(20000*f*Pi),
y -> 9/(304000*Pi)}}
with no difficulty.
As a general rule you will get better, more consistent results
with one of the functions in Mathematica that begin with N when
using machine precision numbers in the input. When using
functions like Solve that are designed to use algebraic methods,
entering the coefficients as exact numbers works better.
Prev by Date:
Re: Thinking Mathematica: Any suggestions?
Next by Date:
RE: Re: How print multiple copies of notebook?
Previous by thread:
Re: question about Solve
Next by thread:
Re: question about Solve
|