MathGroup Archive 1998

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

Search the Archive

Re: Square roots and Solve/Reduce



Richard Anderson wrote:
> 
> Hello all,
> 
> My question is a seemingly simple one. Is there any way to tell the
> functions Solve and Reduce that I am only interested in using a +ve or
> -ve form of a square root?
> For instance in the following situation, eigen1 and eigen 2 are the
> eigenvalues of a matrix.
> 
> eigen1=(2 - t - Sqrt[4 - 4*s + t^2])/4 eigen2=(2 - t +Sqrt[4 - 4*s +
> t^2])/4
> 
> Now consider that we are interested in the boundaries of -1 < eigen1 < 1
> and -1 < eigen2 <1. (Incidentally we are only interested in the
> boundaries between -1 < s <1, -1 < t < 1)
> I do:
> 
> In[3]:=
> Reduce[eigen1==1,{s,t}]
> Out[3]=
> s==-t
> In[4]:=
> Reduce[eigen1==-1,{s,t}]
> Out[4]=
> s==-8+3 t
> In[5]:=
> Reduce[eigen2==1,{s,t}]
> Out[5]=
> s==-t
> In[6]:=
> Reduce[eigen2==-1,{s,t}]
> Out[6]=
> s==-8+3 t
> 
> So according to Reduce, the two eigenvalues give the same boundary
> conditions. However, this is clearly not the case : as becomes apparent
> when plotting them e.g. with
> 
> ContourPlot[eigen1,{s,-1,1},{t,-1,1},Contours->{-1,1}]
> 
> and
> 
> ContourPlot[eigen2,{s,-1,1},{t,-1,1},Contours->{-1,1}]
> 
> What seems to be happening is that Reduce is allowing the square root to
> once again be +ve or -ve, thus making the equations for the eigenvalues
> synonymous! How can
> I prevent this? Why does ContourPlot 'know' differently? Any help would
> be much appreciated
> 
> Richard
> ********************************************************************************
> 
> Richard Anderson
> e-mail : richardj.anderson@stonebow.otago.ac.nz


The short answer to your first question is no.

Roughly speaking, Solve and Reduce fall short because the equation is
non-polynomial and involves a parameter (we can only solve for one
variable in terms of the other). So we get a solution but its
correctness depends on branch cuts, that is, the solution will only be
valid for certain ranges of the parameter.

To give some idea of why this is difficult to avoid, I should mention
that Solve must work, at the lowest level, on polynomials. Hence it
will take the radical, encapsulate it as a new variable (call it
newvar), and throw in a new equation of the form newvar^2 == 4 - 4*s +
t^2. It will obtain solutions and, when those solutions ares numeric it
will be able to test each explicitly to see if it is a parasite. In
this example the solution is not numeric. Indeed, it is neither
generically correct nor incorrect because this correctness property
depends on a parameter value. Moreover I do not at this time even know
how to check for ranges of that parameter value for which the solution
is correct. Solve simply returns it.

One way to understand the results you got is that eigen1 achieves the
value of 1 when t is equal to -s, and eigen2 does likewise, but for a
DIFFERENT range of s.


For your purposes it may be that you can use intervals instead of Solve.

In[68]:=  eigen1 /. {s->Interval[{-1,1}], t->Interval[{-1,1}]}
                     1   3
Out[68]= Interval[{-(-), -}]
                     2   4


Daniel Lichtblau
Wolfram Research



  • Prev by Date: Simplifying algebraic expr: howto?
  • Next by Date: Re: Re: FindRoot accuracy/precision
  • Prev by thread: Square roots and Solve/Reduce
  • Next by thread: Introducing: Conix 3D Explorer!