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


Groups > comp.soft-sys.math.mathematica > #11627 > unrolled thread

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

Started byDana DeLouis <dana01@me.com>
First post2012-09-06 08:12 +0000
Last post2012-09-06 08:12 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: How can I use FindMaximum to get a result better than Dana DeLouis <dana01@me.com> - 2012-09-06 08:12 +0000

#11627 — Re: How can I use FindMaximum to get a result better than

FromDana DeLouis <dana01@me.com>
Date2012-09-06 08:12 +0000
SubjectRe: How can I use FindMaximum to get a result better than
Message-ID<k29lsq$a41$1@smc.vnet.net>
> 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}}
> Any suggestions?


Hi.  Here are two suggestions:

equ = 8 E^(-x) Sin[x]-1 ;

// Full Precision:

Maximize[{equ,0<x<1},x,Reals]  //FullSimplify

{-1 + (4*Sqrt[2])/E^(Pi/4),  {x -> Pi/4}}

%//N
{1.57918,{x->0.785398}}

// The old derivative trick:

Solve[D[equ,x]==0,x]  //Quiet
{{x -> Pi/4}}

= = = = = = = = = =
HTH   :>)
=E2=80=A8Dana DeLouis
=E2=80=A8= = = = = = = = = =


On Tuesday, September 4, 2012 5:50:53 AM UTC-4, 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?


[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web