       Re: max and min

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

```On 4/10/08 at 2:14 AM, amorales at lme.usp.br (Ary Adilson Morales

>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:= Minimize[Sin[x], x]

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

and a maximum is:

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

Out= {-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:= Reduce[D[Sin[x], x] == 0, x]

Out= Element[C, Integers] && (x == 2*Pi*C - Pi/2 ||
x == 2*Pi*C + 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