Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11624

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

From Bill Rowe <readnews@sbcglobal.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How can I use FindMaximum to get a result better than MachinePrecision?
Date 2012-09-05 07:10 +0000
Message-ID <k26ts8$5oq$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


On 9/4/12 at 5:45 AM, drkirkby@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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: How can I use FindMaximum to get a result better than MachinePrecision? Bill Rowe <readnews@sbcglobal.net> - 2012-09-05 07:10 +0000

csiph-web