Basic Syntax

>

The commands to calculate the Laplace transform and the inverse Laplace transform are laplace and invlaplace . The commands work as follows.

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

[Maple Math]

>

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

[Maple Math]

>

Note that you have to specify names of variables in the Laplace domain, usually s, and in the original domain, usually t, in addition to the expression whose transform or inverse transform you want to calculate. Note also that Maple can handle transforms as well as inverse transforms of expressions containing parameters.

Example 1. Use Maple to find the inverse transform of the expression

[Maple Math] .

Try to guess how Maple obtained the inverse.

> F:=1/(s^3+5*s^2+6*s);

[Maple Math]

>

> InvF:=invlaplace(F,s,t);

[Maple Math]

>

How did Maple calculate the inverse transform? The same way you could do it by hand: by partial fractions decomposition. Recall the syntax for partial fractions decomposition:

> convert(F,parfrac,s);

[Maple Math]

>

Recall also that

> invlaplace(1/s,s,t); invlaplace(1/(s-a),s,t); invlaplace(c*H(s)+d*G(s),s,t);

[Maple Math]

[Maple Math]

[Maple Math]

>

The decomposition and the formulas above explain why InvF is what it is.

As you know, the Laplace transform is particularly useful for solving nonhomogeneous differential equations in which the right-hand side is discontinuous or contains Dirac impulse components. To enter right-hand sides that are discontinuous, we use unit step functions , called also Heaviside functions . The syntax for Heaviside functions and Dirac impulses is illustrated below.

Example 2. Express the single rectangular pulse

r(t) = 1 for 2 < t < 4 , r(t) =0 otherwise,

in terms of Heaviside functions. Enter and plot the expression.

Of course, r(t) = u(t-2) - u(t-4). We enter the expression as follows:

> r:=Heaviside(t-2)-Heaviside(t-4);

[Maple Math]

>

> plot(r,t=0..9);

[Maple Plot]

>

Example 3. Define in Maple the expression f(t) that describes a force consisting of two impulses: one, of magnitude 4 at t=2 and one of magnitude 3 at t=5. Find the Laplace transform of f(t).

We define f as follows:

> f:=4*Dirac(t-2)+3*Dirac(t-5);

[Maple Math]

>

> laplace(f,t,s);

[Maple Math]

>

We obtained the transform that we expected.

>