enhancing laplace transforms



Hello Sheldon,

thank you for your interest in the Laplace code.

In Maxima 5.17.1 the Maxima function specint was extened to do 
laplace transformations with the unit_step functions.

This month the function laplace was extended to call specint, when laplace 
fails to find a solution. So the next release will include this too.

Here is an example with the extended laplace function:

(%i99) laplace(unit_step(t-3)*exp(t-3),t,s);
(%o99) %e^-(3*s)/(s-1)

I have not checked your further examples, but you can also use 
a summation and unit_step:

(%i115) radcan(laplace(sum((-1)^n*unit_step(t-n*k),n,0,inf),t,s)),simpsum;
Is  %e^(k*s)-1  positive, negative, or zero?
p;
(%o115) %e^(k*s)/(s*%e^(k*s)+s)

Dieter Kaiser

-----Urspr?ngliche Nachricht-----
Von: "Sheldon Newhouse" <sen1 at math.msu.edu>
Gesendet: 12.03.09 17:47:37
An: "maxima at math.utexas.edu" <maxima at math.utexas.edu>
Betreff: [Maxima] enhancing laplace transforms

Hello,
 In teaching ODE we do a unit on Laplace transforms.  In addition to the 
usual transforms and inverse transforms, we also do transforms for step 
functions.
I did not see this in maxima (if it is already there, please tell me 
what the corresponding commands are), so  I wrote two smple functions to 
do the laplace transform and corresponding inverse transform. 

Note: maxima does do
  laplace(delta(t-a),t,s),
but I could not get it to handle  laplace(unit_step(t-3)*exp(t-3), t,s)  
for instance. 

The code is as follows. the name 'lap_us' is for 'laplace_unit_step)

lap_us(a,f):= exp(-s*a)*laplace(ev(f,t=t+a),t,s)$

and

ilap_us(a,t):=  unit_step(t+a)*ev(ilt(F/exp(a*s),s,t),t=t+a)$

Typical examples:

(%i6) lap_us(2,exp(t-2));

(%o6) %e^-(2*s)/(s-1)
(%i7) ilap_us(-2,%);

(%o7) %e^(t-2)*unit_step(t-2)

I would like to put this in something better.  For the direct transform, 
I would like to have a routine 'lap' which takes an expression which may 
be a sum of standard functions and those with unit step factors and 
produces the associated transform.

For instance, it would do something like

 lap( t^3 + 3*exp(-3*t) + unit_step(t-1)*(t-1)^2 - 
unit_step(t-3)*(t-3),  t,  s)

and produce the Laplace transform as
(%i15) laplace(t^3 + 3*exp(-3*t),t,s) + lap_us(1,(t-1)^2) - lap_us(3,t-3);

(%o15) 2*%e^-s/s^3-%e^-(3*s)/s^2+3/(s+3)+6/s^4

As it stands now, I have to do the summands separately.
 
Is there a simple way to parse the arguments so as to make the function 
'lap' in a simple manner from the above pieces (or is there a better way 
to do this)?

Any suggestions would be welcome.

TIA,
 -sen
_______________________________________________________________________
DSL zum Nulltarif + 20 Euro Extrapr?mie bei Online-Bestellung ?ber die
DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a