Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1994

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

Search the Archive


  • To: mathgroup at
  • Subject: Solve--Solutions
  • From: rvs at (Reinhard V.Simonovits)
  • Date: Mon, 28 Feb 1994 11:39:06 +0100

Dear MathGroupers!
I found following not satisafying behavior  of Mma:

        (1) Find the zeroes of a third order polynomial:

In[1]:=  Solve[ 11x^3 - 20 x^2 - 10x + 22 == 0, x]  //N
                                   -16                                -16
Out[1]= {{x -> 1.61319 - 1.11022 10    I}, {x -> -1.01567 - 2.32933 10    I}, 
>    {x -> 1.22065 + 3.43956 10    I}}  
This solution is wrong. 

It does not exist a complex solution. 
Plot the function between 1.21 and 1.62!
I found this type of solution several times and now in 
the book of Werner Burkhardt where this example is from.

Ok, you can get rid of the imaginary numbers by  using Chop. But
anyway, you are interested in an analytic expression. (Without //N).
Can you trust it? Appearently no!  

Everybody can construct polynomials with small imaginary parts 
and therefore you are not sure if there are really complex solutions.
What to do?
Forget about the analytic solution and use "brutal force": 

In[2]:=  NSolve[ 11x^3 - 20 x^2 - 10x + 22 == 0, x] 

Out[2]= {{x -> -1.0156658802924896}, {x -> 1.220654426396538}, 
   >    {x -> 1.61319327207777}}

But the worse thing is 
In[5]:=   Solve[ 11x^3 - 20 x^2 - 10x + 22 == 0, x,VerifySolutions->True]  //N 
                                   -16                                -16
Out[5]= {{x -> 1.61319 - 1.11022 10    I}, {x -> -1.01567 - 2.32933 10    I}, 
   >    {x -> 1.22065 + 3.43956 10    I}} 
that the Option VerifySolutions does  not realize the wrong solution.

Anyway, the WRI experts will say, this comes why..... and they are
right. But I think the user is at first interested in believable results.
I am sure there is a solution to this problem. 

Probably a first way out is a warning message or a
finetuned VerifySolutions Options that works.    

(2) Integration with Sqrt.

 In[9]:=   Integrate[ 1/Sqrt[(4-x)^2],x]

Out[9]= Integrate[--------------, x]
                  Sqrt[(4 - x) ]

I suggest the WRI should do at least one branch cutting 
using PowerExpand automatically and 
accompanying the result with a message that others branches 
are available by an Option Branches -> All.

In[12]:=   Integrate[PowerExpand[ 1/Sqrt[(x-4)^2]],x] 

Out[12]= Log[-4 + x]
          Integrate::branch:  Integrand ambivalent!
                              1/(x-4) was integrated.
          Branches -> All provides other branches.    

Every comment is welcome.

Kind regards,
Reinhard Simonovits
University Graz, Theor. Physics

  • Prev by Date: Re: Nonlinear Discrete
  • Next by Date: errors using the PDF function in a module
  • Previous by thread: solver for a system of differential equations