COMPLEX ANALYSIS: Maple Worksheets, 2001
(c) John H. Mathews Russell W. Howell
mathews@fullerton.edu howell@westmont.edu

Complimentary software to accompany the textbook:

COMPLEX ANALYSIS: for Mathematics & Engineering, 4th Ed, 2001, ISBN: 0-7637-1425-9
Jones and Bartlett Publishers, Inc., 40 Tall Pine Drive, Sudbury, MA 01776
Tele. (800) 832-0034; FAX: (508) 443-8000, E-mail: mkt@jbpub.com, http://www.jbpub.com/


CHAPTER 11 FOURIER SERIES and the LAPLACE TRANSFORM

Section 11.9 Inverting the Laplace Transform

So far, most of the applications involving the Laplace transform involve a transform (or part of a transform) that is expressed by

 

Y(s) = P(s)/Q(s)

 

where P and Q are polynomials that have no common factors. The inverse of Y(s) is found by using its partial fraction representation and referring to Table 11.2. We now show how the theory of complex variables can be used to systematically find the partial fraction representation. The first result is an extension of Lemma 8.1 to n linear factors.

 

Theorem 11.19 (Nonrepeated Linear Factors)

Let P(s) be a poynomial of degreeat most n-1 . If Q(s) has degree n, and has distinct complex roots a[1] , a[2] , ... , a[n] , then

