<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Multiple extrema</title>
    <link>http://www.mapleprimes.com/questions/98527-Multiple-Extrema</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Thu, 11 Jun 2026 06:42:22 GMT</lastBuildDate>
    <pubDate>Thu, 11 Jun 2026 06:42:22 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Multiple extrema</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Multiple extrema</title>
      <link>http://www.mapleprimes.com/questions/98527-Multiple-Extrema</link>
    </image>
    <item>
      <title>Multiple extrema</title>
      <link>http://www.mapleprimes.com/questions/98527-Multiple-Extrema?ref=Feed:MaplePrimes:Multiple extrema:Comments#answer98531</link>
      <itunes:summary>&lt;p&gt;Is your curve defined by an expression or function?&amp;nbsp; You should be able to take an interval around each maximum, small enough to contain only one critical point, and use fsolve to find the critical point in that interval.&amp;nbsp; Something like:&lt;/p&gt;
&lt;p&gt;seq(fsolve(diff(F, x) = 0, x = J), J = [ 687 .. 690, 705 .. 710, 736 .. 740, 758 .. 760 ]);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Is your curve defined by an expression or function?&amp;nbsp; You should be able to take an interval around each maximum, small enough to contain only one critical point, and use fsolve to find the critical point in that interval.&amp;nbsp; Something like:&lt;/p&gt;
&lt;p&gt;seq(fsolve(diff(F, x) = 0, x = J), J = [ 687 .. 690, 705 .. 710, 736 .. 740, 758 .. 760 ]);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>98531</guid>
      <pubDate>Wed, 03 Nov 2010 18:57:47 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
    <item>
      <title>with(DirectSearch)</title>
      <link>http://www.mapleprimes.com/questions/98527-Multiple-Extrema?ref=Feed:MaplePrimes:Multiple extrema:Comments#answer98535</link>
      <itunes:summary>&lt;p&gt;Try to &amp;nbsp;find all the maximums by the DirectSearch package (see &lt;a href="http://www.maplesoft.com/applications/view.aspx?SID=87637"&gt;http://www.maplesoft.com/applications/view.aspx?SID=87637&lt;/a&gt;&amp;nbsp;)&amp;nbsp;. As far as I understand it, this package should work with splines too. Unfortunately, I have not got any such an example, so the following example, where the function has&amp;nbsp;four maximums on 0..25, is attached:&lt;br&gt;&amp;nbsp;f := x-&amp;gt; (1/100)*x^2+sin(x) :&lt;/p&gt;
&lt;p&gt;&amp;nbsp;plot(f, 0 .. 25);&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=98535/313388/maximums.gif"&gt;&lt;img src="/view.aspx?sf=98535/313388/maximums.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;with(DirectSearch):&lt;/p&gt;
&lt;p&gt;&amp;nbsp;GlobalSearch(f, {x &amp;gt;= 0, x &amp;lt;= 25}, maximize = true):&lt;/p&gt;
&lt;p&gt;&amp;nbsp;op(3, %);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;(1, 1) = 6.1176482495205, (1, 2) = (Vector(1, {(1) = 24.9999999997440128})),&lt;br&gt;&amp;nbsp;(1, 3) = 20, (2, 1) = 5.2563376489113,&lt;br&gt;&amp;nbsp;(2, 2) = (Vector(1, {(1) = 20.8505054944515998})), (2, 3) = 18, (3, 1) = 3.03967891389065,&lt;br&gt;&amp;nbsp;(3, 2) = (Vector(1, {(1) = 14.4299297855150002})), (3, 3) = 19, (4, 1) = 1.62946677752837, &lt;br&gt;&amp;nbsp;(4, 2) = (Vector(1, {(1) = 8.01497572679684112})),&lt;br&gt;&amp;nbsp;(4, 3) = 32, (5, 1) = 1.02517760626473,&lt;br&gt;&amp;nbsp;(5, 2) = (Vector(1, {(1) = 1.60285900150238891})), (5, 3) = 24&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=98535/313388/maximums.mw"&gt;maximums.mw&lt;/a&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Try to &amp;nbsp;find all the maximums by the DirectSearch package (see &lt;a href="http://www.maplesoft.com/applications/view.aspx?SID=87637"&gt;http://www.maplesoft.com/applications/view.aspx?SID=87637&lt;/a&gt;&amp;nbsp;)&amp;nbsp;. As far as I understand it, this package should work with splines too. Unfortunately, I have not got any such an example, so the following example, where the function has&amp;nbsp;four maximums on 0..25, is attached:&lt;br&gt;&amp;nbsp;f := x-&amp;gt; (1/100)*x^2+sin(x) :&lt;/p&gt;
&lt;p&gt;&amp;nbsp;plot(f, 0 .. 25);&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=98535/313388/maximums.gif"&gt;&lt;img src="/view.aspx?sf=98535/313388/maximums.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;with(DirectSearch):&lt;/p&gt;
&lt;p&gt;&amp;nbsp;GlobalSearch(f, {x &amp;gt;= 0, x &amp;lt;= 25}, maximize = true):&lt;/p&gt;
&lt;p&gt;&amp;nbsp;op(3, %);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;(1, 1) = 6.1176482495205, (1, 2) = (Vector(1, {(1) = 24.9999999997440128})),&lt;br&gt;&amp;nbsp;(1, 3) = 20, (2, 1) = 5.2563376489113,&lt;br&gt;&amp;nbsp;(2, 2) = (Vector(1, {(1) = 20.8505054944515998})), (2, 3) = 18, (3, 1) = 3.03967891389065,&lt;br&gt;&amp;nbsp;(3, 2) = (Vector(1, {(1) = 14.4299297855150002})), (3, 3) = 19, (4, 1) = 1.62946677752837, &lt;br&gt;&amp;nbsp;(4, 2) = (Vector(1, {(1) = 8.01497572679684112})),&lt;br&gt;&amp;nbsp;(4, 3) = 32, (5, 1) = 1.02517760626473,&lt;br&gt;&amp;nbsp;(5, 2) = (Vector(1, {(1) = 1.60285900150238891})), (5, 3) = 24&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=98535/313388/maximums.mw"&gt;maximums.mw&lt;/a&gt;&lt;/p&gt;</description>
      <guid>98535</guid>
      <pubDate>Wed, 03 Nov 2010 20:30:38 Z</pubDate>
      <itunes:author>hirnyk</itunes:author>
      <author>hirnyk</author>
    </item>
    <item>
      <title>Spline</title>
      <link>http://www.mapleprimes.com/questions/98527-Multiple-Extrema?ref=Feed:MaplePrimes:Multiple extrema:Comments#comment98533</link>
      <itunes:summary>&lt;p&gt;Hey robert,&lt;br&gt;the curve is defined by a spline function. i would like to keep the solution as general as possible, since the position of the maxima might shift in later applications.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Hey robert,&lt;br&gt;the curve is defined by a spline function. i would like to keep the solution as general as possible, since the position of the maxima might shift in later applications.&lt;/p&gt;</description>
      <guid>98533</guid>
      <pubDate>Wed, 03 Nov 2010 19:01:33 Z</pubDate>
      <itunes:author>gotamo</itunes:author>
      <author>gotamo</author>
    </item>
    <item>
      <title>GlobalSearch</title>
      <link>http://www.mapleprimes.com/questions/98527-Multiple-Extrema?ref=Feed:MaplePrimes:Multiple extrema:Comments#comment98562</link>
      <itunes:summary>&lt;p&gt;indeed, the GlobalSearch package works also with spline functions. thanks! i am a bit puzzled with the output: for instance in the example that you created: what does the last command do (op(3,%))? and probably related to that: what is the meaning of the third vector component ((1,1)denotes y, (1,2)=x coordinate but (1,3)=20?)?&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;indeed, the GlobalSearch package works also with spline functions. thanks! i am a bit puzzled with the output: for instance in the example that you created: what does the last command do (op(3,%))? and probably related to that: what is the meaning of the third vector component ((1,1)denotes y, (1,2)=x coordinate but (1,3)=20?)?&lt;/p&gt;</description>
      <guid>98562</guid>
      <pubDate>Thu, 04 Nov 2010 13:21:44 Z</pubDate>
      <itunes:author>gotamo</itunes:author>
      <author>gotamo</author>
    </item>
    <item>
      <title>Number of steps</title>
      <link>http://www.mapleprimes.com/questions/98527-Multiple-Extrema?ref=Feed:MaplePrimes:Multiple extrema:Comments#comment98570</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/98527-Multiple-Extrema#comment98562"&gt;@gotamo&lt;/a&gt; The element (1,3)=20 shows the number of&amp;nbsp; steps, made by the GlobalSearch command to obtain this solution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Appendix.&lt;/strong&gt; I could not copy and paste the output of the GlobalSearch command, therefore I extracted its part by op(3,%) and copied and pasted that. See &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=op"&gt;?op&lt;/a&gt; for details.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/98527-Multiple-Extrema#comment98562"&gt;@gotamo&lt;/a&gt; The element (1,3)=20 shows the number of&amp;nbsp; steps, made by the GlobalSearch command to obtain this solution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Appendix.&lt;/strong&gt; I could not copy and paste the output of the GlobalSearch command, therefore I extracted its part by op(3,%) and copied and pasted that. See &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=op"&gt;?op&lt;/a&gt; for details.&lt;/p&gt;</description>
      <guid>98570</guid>
      <pubDate>Thu, 04 Nov 2010 14:03:15 Z</pubDate>
      <itunes:author>hirnyk</itunes:author>
      <author>hirnyk</author>
    </item>
    <item>
      <title>Example with splines</title>
      <link>http://www.mapleprimes.com/questions/98527-Multiple-Extrema?ref=Feed:MaplePrimes:Multiple extrema:Comments#comment98678</link>
      <itunes:summary>&lt;p&gt;&amp;nbsp;is obtained by the spline approximation of the function f :&lt;a href="/view.aspx?sf=98678/313616/splines.mw"&gt;splines.mw&lt;/a&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&amp;nbsp;is obtained by the spline approximation of the function f :&lt;a href="/view.aspx?sf=98678/313616/splines.mw"&gt;splines.mw&lt;/a&gt;&lt;/p&gt;</description>
      <guid>98678</guid>
      <pubDate>Sat, 06 Nov 2010 11:55:04 Z</pubDate>
      <itunes:author>hirnyk</itunes:author>
      <author>hirnyk</author>
    </item>
  </channel>
</rss>