Page 1  7
Use single quotes to remove any
assumptions about a variable.
Lab 7: Laplace Transforms using Maple
The Laplace transform sometimes involves challenging integrals. Maple can usually do these quite easily for you. Recall that
the singlesided Laplace transform of the function
f
(
t
) is defined by the improper integral:
L
[
f
(
t
)]
=
f
(
t
)
e
!
st
dt
0
"
#
For example, the transform of the unit step function
u
(
t
), assuming Re(
s
) > 0, is found to be:
L
[
u
(
t
)]
=
u
(
t
)
e
!
st
dt
0
"
#
=
e
!
st
dt
=
0
"
#
e
!
st
!
s
0
"
=
1
s
Let's see how this could be performed in Maple.
Example 1: Laplace Transform of Unit Step Function in Maple
Using Maple, find the Laplace transform of the unit step function
u
(
t
).
Method 1:
You could of course do all the work from scratch as in this first method.
> alias(u=Heaviside); interface(imaginaryunit=j);
> L := s > int( u(t)*exp(s*t), t=0.
. infinity); L(s);
Maple of course cannot evaluate the limit, because it will not make any assumptions about the complex number
s
without our
permission. To help it perform the limit, we need to assume that the real part of
s
is greater than 0 so that the exponential will
go to zero.
> assume( Re(s)>0); L(s);
This returns the expected value:
Note that the attached tilde simply is Maple's way of denoting that we have made an assumption about
s
. We will want to
unassume
before calculating any additional transforms.
Method 2:
Maple has a builtin Laplace transform function which makes things even easier. The Laplace and inverse Laplace
function are in a special library of integral transform
routines named
inttrans
which needs to be loaded first.
> with(inttrans);
Type in the following help command to see how the
laplace
command works. Notice that the
laplace
command can even be
used directly with differential equations.
> ? inttrans[laplace]
OK, let's unassume
s
and then transform the step function
u
(
t
) using the builtin
laplace
command.
> s := 's':
> laplace( u(t),t,s);
returns
1/s
Notice that even with the assumption about
s
removed, the
laplace
function gives us the answer in the form we want!
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentPage 2  7
Next note that there is also a builtin inverse laplace transform called
invlaplace
.
> invlaplace( 1/s, s,t);
returns
1
Notice however that the inverse laplace returned only 1 instead of
u
(
t
). This is because
u
(
t
) = 1 for
t
> 0 and we are using the
onesided laplace transform.
Example 2: Laplace Transform of a Delayed Unit Step Function u(tt0)
a.
Using Maple, find the Laplace transform of the unit step function
u
(
t
–1) which has been delayed by one time unit.
> laplace( u(t1),t,s);
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 CARR

Click to edit the document details