Adept Scientific - English
The world's best software for research, science and engineering.
flag arrow
clearclear
 

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKusdedksvnofi
Home
Products
Training
Consultancy
 Buy Online
Downloads
Education
Support
My Adept
International |  About Us |  Contact Us |  Press Room |  Jobs


The Next Steps

• Ask us a question
• Maple Product Tour
• Buy Maple Now
• View Maple Pricing
• Find out about Online Training
• Download a Brochure
• Request a Brochure
• Download a Demo
• Request a Demo
• Meet Our Team
• Read our RSS Feeds

Learn More

Maple Home
Maple 11 Professional
Maple 11 Academic
Maple 11 Student Use
Recorded Online Seminars
FREE Training Resources


MapleNet
Maple T.A.
MapleConnect
BlockImporter for Simulink
BlockBuilder for Simulink
Maple Toolboxes
Maple Rave Reviews
Maple Study Guides
Books about Maple
System Requirements

View Maple 10 in Action
Product Comparison Chart

Latest Information

New Features: Professional
New Features: Academic
The Maple Reporter
The Maple Reporter Online
Numerical Algorithms Group
(NAG)


Service & Support

Maple 10 Training Videos
MaplePrimes, blogs, forums
Elite Maintenance Program
Application Centre
Powertools
Maple User Group (MUG)
Join the Maple User Group
(MUG)

Search the Knowledge Base
Technical Support request

List Archives >  Maple User Group List Archive >  Archive by date >  This Month By Date >  This Month By Topic

[MUG] Finding the maximum value of a function over a range

Search email archive for  

[MUG] Finding the maximum value of a function over a range
Author: Roush, Craig Ryan UMKC-Student    Posted: Wed, 17 Apr 2002 23:04:51 -0500

>> From: "Roush, Craig Ryan (UMKC-Student)" "crrea2"

I have a function that is dependent on a variable phi, where phi
ranges from 0 to 2*Pi, Is there a way I can calculate the maximum
value of the function over that range so I can normalize that function
to a unity value of 1? Thanks! Craig

[MUG] Re: Finding the maximum value of a function over a range
Author: Maple User Group    Posted: Mon, 22 Apr 2002 15:05:28 -0400

>> From: Maple User Group "maple_gr"

|> From: "Roush, Craig Ryan (UMKC-Student)" "crrea2"
| I have a function that is dependent on a variable phi, where phi
| ranges from 0 to 2*Pi, Is there a way I can calculate the maximum
| value of the function over that range so I can normalize that function
| to a unity value of 1? Thanks! Craig

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Sun, 21 Apr 2002 05:02:10 +0200
From: Helmut Kahovec "helmut.kahovec"
To: "maple-list"
Subject: Finding the maximum value of a function over a range


If you have Maple7 then look at the online help page of 'minimize'.

Kind regards

Helmut

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

From: "Willard, Daniel Dr DUSA-OR" "daniel.willard"
To: "''"
Subject: Finding the maximum value of a function over a range
Date: Thu, 18 Apr 2002 12:38:01 -0400

Calling the function F, solve dF/d(phi)=0. If no answer, try the
function <extrema>.

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Thu, 18 Apr 2002 10:25:16 -0700 (PDT)
From: Robert Israel "israel"
To: "maple-list"
Subject: Finding the maximum value of a function over a range


It depends. You could try

> maximize(f(phi), phi = 0 .. 2*Pi);

