Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: [Q] Solve?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23420] Re: [Q] Solve?
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Sun, 7 May 2000 21:18:05 -0400 (EDT)
  • References: <8f29a1$uf@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

James:
Your equation is equivalent to

eq1 = Sqrt[4. + 2.25*z^2] == -2 + 0.525*z;

The difficulty lies in how we interpret Sqrt[4. + 2.25*z^2].

If x != 0 the there are exactly two solution to w^2 = x . Each of them is
the negative of the other. Mathematica interprets Sqrt[x] to be the one with
argument in the range (-Pi/2, Pi/2], this is called the principal square
root of x.
The other one is therefore - Sqrt[x]. To make Mathematica allow this we use
the equation

eq2 = -Sqrt[4. + 2.25*z^2] == -2 + 0.525*z;

Now, If there is a solution to either eq1 or eq2,  then, on squaring both
sides of the equation, we see that it will satisfy

eq3 = 4. + 2.25*z^2 == (-2 + 0.525*z)^2;

Mathematica solves this

sln = Solve[eq3, z]

{{z -> -1.06363}, {z -> 0.}}

And, although

eqn1 /. sln

{False, False}

we do  have

eq2 /. sln

{True, True}

One way out of  this kind of difficulty is to rewrite the equation as a pair
of equations

eqX = {w == -2 + 0.525*z, w^2 == 4. + 2.25*z^2};

Then we get

slnX = Solve[eqX, {z, w}]

{{z -> -1.06363, w -> -2.5584},

                        -16
  {z -> 6.76707 10   , w -> -2.}}

Tidy up:

slnX = Chop[slnX]

{{z -> -1.06363, w -> -2.5584}, {z -> 0, w -> -2.}}

Now we have

eqX /. slnX

{{True, True}, {True, True}}
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"James" <research at proton.csl.uiuc.edu> wrote in message
news:8f29a1$uf at smc.vnet.net...
>
>
> Hi!
>
> I come across a problem that I don't understand.
> I generate systems of equations
> and try to solve them using mathematica.
> For example,
>
> ---------------------------------------------------------------
> In[1]= Solve[((4/2)*( 1.50*z+ 2.00)+(4-4/2)*
>                      Sqrt[( 1.50*z+ 0.00)^2+ 4.00]) +
>                 ((4/2)*( 1.50*z+ 2.00)+(4-4/2)*
>                      Sqrt[( 1.50*z+ 0.00)^2+ 4.00])- 8.10*z==0, z]
>
> Out[1]= {}
> ---------------------------------------------------------------
>
> But mathematica can't solve it, simply returing empty.
> This equation can be solved, though, as you see.
> I restarted mathematica to run again, but it doesn't help.
>
>
> The weird thing is some equations are solved, like the below.
> ---------------------------------------------------------------
> In[2]= Solve[((4/2)*( 1.50*z+ 2.00)+(2-4/2)*
>                      Sqrt[( 1.50*z+ 0.00)^2+ 4.00]) +
>                 ((4/2)*( 1.50*z+ 2.00)+(3-4/2)*
>                      Sqrt[( 1.50*z+ 0.00)^2+ 4.00])- 8.10*z==0, z]
>
> Out[2]= {{z->13.4976}}
> ---------------------------------------------------------------
>
> What's wrong with it and how can I solve it?
> I need to use mathematica, because the number of the systems
> of equations are large.
> (Please disregard any redundunt terms in the equations..
> they are generated by a program.)
> With that, when does mathematica return '{}' as an answer?
> Thank you.
>
>
> --- James, newbie in mathematica.
>
>




  • Prev by Date: Re: [Q] Solve?
  • Next by Date: contours
  • Previous by thread: Re: [Q] Solve?
  • Next by thread: Exporting eps-Graphics