List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] bug in dsolve with piecewise
| [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
|
[View Complete Thread]
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
|