MathGroup Archive 1998

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

Search the Archive

Re: Possible bug in FindRoot[] in Mathematica 3.0



>Hi there,
>I think I've possibly found a bug in Mathematica 3.0. Consider the
>equation:
>
>	2^x + 3^x ^x
>
>Well, it's obvious that x  is a solution, and you can check with
>Plot[] that x  is indeed the only solution. When I try to Solve[]
>this with Mathematica, it says:
>
>Solve::"tdep":
>    "The equations appear to involve transcendental functions of the \
>variables in an essentially non-algebraic way."
>
>This is fair enough - I have no idea how to solve this type of equation
>without some numerical method either. The problem comes when I try to
>use FindRoot:
>
>In[83]:indRoot[2^x+3^xÕ^x,{x,0}] Out[83]:x -> -21.1781}
>
>-21? I'm sorry? Obviously, the iterative formula it has created
>(presumably by the Newton-Raphson process) for the equation diverges
>when the starting point is taken as x . However, if I do something
>like this, it handles it correctly:
>
>In[86]:indRoot[2^x+3^xÕ^x,{x,-1}] FindRoot::"cvnwt":
>    "Newton's method failed to converge to the prescribed accuracy after
>\
>15 iterations."
>Out[86]:x -> -21.0059}
>
>So, why does Mathematica correctly recognise that the iterative sequence
>does not converge in the second case, yet it doesn't recognise this in
>the first case and thus returns a totally bogus result without any
>error message?
>
>This looks like a bug to me. Or am I just missing something here?
>
>Thanks, cheers,
>Adrian Cable.


I do not have an answer, but according to other options, you will get an
other result...

In :
FindRoot[2^x+3^xÕ^x,{x,0},WorkingPrecision->50,MaxIterations->100]
Out : -136.59335126097857852819217096861360482299333025292192268924042

The fact is that your fonction 2^x+3^x-5^x is very close to 0 for x
under -20...
The result given by mathematica is depending on the precision you ask
for


----------------------------------------

Thierry Verdel,
LAEGO (LAboratoire Environnement, Géomécanique et Ouvrages) Ecole
des Mines
Parc Saurupt,
54042 Nancy Cedex, France
tel : (33) 03 83 58 42 89      fax : (33) 03 83  53 38 49 email :
verdel@mines.u-nancy.fr
http://www.mines.u-nancy.fr/~verdel/




  • Prev by Date: elliptic cylinder scattering
  • Next by Date: Efficient use of coefficient--Efficient simplification
  • Prev by thread: Re: Possible bug in FindRoot[] in Mathematica 3.0
  • Next by thread: Mathematica for Linux on Alpha?