The Laplace Transform

Differential Equations Project

Objectives:

(a)   To demonstrate the use of  the laplace option of the   dsolve   command in solving initial value

        problems

         

(b)   To demonstrate the use of the Laplace transform in solving differential equations involving

        piecewise continuous functions by using Maple 's implementation of the Heaviside  (unit step)

         function  and the Dirac delta function  (the unit impulse function)

     In essence, the Laplace transform changes the operation of differentiation into the operation of multiplication, so that a differential  equation is converted to an algebraic  equation.  By using the inverse Laplace transform , the algebraic solution can be transformed into the solution of the original differential equation.  Technology makes it easy to handle the algebraic and analytic complexities that arise in using Laplace transform techniques, especially expressions involving algebraic fractions or piecewise continuous functions.

Solved Example 1:

We want to (a) find the Laplace transform of  cos(5 t ) and (b)  determine the function whose Laplace transform is    4*s/((s^2+4)^2)   .

Solution:

(a)   We could just use Maple  to evaluate the improper integral defining the Laplace transform by

        using the   int  command.  However in trying to calculate the limit that occurs in evaluating the

        improper integral, Maple must be told whether the usual parameter   s   is positive or negative.

        In our problem, the limit exists only if   s   is positive.  One way to get around this is to replace   s

        by its absolute value:

>    int(cos(5*t)*exp(-abs(s)*t), t=0..infinity);

(s^2+25)^(1/2)/(1+25/abs(s)^2)^(1/2)/(1/(1+25/abs(s)^2)*s^2+25/(1+25/abs(s)^2)+25/abs(s)^2/(1+25/abs(s)^2)*s^2+625/abs(s)^2/(1+25/abs(s)^2))

Since Maple did not simplify the answer, we issue another command:

>    simplify(%);

abs(s)/(s^2+25)^(1/2)/(abs(s)^2+25)^(1/2)

Because   s   must be positive, we write the answer as     s/(s^2+25)  .

However, there is an easier way.    The package   inttrans   (standing for "integral transforms") contains the Laplace transform commands that Maple has already  implemented:

>    with(inttrans):

The Laplace transform of  cos(5 t )  is then computed by the command

>    laplace(cos(5*t),t,s);

s/(s^2+25)

(b)   To find the function whose Laplace transform is   Y ( s ), we use the command

         invlaplace( Y ( s ), s , t )   (giving the inverse Laplace transform).    For our problem, this becomes

>    invlaplace(4*s/(s^2+4)^2, s, t);

t*sin(2*t)

  

Simplifying, we get

>    simplify(%);

t*sin(2*t)

Solved Example 2:

Solve the initial value problem  y''  -  2y  =   sin(2*t) ,   y (0)  = 1 , y' (0) = 2, by using the laplace   option of the dsolve  command.

Solution :

You should be aware that the alternative is to use Maple  to take the Laplace transform of each side of the equation, define and substitute the initial conditions, solve for the Laplace transform algebraically, and then solve for the solution of the differential equation by using the invlaplace  command.  You have probably used this sequence of steps by hand.   However , look at how easy it is by using Maple  the right way:

>    de:=diff(y(t),t$2)-2*y(t)=sin(2*t);

de := diff(y(t),`$`(t,2))-2*y(t) = sin(2*t)

>    dsolve({de, y(0)=1,D(y)(0)=2}, y(t), method=laplace);

y(t) = -1/3*sin(t)*cos(t)+cosh(2^(1/2)*t)+7/6*2^(1/2)*sinh(2^(1/2)*t)

>    dsolve({de, y(0)=1,D(y)(0)=2}, y(t));

y(t) = (1/2+7/12*2^(1/2))*exp(2^(1/2)*t)+(1/2-7/12*2^(1/2))*exp(-2^(1/2)*t)-1/6*sin(2*t)

Even using   simplify   won't help much here.

 

Solved Example 3:

Solve the initial value problem   x '( t )  +   x ( t )  =  { t   for   t  in [0, 4); 1  for    4 <= t  }, with   x (0) = 1.

