Adept Scientific - English
The world's best software and hardware 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  
UKdedksvnofi
Home
Products
Training
Events
 Buy Online
Downloads
Academic Discounts
Support
My Adept
International |  About Us |  Adept Scientific Blog |  Contact Us |  Press Room |  Jobs
Adept Scientific on Facebook Adept Scientific on Twitter Adept Scientific on YouBube Adept Scientific on LinkedIn


The Next Steps

• Ask us a question
• Watch Maple Video Demonstrations
• Buy Maple Now
• View Maple Pricing
• Download a Brochure
• Request an Evaluation
• Meet Our Team
• Read our RSS Feeds

Learn More

Maple Home
Maple 17 Overview
Maple 17 Professional
Maple 17 Academic
Maple 17 Student Use
What's New in Maple 17
Maple Features
Maple History
Recorded Online Seminars

MapleSim
MapleNet
Maple T.A.
BlockImporter™
Maple Toolboxes
The Möbius Project

Maple Rave Reviews
Maple Study Guides
Books about Maple
System Requirements

Latest Information

New Features: Professional
New Features: Academic
Maple Features
The Maple Reporter Online

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] nasty bug in odeplot with macos X

Search email archive for  

[MUG] nasty bug in odeplot with macos X
Author: Roberto Sussman    Posted: Sun, 08 Sep 2002 17:26:46 -0500

>> From: Roberto Sussman />
I found a nasty plot using Maple 7 with a Mac (G4 Tower 400 Mhz, Mac OS
X version 10.1). Since Maple is not native it runs under the "Classic"
Mac OS 9.2 emulation.

First I run the following simple commands related to solving numericaly
a system of two ODE's

> restart;
> eqMN:=(beta0,lambda0,x)->diff(M(x),x)=piecewise(x>0,
x^2*(exp(beta0-beta(x))+lambda0), x=0, 0);
> eqbN:=(lambda0,x)->diff(beta(x),x)=piecewise(x>0,
> (M(x)/x^2-lambda0*x)*beta(x), x=0, 0);
>
S0:=dsolve({eqMN(10^6,0,x),eqbN(0,x),M(0)=0,beta(0)=10^6},{M(x),beta(x)},type=
numeric);
> seq(S0(.5*i), i=1..5);
> plots[odeplot](S0,[x,log10(M(x))],0..2.5,color=black);

Up to this point everything is fine. But then, I want to redo the ODE's
with a different method, therefore I edit the dsolve commands adding
(say) "method = lsode" (the problem is independent of the method). I do
so and then re-run all the commands. It does the numerical solutions and
tabulates numerical values, but displays an error message as I try to
plot them with odeplot. The message is

Error, (in StringTools:-Remove) mapped expression must return `true'
or `false'

Though, you can obtain the plot by forming a list of lists with the
points by using instead of odeplot the command

plot([seq([i/10,log10(rhs(S0(i/10)[2]))], i=0..25)], color=black);

Afterwards, since I could not get any plot with odeplot I quit Maple
and tried to start a new session, but got the error message

"The application Maple has unexpectedly quit... etc"

Hence I had to force-quit the whole Classic environment. This annoying
bug does not happen if running the same commands under Mac OS 9.x.
Hopefuly the Mac OS X native version of Maple might come soon. I write
below the transcript of the Maple session (after re-executing the group
of commands)

Roberto Sussman


> restart;
> eqMN:=(beta0,lambda0,x)->diff(M(x),x)=piecewise(x>0,
> x^2*(exp(beta0-beta(x))+lambda0), x=0, 0);

eqMN := (beta0, lambda0, x) -> diff(M(x), x) = piecewise(0 < x,

2
x (exp(beta0 - beta(x)) + lambda0), x = 0, 0)

> eqbN:=(lambda0,x)->diff(beta(x),x)=piecewise(x>0,
> (M(x)/x^2-lambda0*x)*beta(x), x=0, 0);

eqbN := (lambda0, x) -> diff(beta(x), x) =

/M(x) \
piecewise(0 < x, |---- - lambda0 x| beta(x), x = 0, 0)
| 2 |
\ x /

>
> S0:=dsolve({eqMN(10^6,0,x),eqbN(0,x),M(0)=0,beta(0)=10^6},{M(x),beta(x
> )},type=numeric, method=lsode);

S0 := proc(x_lsode) ... end proc

> seq(S0(.5*i), i=1..5);

-5
[x = .5, M(x) = .107253635455685075 10 ,

7
beta(x) = .100001172170238756 10 ], [x = 1.0,

-5
M(x) = .207236310045923610 10 ,

7
beta(x) = .100001321418795199 10 ], [x = 1.5,

-5
M(x) = .300759851927367088 10 ,

7
beta(x) = .100001405604256631 10 ], [x = 2.0,

-5
M(x) = .391263046364007452 10 ,

7
beta(x) = .100001463943739084 10 ], [x = 2.5,

-5
M(x) = .480790975386358341 10 ,

7
beta(x) = .100001508190117218 10 ]

> plots[odeplot](S0,[x,log10(M(x))],0..2.5,color=black);
Error, (in StringTools:-Remove) mapped expression must return `true'
or `false'

> plot([seq([i/10,log10(rhs(S0(i/10)[2]))], i=0..25)], color=black);

>


%
%===================================================
% Dr Roberto A Sussman,
% Investigador Titular B,
% Instituto de Ciencias Nucleares,
% Circuito Exterior, CU, UNAM,
% Mexico DF, 04510
%
% tels: +52-55-56224690, 91, 92, fax: +52-55-56224693
% email: & /> % web: http://www.nuclecu.unam.mx/~sussman
%===================================================



Previous by date: [MUG] Re: getting hold of exponents in ifactor, Maple User Group
Next by date: [MUG] Comparison of mathematical programs for data analysis, Thomas Schramm
Previous thread: [MUG] Maple problem (?),  Paul E S Wormer
Next thread: [MUG] Comparison of mathematical programs for data analysis, Thomas Schramm



Ready to buy?

Maple Professional
Add to shopping basket
£ 1,695.00
Maple - for academic use
Add to shopping basket
£ 940.00
Maple - for registered students
Add to shopping basket
£ 95.00

Featured Downloads

Maplesoft Product Catalogue
Maple Player for iPad - Datasheet
Maple 17 What's New datasheet
Maple 17 Professional Datasheet
Maple Whitepaper: Driving Innovation - How mathematical modeling and optimisation increase efficiency and productivity in vehicle design.
MapleSim Whitepaper - Technological Superiority in Multi-Domain Physical Modelling and Simulation

Latest Downloads

Maple - Global Optimization Toolbox
The Möbius Project - Create it, Share it, Grade it
Maple 17 Programming Guide
Maple 17 User Manual
Maplesoft Product Catalogue - Academic Maths

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

Latest News

Global Optimization Toolbox: Better Optimization to Solve More Problems, Faster
Global Optimization Toolbox: Better Optimization to Solve More Problems, Faster
New MapleSim release delivers advanced model development and analysis, extended toolchain connectivity and quicker results
Maple 17 offers advanced solving and application development capabilities
New release of Maple advances teaching and research
adept

Top of the Page

Popular Links: ChemDraw | ChemOffice | Data Acquisition | Data Analysis | EndNote | Maple | MapleSim | Mathcad | MathType | Quality Analyst | Reference Manager | VisSim

EU ePrivacy Directive | Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2013, Adept Scientific Ltd.
Site designed and maintained by Lyndon Ash

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