MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: max and min

  • To: mathgroup at
  • Subject: [mg87480] Re: max and min
  • From: Bill Rowe <readnews at>
  • Date: Fri, 11 Apr 2008 01:46:55 -0400 (EDT)

On 4/10/08 at 2:14 AM, amorales at (Ary Adilson Morales
Alvarado) wrote:

>How I can to obtain the maximum and minimum values in a function
>like a Sin, but that varying their frequency with the time.

The most direct way to find the minimum and maximum of any
function is to use Minimize. Using Sin as an example, a minimum is:

In[4]:= Minimize[Sin[x], x]

Out[4]= {-1, {x -> (3*Pi)/2}}

and a maximum is:

In[5]:= Minimize[-Sin[x], x]

Out[5]= {-1, {x -> Pi/2}}

Alternatively, you can compute the derivative of your function
and use FindRoot, Reduce, Solve etc. Again using Sin as an example:

In[6]:= Reduce[D[Sin[x], x] == 0, x]

Out[6]= Element[C[1], Integers] && (x == 2*Pi*C[1] - Pi/2 ||
       x == 2*Pi*C[1] + Pi/2)

finds all of the minima/maxima

  • Prev by Date: Re: Documentation - what is the big secret?
  • Next by Date: Re: Documentation - what is the big secret?
  • Previous by thread: Re: max and min
  • Next by thread: exporting to multiple sheets in XLS format