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
• Download a Brochure
• Request a Brochure
• Download a Demo
• Request a Demo
• Meet Our Team
• Read our RSS Feeds

Learn More

Maple Home
Maple 12 Professional
Maple 12 Academic
Maple 12 Student Use
Recorded Online Seminars
FREE Training Resources
Maple Application Briefs
Maple Adoption Program

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

Latest Information

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


Service & Support

Maple Primes
blogs, forums etc

Elite Maintenance Program
Application Centre
Powertools
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] Maximize/minimize

Search email archive for  

[MUG] Maximize/minimize
Author: Jim Gunson    Posted: Tue, 30 Apr 2002 10:58:45 -0700

>> From: "Jim Gunson" "Jim.Gunson"

Maple's maximize fails on the function below:

>f:=x->abs(sin(x)*exp(x));
>maximize(f(x),x=0..5);

Error, (in maximize) wrong number (or type) of parameters in function map

I can work around it, as follows, but I think that maximize should work
in such cases. The application was to find the max of the absolute value
of the second derivative, which is used to determine the max error in
approximating an integral using the trapeziodal rule.

> maxabs:=proc(expr,range);
> return(max(maximize(expr,range),minimize(-expr,range)));
> end;


Cheers

Jim Gunson
Instructor in Mathematics
Kwantlen University College
12666 72 Ave
Surrey, B.C.
Canada
V3W 2M8

[MUG] Re: Maximize/minimize
Author: Carl Devore    Posted: Fri, 3 May 2002 02:04:46 -0400 (

>> From: Carl Devore "devore"

| >> From: "Jim Gunson" "Jim.Gunson"
|
| Maple's maximize fails on the function below:
|
| >f:=x->abs(sin(x)*exp(x));
| >maximize(f(x),x=0..5);
|
| Error, (in maximize) wrong number (or type) of parameters in function map
|
| I can work around it, as follows, but I think that maximize should work
| in such cases.

In this case, it will also work if you assume that x is real.
> assume(x, real);

Clearly, the "x= 0..5" should imply that x is real, but Maple does not see
it that way.

| The application was to find the max of the absolute value
| of the second derivative, which is used to determine the max error in
| approximating an integral using the trapeziodal rule.
|
| > maxabs:=proc(expr,range);
| > return(max(maximize(expr,range),minimize(-expr,range)));
| > end;

I have done exactly the same thing, for the same reason, and I came up
woth the same workaround. Ultimately, though, I gave up on the maximize
and minimize commands for this application. Use numapprox[infnorm]
instead.

> numapprox[infnorm](exp(x)*sin(x), x= 0..5);
142.3169809

Previous by date: [MUG] FW: Position at WMI, L Bernardin
Next by date: [MUG] a bug or a feature?,  Rouben Rostamian
Previous thread: [MUG] Creating new names, Bob McElrath
Next thread: [MUG] a bug or a feature?,  Rouben Rostamian



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