Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: Beware of NSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50174] Re: Beware of NSolve
  • From: "Kevin J. McCann" <kjm at KevinMcCann.com>
  • Date: Thu, 19 Aug 2004 06:28:01 -0400 (EDT)
  • References: <cfuq2n$64h$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

It is not clear to me why the extraneous roots are found. However, if 
you set WorkingPrecision->40 in NSolve, you only get the two correct roots.

Kevin

Carlos Felippa wrote:
> Run v. 4.2 on Mac:
> 
> f=5/432 - 11/(27*Sqrt[70]*Sqrt[19 - 1890*x]) + x/(2*Sqrt[38/35 - 108*x]);
> 
>  Solve[f==0,x]  returns 2 real roots:
> 
> {{x -> (-171 - 25*Sqrt[105])/30240}, {x -> (-171 + 25*Sqrt[105])/30240}}
> 
> NSolve[f==0,x]  returns 4 real roots:
> 
> {{x -> -0.10481082961146104}, {x -> -0.014126116704662378}, 
>  {x -> 0.002816592895138556}, {x -> 0.0003796126802330315}}
> 
> Roots 1 and 4 are incorrect.  (Just plot f)
> 
> Had a similar problem with a quartic 3 months ago.  This is a
> simpler example.
> 


  • Prev by Date: Re: Simplify stuck in simple expression
  • Next by Date: Re: Adaptive FunctionInterpolation[] ?
  • Previous by thread: Re: Beware of NSolve
  • Next by thread: Re: Beware of NSolve