Solution:

Because Maple  can't integrate, differentiate, or take Laplace transforms of piecewise-defined functions, our first task is to express the discontinuous function on the right side of our equation in terms of the Heaviside function , Heaviside ( t - a ), which is defined to be  0  for   t  < a   and  1  for   t  > a.   The right-hand side of the differential equation can be described by the function  f    as follows:

>    f:=t->t+(1-t)*Heaviside(t-4);

f := proc (t) options operator, arrow; t+(1-t)*Heaviside(t-4) end proc

>    eqn:=diff(x(t),t)+x(t)=f(t);

eqn := diff(x(t),t)+x(t) = t+(1-t)*Heaviside(t-4)

>    dsolve({eqn, x(0)=1},x(t),method=laplace);

x(t) = (1+3*exp(-t+4)-t+2*exp(-1/2*t+2)*sinh(1/2*t-2))*Heaviside(t-4)+exp(-t)+t-2*exp(-1/2*t)*sinh(1/2*t)

>    convert(%,piecewise);

x(t) = PIECEWISE([exp(-t)+t-2*exp(-1/2*t)*sinh(1/2*t), t < 4],[exp(-4)-2*exp(-2)*sinh(2)+undefined, t = 4],[exp(-t)-2*exp(-1/2*t)*sinh(1/2*t)+1+3*exp(-t+4)+2*exp(-1/2*t+2)*sinh(1/2*t-2), 4 < t])

Solved Example 4:

A mass attached to a spring is released from rest 1 meter below the equilibrium position for the spring-mass system and begins to move up and down.  After 3 seconds, the mass is struck by a hammer (with force equal to 3) in a downward direction.  If the undamped system is governed by the IVP

d^2*x/(dt^2)+9*x = 3*delta(t-3) ;   x (0) = 1,   dx/dt  (0) = 0 ,

where   x ( t )  denotes the displacement from equilibrium at time   t   and   delta*(t-3)   denotes the Dirac delta function , determine a formula for   x ( t ).

Solution:

First we define the equation using the Maple  function  3* Dirac ( t  - 3), representing an "impulse force" of magnitude 3,    for the right-hand side:

>    EQN:= diff(x(t),t$2)+9*x(t)=3*Dirac(t-3);

EQN := diff(x(t),`$`(t,2))+9*x(t) = 3*Dirac(t-3)

>    dsolve({EQN,x(0)=1,D(x)(0)=0},x(t));

x(t) = cos(3*t)+Heaviside(t-3)*sin(-9+3*t)

>    convert(%,piecewise);

x(t) = PIECEWISE([cos(3*t), t < 3],[cos(9)+undefined, t = 3],[cos(3*t)+sin(-9+3*t), 3 < t])

>    combine(%,trig);

x(t) = PIECEWISE([cos(3*t), t < 3],[cos(9)+undefined, t = 3],[cos(3*t)+sin(-9+3*t), 3 < t])

________________________________________________

ASSIGNMENT

Problem 1 :

  (a)  Use Maple to find the Laplace transform   of   F ( t ) = t   e^(alpha*t) , where   alpha   is a constant.

  (b)  Use Maple  to determine the function whose Laplace transform is    a/(s^2*(s^2+a^2))  .

Problem 2:

Solve the IVP   y ''  -   y '  -  2 y   =  5 sin x   ;   y (0) = 1,   y '(0) = -1.

Problem 3:

Solve the IVP  3 y ''  +  3 y '  +  2 y  =  {0  for   t  < 0; 5  for   t   in  [0, 5]; 0  for   t  > 5};  y (0) = 0,      y '(0) = 0.  Express your answer as a piecewise-defined function.

Problem 4:

Solve the IVP   y ''  +   y   =  1  +   delta*(t-2*Pi)  ;   y (0) = 1,   y '(0) = 0.  Express your answer as a piecewise-defined function.

___________________________________________________________________________  

MSIP Grant #P120A80089-98: "Three Urban Calculus Reform Programs: Adopting the Best,"    1998-2001 ; Revised September 18, 2003