Y(s) = P(s)/Q(s) = P(s)/((s-a[1])*(s-a[2])*`...`*(s-a[n])) = Sum(`Res[... .

 

Load Maple's "residue" and "Laplace transform" procedures,

and activate the Laplace transform package.
Make sure this is done only ONCE during a Maple session.

> readlib(residue):
with(inttrans):
laplace(t,t,s):

Example 11.24, Page 535. Find the inverse Laplace transform of Y(s) = (s^3-4*s+1)/(s*(s-1)^3) .

> s:='s': Y:='Y':
Y := s ->(s^3 - 4*s + 1)/(s*(s-1)^3):
`Y(s) ` = Y(s);

`Y(s) ` = (s^3-4*s+1)/s/(s-1)^3

 

The partial fraction expansion can be obtained with residues.
(a) At s = 1 , we compute as follows:

> a:='a': P:='P': Q:='Q':
`First, compute the coefficient `, a[3];
PQ := (s^3 - 4*s + 1)/s:
`Use `, P(s)/Q(s) = PQ;
a3 := limit(PQ, s=1):
a[3],` = `,Limit(P(s)/Q(s),s=1) = a3; ` `;
`Second, compute the coefficient `, a[2];
d1 := simplify(diff(PQ,s)):
`Use `, Diff(P(s)/Q(s),s) = d1;
a2 := limit(d1, s=1):
a[2],` = `,Limit(Diff(P(s)/Q(s),s),s=1) = a2; ` `;
`Third, compute the coefficient `, a[1];
d2 := simplify(diff(PQ,s$2)):
`Use `, Diff(P(s)/Q(s),s$2) = d2;
a1 := limit(d2, s=1)/2!:
a[1],` = `,Limit(Diff(P(s)/Q(s),s$2),s=1) = a1;

`First, compute the coefficient  `, a[3]

`Use `, P(s)/Q(s) = (s^3-4*s+1)/s

a[3], ` = `, Limit(P(s)/Q(s),s = 1) = -2

` `

`Second, compute the coefficient  `, a[2]

`Use `, Diff(P(s)/Q(s),s) = (2*s^3-1)/s^2

a[2], ` = `, Limit(Diff(P(s)/Q(s),s),s = 1) = 1

` `

`Third, compute the coefficient  `, a[1]

`Use `, Diff(P(s)/Q(s),`$`(s,2)) = 2*(s^3+1)/s^3

a[1], ` = `, Limit(Diff(P(s)/Q(s),`$`(s,2)),s = 1) ...

 

(b) At s = 0 , we compute as follows:

> b:='b': R:='R':
`Fourth, compute the coefficient `, b[1];
PR := (s^3 - 4*s + 1)/(s-1)^3:
`Use `, P(s)/R(s) = PR;
b1 := limit(PR, s=0):
b[1],` = `,Limit(P(s)/R(s),s=0) = b1; ` `;

`Fourth, compute the coefficient  `, b[1]

`Use `, P(s)/R(s) = (s^3-4*s+1)/(s-1)^3

b[1], ` = `, Limit(P(s)/R(s),s = 0) = -1

` `

 

Combining the results from (a) and (b), the partial fraction expansion is:

> s:='s': Y:='Y':
Y := s ->(s^3 - 4*s + 1)/(s*(s-1)^3):
`Y(s) ` = Y(s);
`Y(s) ` = a3/(s-1)^3 + a2/(s-1)^2 + a1/(s-1) + b1/s;

`Y(s) ` = (s^3-4*s+1)/s/(s-1)^3

`Y(s) ` = -2*1/((s-1)^3)+1/((s-1)^2)+2/(s-1)-1/s

We can check this with Maple's result using the partial fraction subroutine.

> s:='s': Y:='Y':
Y := s ->(s^3 - 4*s + 1)/(s*(s-1)^3):
`Y(s) ` = Y(s);
`Y(s) ` = convert(Y(s),parfrac,s);

`Y(s) ` = (s^3-4*s+1)/s/(s-1)^3

`Y(s) ` = -2*1/((s-1)^3)+1/((s-1)^2)+2/(s-1)-1/s

 

Using the table of Laplace transforms to look up the inverses we get the solution:
f(t) = -1-t^2*exp(t)+t*exp(t)+2*exp(t)
We can check this with Maple's result using the inverse Laplace transform subroutine.

> `F(s) ` = (s^3 - 4*s + 1)/(s*(s-1)^3);
`f(t) ` = invlaplace((s^3 - 4*s + 1)/(s*(s-1)^3), s, t);

`F(s) ` = (s^3-4*s+1)/s/(s-1)^3

`f(t) ` = (-t^2+t+2)*exp(t)-1

 


Example 11.25, Page 537. Find the inverse Laplace transform of F(s) = 5*s/((s^2+4)*(s^2+9)) .

> s:='s': Y:='Y':
Y := s -> 5*s/((s^2+4)*(s^2+9)):
`Y(s) ` = Y(s);

`Y(s) ` = 5*s/(s^2+4)/(s^2+9)

>

The partial fraction expansion for Y(s) will first be determined by using the residue calculus.
The simple poles in the upper half plane occur at
z[1] = 2*i and z[2] = 3*i .

> z1 := 2*I:
z2 := 3*I:
r1 := residue(Y(s), s=z1):
r2 := residue(Y(s), s=z2):
`At z1 ` = z1, ` Res[Y(s),z1] ` = r1;
`At z2 ` = z2, ` Res[Y(s),z2] ` = r2;
a1 := Re(z1): b1 := Im(z1): A1 := Re(r1): B1 := Im(r1):
a2 := Re(z2): b2 := Im(z2): A2 := Re(r2): B2 := Im(r2):
F1 := (2*A1*(s - a1) - 2*B1*b1)/((s - a1)^2 + b1^2):
F2 := (2*A2*(s - a2) - 2*B2*b2)/((s - a2)^2 + b2^2):
`Y(s) ` = Y(s);
`Y(s) ` = F1 + F2;

`At  z1 ` = 2*I, `   Res[Y(s),z1] ` = 1/2

`At  z2 ` = 3*I, `   Res[Y(s),z2] ` = -1/2

`Y(s) ` = 5*s/(s^2+4)/(s^2+9)

`Y(s) ` = s/(s^2+4)-s/(s^2+9)

 

We can check this with Maple's result using the partial fraction subroutine.

> s:='s': Y:='Y':
Y := s -> 5*s/((s^2+4)*(s^2+9)):
`Y(s) ` = Y(s);
`Y(s) ` = convert(Y(s),parfrac,s);

`Y(s) ` = 5*s/(s^2+4)/(s^2+9)

`Y(s) ` = s/(s^2+4)-s/(s^2+9)

 

Using the table of Laplace transforms, the answer is y(t) = cos(2*t)-cos(3*t) .
We can check this with Maple's result using the inverse Laplace transform subroutine.

> `F(s) ` = 5*s/((s^2+4)*(s^2+9));
`f(t) ` = invlaplace(5*s/((s^2+4)*(s^2+9)), s, t);

`F(s) ` = 5*s/(s^2+4)/(s^2+9)

`f(t) ` = cos(2*t)-cos(3*t)

 

Example 11.26, Page 527. Find the inverse Laplace transform of Y(s) = (s^3+3*s^2-s+1)/(s*(s+1)^2*(s^2+1)) .
We use Maple's subroutine for finding the partial fraction expansion.

> s:='s': Y:='Y':
Y := s ->(s^3+3*s^2-s+1)/(s*(s+1)^2*(s^2+1)):
`Y(s) ` = Y(s);
`Y(s) ` = convert(Y(s),parfrac,s);

`Y(s) ` = (s^3+3*s^2-s+1)/s/(s+1)^2/(s^2+1)

`Y(s) ` = 1/s-2/(s+1)^2-2/(s+1)+(s+1)/(s^2+1)

 

Using the table of Laplace transforms, the answer is:
y(t) = 1-2*t*exp(-t)-2*exp(-t)+cos(t)+sin(t) .
We can check this with Maple's result using the inverse Laplace transform subroutine.

> `F(s) ` = (s^3+3*s^2-s+1)/(s*(s+1)^2*(s^2+1));
`f(t) ` = invlaplace((s^3+3*s^2-s+1)/(s*(s+1)^2*(s^2+1)), s, t);

`F(s) ` = (s^3+3*s^2-s+1)/s/(s+1)^2/(s^2+1)

`f(t) ` = 1+cos(t)+sin(t)+(-2*t-2)*exp(-t)

 


Example 11.27, Page 538. Solve the initial value problem
`y'(t) = y(t) - x(t)` with y(0) = 1 ,
`x'(t) = 5y(t) - 3x(t)` x(0) = 2 .

> s:='s': S:='S': X:='X': Y:='Y':
`y'(t) = y(t) - x(t) with y(0) = 1,`;
`x'(t) = 5y(t) - 3x(t) x(0) = 2.`; ` `;
y0 := 1:
x0 := 2:
eqn1 := s*Y(s) - y0 = Y(s) - X(s): eqn1;
eqn2 := s*X(s) - x0 = 5*Y(s) - 3*X(s): eqn2;
sol := solve({eqn1,eqn2}, {X(s),Y(s)}): sol; ` `;
X := s -> (3+2*s)/(s^2+2*s+2):
Y := s -> (s+1)/(s^2+2*s+2):
`x(t) ` = invlaplace(X(s), s , t);
`y(t) ` = invlaplace(Y(s), s , t);

`y'(t) =  y(t) - x(t)  with y(0) = 1,`

`x'(t) = 5y(t) - 3x(t)      x(0) = 2.`

` `

s*Y(s)-1 = Y(s)-X(s)

s*X(s)-2 = 5*Y(s)-3*X(s)

{Y(s) = (s+1)/(2+s^2+2*s), X(s) = (3+2*s)/(2+s^2+2*...

` `

`x(t) ` = 2*exp(-t)*cos(t)+exp(-t)*sin(t)

`y(t) ` = exp(-t)*cos(t)

 

We can check this with Maple's result using the dsolve subroutine.

> t:='t': x:='x': y:='y':
DEs := diff(y(t),t)=y(t)-x(t),diff(x(t),t)=5*y(t)-3*x(t):
ICs := y(0)=1, x(0)=2:
FNs := {x(t), y(t)}:
`D. E.'s ` = DEs;
`I. C.'s ` = ICs; ` `;
dsolve({DEs}, FNs); ` `;
dsolve({DEs,ICs}, FNs);

`D. E.'s   ` = (diff(y(t),t) = y(t)-x(t), diff(x(t)...

`I. C.'s   ` = (y(0) = 1, x(0) = 2)

` `

{y(t) = exp(-t)*(_C1*sin(t)+_C2*cos(t)), x(t) = exp...

` `

{y(t) = exp(-t)*cos(t), x(t) = exp(-t)*(2*cos(t)+si...

 

Example 11.28, Page 541. Find the inverse Laplace transform of F(s) = (4*s+3)/(s^3+2*s^2+s+2) .

> F:='F': P:='P': Q:='Q': s:='s': t:='t':
P := s -> (4*s + 3):
Q := s -> (s^3 + 2*s^2 + s + 2):
F := s -> (4*s + 3)/(s^3 + 2*s^2 + s + 2):
`F(s) ` = F(s);
`P(s) ` = P(s);
`Q(s) ` = Q(s);
`Q(s) ` = factor(Q(s));
`Q(s) = 0 solutions set: ` = solve(Q(s)=0, s);

`F(s) ` = (4*s+3)/(s^3+2*s^2+s+2)

`P(s) ` = 4*s+3

`Q(s) ` = s^3+2*s^2+s+2

`Q(s) ` = (s+2)*(s^2+1)

`Q(s) = 0  solutions set: ` = (-2, I, -I)

 

Q(s) has simple zeros at the points s[1] = -2 , s[2] = i and s[3] = -i .

> Q1 := s -> subs(S=s,diff(Q(S),S)):
`P(s) ` = P(s);
`Q '(s) ` = Q1(s);
f := t -> P(-2)/Q1(-2)*exp(-2*t)
+ P(I)/Q1(I)*exp(I*t)
+ P(-I)/Q1(-I)*exp(-I*t):
`f(t) ` = f(t);
`f(t) ` = evalc(f(t));

`P(s) ` = 4*s+3

`Q '(s) ` = 3*s^2+4*s+1

`f(t) ` = -exp(-2*t)+(1/2-I)*exp(I*t)+(1/2+I)*exp(-...

`f(t) ` = -exp(-2*t)+cos(t)+2*sin(t)

 

We can check this with Maple's result using the inverse Laplace transform subroutine.

> `F(s) ` = (4*s + 3)/(s^3 + 2*s^2 + s + 2);
ft := invlaplace((4*s + 3)/(s^3 + 2*s^2 + s + 2), s, t):
`f(t) ` = ft;

`F(s) ` = (4*s+3)/(s^3+2*s^2+s+2)

`f(t) ` = -exp(-2*t)+cos(t)+2*sin(t)

 

End of Section 11.9.