List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] laplace transform and dsolve (or Heaviside)
| [MUG] laplace transform and dsolve (or Heaviside) |
|
Author: Makelly
Posted: 20/11/2000 15:02:45 GMT
|
>> From:
Essentially I have a file that works fine in Version V.5 but now behaves
badly in Version 6.
In particular, after using some laplace transforms, dsolve becomes unable
to cope with
a step function "Heaviside(t-a)" . Here are the lines and the crytic error
message.
>df:=t->sin(t)-sin(t)*Heaviside(t-9*Pi/2);
df := t -> sin(t) - sin(t) Heaviside(t - 9/2 Pi)
>dsolve({(D@@2)(y)(t)+y(t)=df(t),y(0)=1,D(y)(0)=4},y(t));
y(t) = - 1/2 cos(t) t + 1/2 cos(t) Heaviside(t - 9/2 Pi) t
- 9/4 cos(t) Heaviside(t - 9/2 Pi) Pi + cos(t) + 9/2 sin(t)
> with(inttrans):
> left:=expand(laplace( (D@@2)(w)(T)+w(T),T,s));
left := s^2*laplace(w(T),T,s)-s*w(0)-D(w)(0)+laplace(w(T),T,s)
> right:=laplace(drive(T),T,s);
right := 1/(s^2+1)-exp(-9/2*s*Pi)*s/(s^2+1)
> dsolve({(D@@2)(y)(t)+y(t)=df(t),y(0)=1,D(y)(0)=4},y(t));
Error, (in limit) wrong number (or type) of parameters in function
indets
By the way, at least when I check it, the step of transforming the Heaviside
is precisely when the problem arises. Not when inttrans is loaded nor when
you transform other things.
Any help would be appreciated.
Brian Kelly
|
| [MUG] Re: laplace transform and dsolve (or Heaviside) |
|
Author: Maple Group
Posted: 24/11/2000 14:23:51 GMT
|
>> From: Maple Group
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Edgardo S. Cheb-Terrab"
To: "MUG"
Subject: laplace transform and dsolve (or Heaviside)
Date: Mon, 20 Nov 2000 17:00:07 -0800
Hi Brian,
| > ...
| > dsolve({(D@@2)(y)(t)+y(t)=df(t),y(0)=1,D(y)(0)=4},y(t));
| Error, (in limit) wrong number (or type) of parameters
| in function indets
The problem you are showing looks to me like a bug in limit.
One way or the other, you are free of this problem by installing "ODEtools",
which automatically updates dsolve and pdsolve subroutines to the latest
version. The update includes the bug fixing of all DE-solving bugs or problems
reported up-to-today - so that you have Maple's dsolve and pdsolve "free of
known bugs". The update also brings a bunch of extra functionality and new
solving methods running automatically on background, or directly at user-level,
as for instance the exact solving of "PDE systems" by Maple's pdsolve.
In the case of the problem you show, after installing ODEtools you have the
following. First the lines you run before the problem turns apparent:
> df:=t->sin(t)-sin(t)*Heaviside(t-9*Pi/2);
> dsolve({(D@@2)(y)(t)+y(t)=df(t),y(0)=1,D(y)(0)=4},y(t));
> with(inttrans):
> left:=expand(laplace( (D@@2)(w)(T)+w(T),T,s));
> right:=laplace(drive(T),T,s);
Now this works fine:
> ics := y(0)=1,D(y)(0)=4;
ics := y(0) = 1, D(y)(0) = 4
> ode := `@@`(D,2)(y)(t)+y(t) = sin(t)-sin(t)*Heaviside(t-9/2*Pi):
> ans := dsolve({ode,ics},y(t));
ans := y(t) = - 1/2 cos(t) t + 1/2 cos(t) Heaviside(t - 9/2 Pi) t
- 9/4 cos(t) Heaviside(t - 9/2 Pi) Pi + cos(t) + 9/2 sin(t)
This solution checks OK
> odetest(ans,ode);
0
and the ics are satisfied correctly
> limit(ans,t=0);
y(0) = 1
> limit( diff(ans,t) ,t=0);
D(y)(0) = 4
The ODEtools library is available at http://lie.uwaterloo.ca/odetools.htm
Hope this is of use
Edgardo
___________________________________________________________________________
Edgardo S. Cheb-Terrab http://lie.uwaterloo.ca/ecterrab
Theoretical Physics Department UERJ,Brazil
Centre for Experimental and Constructive Mathematics SFU, Canada
___________________________________________________________________________
-- "Whoever has the most fun wins" --
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 21 Nov 2000 13:25:14 +0100
From: Preben Alsholm
To:
Subject: laplace transform and dsolve (or Heaviside)
Your problem seems to stem from assigning to the name 'right', as the following
lines suggest. The word 'right' is used in Maple (in limits e.g.).
> restart:
> df:=t->sin(t)-sin(t)*Heaviside(t-9*Pi/2):
> right:=bla:
> dsolve({(D@@2)(y)(t)+y(t)=df(t),y(0)=1,D(y)(0)=4},y(t));
Error, (in limit) wrong number (or type) of parameters in function indets
--
Preben Alsholm
IFAK, DTU
Technical University of Denmark
|
Previous by date: [MUG] NEWBY with problems with Maple 6.01 and Linux, Andre Estel
Next by date: [MUG] Re: solve with inequalities or conditions, Maple Group
Previous thread: [MUG] Hankel Transform problem in Maple V rel 5, Leonardo Sandrolini
Next thread: [MUG] solve with inequalities or conditions, Gnutzmann
|