Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Maximizing solutions of NDSolve' topicStudent Support Forum > General > "Maximizing solutions of NDSolve"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Forum Moderator
email me
07/14/12 1:27pm

Maximize is designed for smooth, polynomial expressions. I tried NMaximize with the same arguments and it found the same local maximum.

Often a different Method works better.

In[44]:= NMaximize[{int[\[Kappa]02], 0 < \[Kappa]02 < 1.5}, \[Kappa]02,
Method -> "SimulatedAnnealing"]

Out[44]= {0.126127, {\[Kappa]02 -> 0.203592}}

In[43]:= NMaximize[{int[\[Kappa]02], 0 < \[Kappa]02 < 1.5}, \[Kappa]02,
Method -> "RandomSearch"]

Out[43]= {0.126127, {\[Kappa]02 -> 0.203592}}

A simple way to find a maximum in a list (or good starting point for NMaximize or FindMaximum) is to find the location of largest value in the list.

In[37]:= maxY = Max[ ptdata[[All, 2]] ]
Out[37]= 0.126127

In[40]:= Position[ptdata, maxY]
Out[40]= {{205, 2}}

In[41]:= Extract[ptdata, 205]
Out[41]= {0.204, 0.126127}



Attachment: 25032aMaximum.nb, URL: ,

Subject (listing for 'Maximizing solutions of NDSolve')
Author Date Posted
Maximizing solutions of NDSolve Stan 06/27/12 10:31am
Re: Maximizing solutions of NDSolve Stan 06/29/12 08:05am
Re: Re: Maximizing solutions of NDSolve Michael 06/29/12 12:31pm
Re: Re: Re: Maximizing solutions of NDSolve Stan 06/30/12 12:02pm
Re: Re: Re: Re: Maximizing solutions of NDSolve Michael 07/02/12 01:01am
Re: Maximizing solutions of NDSolve Stan 07/09/12 07:24am
Re: Re: Maximizing solutions of NDSolve Michael 07/10/12 2:30pm
Re: Maximizing solutions of NDSolve Forum Modera... 07/14/12 1:27pm
< Previous CommentHelp | Reply To Comment | Reply To Topic