RE: Problem with Mathematica driving me nuts

*To*: mathgroup at smc.vnet.net*Subject*: [mg46811] RE: [mg46791] Problem with Mathematica driving me nuts*From*: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>*Date*: Tue, 9 Mar 2004 04:30:55 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

>-----Original Message----- >From: bpw67deletethis at hotmail.com [mailto:bpw67deletethis at hotmail.com] To: mathgroup at smc.vnet.net >Sent: Monday, March 08, 2004 10:10 AM >To: mathgroup at smc.vnet.net >Subject: [mg46811] [mg46791] Problem with Mathematica driving me nuts > > >FindRoot[x^2 == 4x - 4, {x, 1}] > >Out[4]= >{x -> 1.99902} > >In[15]:= >FindRoot[x^2 - 4*x + 4, {x, 3}] > >Out[15]= >{x -> 2.00098} > >When the root is clearly two. >Is Mathematica using Newton's Method like a Ti-92? >Even if so, why wont it give a more accurate answer? >I've tried N[%,30] but it doesn't do anything. >I'm new to Mathematica coming over from a Ti-92, so everything is >frustrating right now. >Thanks. > Reading Help saves the nuts: "The default setting for AccuracyGoal is 10 digits less than WorkingPrecision." In[2]:= $MachinePrecision - 10 Out[2]= 6 Such: In[3]:= FindRoot[x^2 == 4x - 4, {x, 1}, AccuracyGoal -> 16] >From In[3]:= FindRoot::"cvnwt": "Newton's method failed to converge to the prescribed accuracy after 15 iterations." Out[3]= {x -> 1.99997} In[4]:= FindRoot[x^2 == 4x - 4, {x, 1}, AccuracyGoal -> 16, MaxIterations -> 30] Out[4]= {x -> 2.} In[5]:= FindRoot[x^2 - 4*x + 4, {x, 3}, AccuracyGoal -> 16, MaxIterations -> 30] Out[5]= {x -> 2.} -- Hartmut Wolf