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] bug in dsolve with piecewise

Search email archive for  

[MUG] bug in dsolve with piecewise
Author: Sussman    Posted: Thu, 16 Jan 2003 20:42:16 -0600

>> From: sussman "sussman"

Hy MUG

I found a bug when applying dsolve in the case when one of the ODE's is
defined by means of piecewise. Using piecewsie is necessary when you
need to provide initial conditions at x=0 when you have terms of the
form 1/x (and you know there is no singularity). The following
instructions illustrate the problem:

|\^/| Maple 8 (APPLE PPC OSX)
._|\| |/|_. Copyright (c) 2002 by Waterloo Maple Inc.
\ MAPLE / All rights reserved. Maple is a registered trademark
of
<____ ____> Waterloo Maple Inc.
| Type ? for help.

> e1:=diff(mu(x),x)=x^2*exp(psi(x));
d 2
e1 := -- mu(x) = x exp(psi(x))
dx

> e2:=diff(psi(x),x)=piecewise(x>0, -mu(x)/x^2, x=0,0);
{ mu(x)
d { - ----- 0 < x
e2 := -- psi(x) = { 2
dx { x
{
{ 0 x = 0

> S:=dsolve({e1,e2,mu(0)=0,psi(0)=0},{mu(x),psi(x)}, type=numeric);
Error, (in f) unable to store 'piecewise()' when datatype=float[8]

These are the equilibrium equation for an isothermal sphere (a standard
text book problem in newtonian astrophysics) and initial conditions
should be given as mu(0)=0,psi(0)=0 for physical reasons. However,
since there is a term mu(x)/x^2 in the second equation, I normaly used
piecewise to be able to set these initial conditions. This works very
well in all previous Maple releases (from V5.1 to 7). I am using
command line version of Maple8 for the Mac OSX but the same problem
occurs in Windows and linux versions of Maple 8.

Is there a new feature of dsolve that allows you to set this type of
initial conditions without using piecewise or is this a real bug?

Roberto Sussman

Dr Roberto A Sussman,
Departamento de Gravitacion,
Instituto de Ciencias Nucleares UNAM,
Circuito Exterior CU,
Mexico DF, 04510, MEXICO

tels +52-555-6224690, 91, 92
fax +52-555-6224693

emails: "sussman"
"sussky"

web http://www.nuclecu.unam.mx/~sussman

Previous by date: [MUG] DegreeReverseLexicographic Monomial ordering, Mehmet Suzen
Next by date: [MUG] Maple startup options?,  Thomas Richard
Previous thread: [MUG] easiest way to write calculated data to a file with Maple ?,  Jim Fukuyama
Next thread: [MUG] Maple startup options?, Maple



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

What's New in Maple 11 for Professionals
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