MathGroup Archive 2012

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

Search the Archive

Re: How can I use FindMaximum to get a result better than MachinePrecision?


On Tuesday, September 4, 2012 4:50:53 AM UTC-5, David Kirkby wrote:
> I've tried this:
> 
> In[2]:= FindMaximum[8 E^(-x) Sin[x] -1,{x,0,8}]
> 
> Out[2]= {1.57918, {x -> 0.785398}}
> 
> Then played around to try to get a more accurate result. 
> 
> In[9]:= FindMaximum[8 E^(-x) Sin[x] -1,{x,0,8},AccuracyGoal->20, PrecisionGoal->20]
> 
> Out[9]= {1.57918, {x -> 0.785398}}
> 
> In[10]:= Precision[%]
> 
> Also: 
> 
> In[7]:= N[FindMaximum[8 E^(-x) Sin[x] -1,{x,0,8},AccuracyGoal->200, PrecisionGoal->200],100]
> 
> Out[7]= {1.57918, {x -> 0.785398}}
> 
> In[8]:= Precision[%]
> 
> Out[8]= MachinePrecision
> 
> Any suggestions?

Raise WorkingPrecision.

FindMaximum[8 E^(-x) Sin[x] -1,{x,0,8},AccuracyGoal->20, PrecisionGoal->20, WorkingPrecision->30]

Out[2]= {1.57917553555867559401893547648, 
 
>    {x -> 0.785398163397448309705386001198}}

See Help > Documentation Center > PrecisionGoal > More Information > 5th bullet item.

related: Help > Documentation Center > FindMaximum > Options > AccuracyGoal & PrecisionGoal 2nd and 3rd examples.


Daniel Lichtblau
Wolfram Research




  • Prev by Date: FrontEnd: Rotation of "heavy" graphics objects
  • Next by Date: Re: A new FrontEnd
  • Previous by thread: Re: How can I use FindMaximum to get a result better than MachinePrecision?
  • Next by thread: Re: How can I use FindMaximum to get a result better than MachinePrecision?