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

• To: mathgroup at smc.vnet.net
• Subject: [mg127963] Re: How can I use FindMaximum to get a result better than MachinePrecision?
• From: Bill Rowe <readnews at sbcglobal.net>
• Date: Wed, 5 Sep 2012 03:10:50 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-newout@smc.vnet.net
• Delivered-to: mathgroup-newsend@smc.vnet.net

```On 9/4/12 at 5:45 AM, drkirkby at gmail.com (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]

>Any suggestions?

Try:

FindMaximum[8 E^(-x) Sin[x] -1,{x,0,8},WorkingPrecision->25]

or whatever you desire. Also note:

In[14]:= D[8 E^(-x) Sin[x] - 1, x]

Out[14]= (8*Cos[x])/E^x - (8*Sin[x])/E^x

Which clearly indicates a minima or maxima occurs when Sin[x] ==
Cos[x]. Given the result is multiplied by Exp[-x], it is clear
you want x to be as small of a positive number as possible to
get a maximum. So, the maximum must occur at Pi/4 exactly

```

• Prev by Date: Re: A new FrontEnd
• Next by Date: Re: How can I use FindMaximum to get a result better than
• Previous by thread: Re: How can I use FindMaximum to get a result better than MachinePrecision?
• Next by thread: Missing simplification for ArcSin