This uses the usual symbolic methods, which will generally require
solving the equation f'(phi) = 0. This may or may not be possible
in closed form, so you may not get an answer. In addition (depending
on which release of Maple you're using) maximize has a number of bugs.
To get a numerical approximation of an answer, you might try gmax from
my Maple Advisor Database, http://www.math.ubc.ca/~israel/advisor.

Robert Israel "israel"
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2



-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Subject: Finding the maximum value of a function over a range
Date: Thu, 18 Apr 2002 12:37:09 -0500
From: "Roush, Craig Ryan (UMKC-Student)" "crrea2"
To: "Robert Israel" "israel"

yes, it is not possible to solve the equations that I am using in
closed form, they are for the electric field of an antenna array. I
just need to normalize the function so that I have plots that I can
compare reasonably well, I have tried, gmax, findmax that I found
online, and not one of those would find the max of my equation. Any
other suggestions? Craig Roush



-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Thu, 18 Apr 2002 11:25:04 -0700 (PDT)
From: Robert Israel "israel"
To: "Roush, Craig Ryan (UMKC-Student)" "crrea2"
Subject: Finding the maximum value of a function over a range


If you can plot the function on the interval, then you can extract the
maximum of the y-values of the plotted points. For example:

> P:= plot(f(phi), phi=0..2*Pi):
A:= remove(has, op([1,1],P), undefined):
MAX:= max(op(map(t -> t[2], A)));

Robert Israel "israel"
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2

[MUG] Re: Finding the maximum value of a function over a range
Author: Theodore Kolokolnikov    Posted: Thu, 25 Apr 2002 15:56:25 -0700

>> From: Theodore Kolokolnikov "tkolokol"

> from: "Roush, Craig Ryan (UMKC-Student)" "crrea2"
> I have tried, gmax, findmax that I found online, and not one of
> those would find the max of my equation. Any other suggestions?
> Craig Roush

I've used "slink" program, available from:

http://www.maths.qmw.ac.uk/~fjw/public_maple/

It can minimize functions of many variables. It works in situations where
Maple's "minimize" doesn't.

Theodore.

[MUG] Re: Finding the maximum value of a function over a rang e
Author: Willard, Daniel Dr DUSA-OR    Posted: Tue, 30 Apr 2002 16:19:18 -0400

>> From: "Willard, Daniel Dr DUSA-OR" "daniel.willard"


Have you tried "extrema"?

> From: "Roush, Craig Ryan (UMKC-Student)" "crrea2"
> I have tried, gmax, findmax that I found online, and not one of
> those would find the max of my equation. Any other suggestions?

[MUG] Re: Finding the maximum value of a function over a range
Author: Jeff Wright    Posted: Thu, 9 May 2002 12:25:40 -0700

>> From: "Jeff Wright" "jhwright"

Based on suggestions from the group, I have successfully used something like
the following to get numerical extrema.


#Assume that f is defined externally, and return the value of z that
maximizes f.

maxf := proc(f, zmin, zmax)

local p1, points, maxval,maxpt;

p1 := plot(f(z), z=zmin .. zmax): #create plot structure from which to grab
results

points := op([1,1],p1): # extract list of points

maxval:= max(op(map(t -> t[2], points))): #find max value

maxpt := select(t-> t[2]=maxval, points)[]: # get ordered pair for max value

if(maxpt[2]<0) then maxpt[2]:=0; fi ;

return(maxpt):

end proc ;


------------------------------
Jeffrey H. Wright, Ph.D.
Department of Math and Computer Science
University of San Diego
5998 Alcala Park
San Diego, CA 92110-2492

"jhwright" 619-260-7491

Previous by date: [MUG] AW: Problems with solving systems of equations,  Thomas Richard
Next by date: [MUG] Re: volume under the curve?, Maple User Group
Previous thread: [MUG] Debugging Procedures in Modules,  David Levitt
Next thread: [MUG] volume under the curve?, Zlatko Savic



Ready to buy?

Maple - single user licence
Add to shopping basket
$ 1,895.00
Upgrade to Maple 12 from v11
Add to shopping basket
$ 995.00
Upgrade to Maple 12 from v10 & below
Add to shopping basket
$ 1,395.00

Featured Downloads

Maple White Paper: Technical Knowledge - An Asset You Can Afford to Lose?
Maple in Electronics Application Pack
Maple in Robotics & Aerospace Application Pack
Maple in Finance Application Pack

Product Reviews

"Without the Maple software, we would have to spend weeks generating the equations of motion for every experiment. Then the chances that we did it right would basically be near zero. There would always be a mistake somewhere. It is very difficult to set up a dynamic motion model by hand."
- Jean-Claude PiedBeouf, Ph.D Manager of Robotics, Canadian Space Agency

"Its very good - highly accurate and easy to use. The speed of Maple allows me to change equations and quickly reintegrate them into the application, so more possibilities can be explored to achieve the precise effect desired."
Shawn Neely, Senior R & D Director for PDI/Dreamworks
adept

Top of the Page

Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2007, Adept Scientific plc.
Site designed and maintained by Adeptise

Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055