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] 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 />
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: /> />
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 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