COMPLEX ANALYSIS: Mathematica 3.0 Notebooks
(c) John H. Mathews, and
Russell W. Howell, 1998
Complimentary software to accompany our textbook:

COMPLEX ANALYSIS: for Mathematics and Engineering, 
3rd Edition,  1997,  ISBN: 0-7637-0270-6
Jones & 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/
This free software is compliments of the authors.
mathews@fullerton.edu,  howell@westmont.edu

CHAPTER 11  FOURIER SERIES and the LAPLACE TRANSFORM
Section 11.1  Fourier Series
Section 11.2  The Dirichlet Problem for the Unit Disk
Section 11.3  Vibrations in Mechanical Systems
Section 11.4  The Fourier Transform
Section 11.5  The Laplace Transform
Section 11.6  Laplace Transforms of Derivatives and Integrals
Section 11.7  Shifting Theorems and the Step Function
Section 11.8  Multiplication  and  Division  by  t
Section 11.9  Inverting the Laplace Transform
Section 11.10  Convolution
GoTo Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.
GoTo Contents

CHAPTER 11  FOURIER SERIES and the LAPLACE TRANSFORM

Clear[a, a1, a2, a3, A, A1, A2, b, b1, b2, B1, B2, B, c, d, EqA, EqB, 
      f, f1, f2, f12, F, F1, F2, F12, F3, g, G, h, H, i, int, j, k, L, Ly, 
      L1, L2, Lf, LDf, n, PQ, PR, r, res1, res2, s, solset, s1, s2, s3, S, 
      S9, t, τ, T, θ, u, U, U1, U2, U7, v, v1, v2, v3, v4, val, 
      w, w1, w2, y, y0, y1, Y, Yi, z1, z2];

Section 11.1  Fourier Series

Theorem 11.1,  Page 399.  (Fourier Expansion)  If  U (t)  has period  2  π  and  U'(t)  is piecewise continuous, the Fourier expansion is    
	U (t)=(((Subscript[a, 0]))/2) + (∑_(j = 1)^∞)((Subscript[a, j]) cos(j t) + (Subscript[b, j]) sin(j t)).
	
Theorem 11.2,  Page 400.  If  U (t)  and  V (t)  have Fourier series representations, then their sum  W (t) = U (t) + V (t)  has a Fourier series representation, and the Fourier coefficients of  W  are obtained by adding the corresponding coefficients of  U  and  V.

Theorem 11.3,  Page 400.  (Fourier Cosine Series)  Assume that  U (t)  is an even function and has period  2  π.  If   U (t)  and  U'(t)  are piecewise continuous, the Fourier series for   U (t)  involves only the cosine terms,  (i.e.  (Subscript[b, j])=0  for all  j):
	U (t)=(((Subscript[a, 0]))/2) + (∑_(j = 1)^∞)(Subscript[a, j]) cos(j t),   where
	(Subscript[a, j])=(2/π)(∫_0^π)U (t) cos (j t) dt,   for   j = 0, 1, ⋯.

Theorem 11.4,  Page 400.  (Fourier Sine Series)  Assume that  U (t)  is an odd function and has period  2  π.  If   U (t)  and  U'(t)  are piecewise continuous, the Fourier series for   U (t)  involves only the sine terms,  (i.e.  (Subscript[a, j]) = 0  for all  j):
	U (t)=(∑_(j = 1)^∞)(Subscript[b, j]) sin(j t),  where
	(Subscript[b, j])=(2/π)(∫_0^π)U (t) sin (j t) dt,  for   j = 1, 2, ⋯.

Theorem 11.5,  Page 401.  (Termwise Integration)  If  U (t)  has the Fourier series representation   U (t)=(((Subscript[a, 0]))/2) + (∑_(j = 1)^∞)((Subscript[a, j]) cos(j t) + (Subscript[b, j]) sin(j t)).  Then the integral  of  U (t)  has a Fourier series representation which can be obtained by termwise integration of the Fourier series of  U (t),  that is
	(∫_0^t)U (τ) dτ=(∑_(j = 1)^∞)((((Subscript[a, j]) + (((-1))^(j + 1))(Subscript[a, 0]) )/j) sin(j t) -(( (Subscript[b, j]))/j) cos(j t)),
where we have used the expansion
	(((Subscript[a, 0])t)/2)=(∑_(j = 1)^∞)(((((-1))^(j + 1))(Subscript[a, 0]) )/j) sin(j t).

Theorem 11.6,  Page 401.  (Termwise Differentiation)  If  U (t)  has the Fourier series representation   U (t)=(((Subscript[a, 0]))/2) + (∑_(j = 1)^∞)((Subscript[a, j]) cos(j t) + (Subscript[b, j]) sin(j t)).  Then the derivative  of  U (t)  has a Fourier series representation which can be obtained by termwise differentiation of the Fourier series of  U (t),  that is  
	U'(t)= (∑_(j = 1)^∞)(j (Subscript[b, j]) cos(j t)- j(Subscript[a, j]) sin(j t)).

Load Mathematica's  FourierTransform  package.
Make sure this is done only ONCE during a Mathematica  session.

Get["Calculus`FourierTransform`"]

First set up procedures to compute the coefficients and partial sum.

\(Clear[a, b, j, n, S, t, u]; 

    a[j_]\  = \ 
      \(1\/π\) 
        \(∫\_\(-π\)\%π u[t] Cos[j\ t] \[DifferentialD]t\); 
    
b[j_]\  = \ 
      \(1\/π\) 
        \(∫\_\(-π\)\%π u[t] Sin[j\ t] \[DifferentialD]t\); 
    
S[n_, t_] = 
      a[0]\/2 + ∑\+\(j = 1\)\%n\((a[j] Cos[j\ t] + b[j] Sin[j\ t])\); 

    Print[\*""   \!\(a\_n\) = "", a[j]]; 

    Print[\*""   \!\(b\_n\) = "", b[j]]; 

    Print[\*""\!\(S\_n\)[t] = "", S[n, t]]; \)

Example 11.1,  Page 399.  Find the Fourier series expansion for   u(t) = ((t )/2).

\(Clear[S9, t, u]; 
u[t_]\  = \ t\/2; 
Print["u[t] = ", u[t]]; \)

For illustration we can computer the Fourier series of degree n = 9.

\(S9[t_]\  = \ S[9, t]; 
Print[\*""\!\(S\_9\)[t] = "", S9[t]]; \)

We can also get this result using Mathematica's built in procedure FourierTrigSeries.

\(S9[t_]\  = \ FourierTrigSeries[u[t], {t, \(-Pi\), Pi}, 9]; 

    Print[\*""\!\(S\_9\)[t] = "", S9[t]]; \)

A graph of  u(t), (Subscript[S, 1])(t), (Subscript[S, 2])(t), (Subscript[S, 3])(t)  is given:

\(S1[t_]\  = \ S[1, t]; 
S2[t_]\  = \ S[2, t]; 
S3[t_]\  = \ S[3, t]; 

    Plot[{u[t], S1[t], S2[t], S3[t]}, {t, \(-Pi\), Pi}, 

      PlotRange -> {{\(-π\), π}, {\(-1.5\), 1.5}}, 
      PlotStyle 
        -> {RGBColor[0, 0, 0], RGBColor[1, 0, 0], RGBColor[0, 1, 0], 
          RGBColor[0, 0, 1]}, AxesLabel -> {"t", "s"}, 
      Ticks -> {Range[\(-π\), π, π\/2], 
          Range[\(-1.5\), 1.5, 0.5]}]; 
Print["u[t] = ", u[t]]; 

    Print[\*""\!\(S\_1\)[t] = "", S1[t]]; 

    Print[\*""\!\(S\_2\)[t] = "", S2[t]]; 

    Print[\*""\!\(S\_3\)[t] = "", S3[t]]; \)

Example 11.2,  Page 401.  The function  U (t) = | t |   has the Fourier series representation  
U (t)=(π/2)-(π/4)(∑_(j = 1)^∞)((cos ((2 j - 1) t))/((((2 j - 1))^2))).  
Solution.  The solution is given in the textbook

GoTo Chapter 11

Section 11.2  The Dirichlet Problem for the Unit Disk

The Dirichlet problem for the unit disk  D: |z| < 1  is to find a real-valued function  u(x,y)  that is harmonic in the unit disk  D  and that takes on the boundary values:
          u(cos(θ), sin(θ)) = U(θ)    for  -π < θ ≤ π .
          
Theorem 11.7,  Page 406.  (The Dirichlet problem in  D)  Assume that  U (t)  has period  2  π,    U'(t)  is piecewise continuous, and   U (t)=(((Subscript[a, 0]))/2) + (∑_(j = 1)^∞)((Subscript[a, j]) cos(j t) + (Subscript[b, j]) sin(j t)).   
Then the solution to the Dirichlet problem in  D  is
   u (r cos θ, r sin θ)=(((Subscript[a, 0]))/2) + (∑_(j = 1)^∞)((Subscript[a, j]) (r^j) cos(j θ) + (Subscript[b, j]) (r^j) sin(j θ)),
where  x + i y = r (e^(i θ))  denotes a complex number in the closed disk   | z |  ≤  1 .

Theorem 11.8,  Page 407.  (Poisson Integral Formula for the Unit Disk)  Let  u (x, y)  be a function that is harmonic in a simply connected domain that contains the closed unit disk  D :  | 
        z |  <  1.  If  u (x, y)  takes on the boundary values
	u (r cos θ, r sin θ) = 
        U (θ)   for    - π < θ ≤ 
          π ,
then  u (x, y) has the integral representation
	u (r cos θ, r sin θ)= (∫_(-∞)^∞)(((1  -  (r^2)) U (t))/(1  +  (r^2)  -  2 r cos (t  -  θ)))dt ,
that is valid for  | z |  <  1.

Example 11.3,  Page 409.  Find the function  u(x,y)  that is harmonic in the 
unit disk   |z| < 1  and takes on the boundary values:
          u( cos θ , sin θ )  =  U(θ)  =  (θ/2)    for    -π < θ < π.
Solution:   Using Example 11.1, Page 399.  The Fourier series expansion is:    
U(θ)  = (∑_(j = 1)^∞)(((((-1))^(n + 1)))/n) sin(j θ).   Using formula (3) for the solution of the 
Dirichlet problem, to obtain the boundary value approximation  (Subscript[U, 7])(θ):

\(Clear[k, r, θ, U7]; 

    U7[r_, θ_]\  = \ 
      ∑\+\(k = 1\)\%7\((\(-1\))\)\^\(k + 1\)\/k\ r\^k\ Sin[k\ θ]; 
    
Print[\*""\!\(U\_7\)[r,θ] = "", U7[r, θ]]; \)

\(Plot[U7[1, θ], {θ, \(-Pi\), Pi}, 
      PlotRange -> {{\(-π\), π}, {\(-1.7\), 1.7}}, 
      PlotStyle -> {RGBColor[0, 0, 1]}, 
      AxesLabel -> {"θ", "s"}, 
      Ticks -> {Range[\(-π\), π, π\/2], 
          Range[\(-1.5\), 1.5, 0.5]}]; 

    Print[\*""\!\(U\_7\)[1,θ] = "", U7[1, θ]]; \)

GoTo Chapter 11

Section 11.3  Vibrations in Mechanical Systems

The forced motion of a mechanical system satisfies the nonhomogeneous linear
differential equation  m (U^(''))(t) + c\(\(U\^'\)\)(t) + kU(t) = F(t).  We investigate the solutions 
when  F(t)  is a Fourier series.

Example 11.4,  Page 416.  Find the general solution to  (U^(''))(t) + 2\(\(U\^'\)\)(t) + U(t) = F(t).
where  F(t)  is given by the Fourier series  F (t)=(∑_(n = 1)^∞)((cos ((2 n - 1) t))/(((2n-1))^2)).  
Solution.  The solution is given in the textbook.

Exercise 1,  Page 417.  Find the general solution to  (U^(''))(t) + 3\(\(U\^'\)\)(t) + U(t) = F(t).
(a)  Use  F(t) = (t/2).   Recall that we know that:  F(t)  = (∑_(j = 1)^∞)(((((-1))^(n + 1)))/n) sin(j t).

\(Clear[a, b, A, B, EqA, EqB, f, F, L, n, t, T, S, U]; 

    T[n_, t_]\  = \ A[n]\ Cos[n\ t]\  + \ B[n]\ Sin[n\ t]; 

    F[0, t_]\  = \ 0; 

    F[n_, t_]\  = \ \(\((\(-1\))\)\^\(n - 1\)\ Sin[n\ t]\)\/n; 

    Print["T[n,t] = ", T[n, t]]; 
Print["F[n,t] = ", F[n, t]]; \)

\(Print[
      Eq\  = \ ∂\_\(t, t\)T[n, t]\  + \ 3\ ∂\_t\ T[n, t]\ 
             + \ T[n, t]\  == \ F[n, t]]; 

    Print[EqA\  = \ 
        ReplaceAll[Eq, {Cos[n\ t]\  -> \ 1, Sin[n\ t]\  -> \ 0}]]; 
    
Print[EqB\  = \ 
        ReplaceAll[Eq, {Sin[n\ t]\  -> \ 1, Cos[n\ t]\  -> \ 0}]]; 
    \)

\(solset\  = \ Solve[{EqA, EqB}, \ {A[n], B[n]}]; 

    a[n_]\  = \ solset[[1, 1, 2]]; 

    b[n_]\  = \ solset[[1, 2, 2]]; 

    a[0]\ \  = \ 2\ F[0, t]; 
Print["a[0] = ", a[0]]; 

    Print["a[n] = ", a[n]]; 
Print["b[n] = ", b[n]]; \)

\(U[n_, t_]\  = \ a[n]\ Cos[n\ t]\  + \ b[n]\ Sin[n\ t]; 

    U[0, t]\ \ \  = \(\ a[0]\)\/2; 
Print["U[0,t] = ", U[0, t]]; 

    Print["U[n,t] = ", U[n, t]]; \)

\(L\  = \ 
      ∂\_\(t, t\)U[n, t]\  + \ 3 ∂\_t U[n, t]\  + \ 
        U[n, t]; 

    Print[\*""(∂_(t, t))U[n,t] + 3(∂_t)U[n,t] + U[n,t] = "", F[n, t]]; 

    Print[L, " = ", F[n, t]]; 

    Print[MapAll[Together, L], " = ", F[n, t]]; \)

\(S[t_]\  = \ ∑\+\(n = 0\)\%5 U[n, t]; 

    L\  = \ \(\(S'\)'\)[t]\  + \ 3\ \(S'\)[t]\  + \ S[t]; 

    Print[\*""(Subscript[S, 5])[t] = (∑_(n = 0)^5)U[n,t] = "", 
      S[t]]; 
Print[\*""(Subscript[S, 5])'[t] = "", \(S'\)[t]]; 

    Print[\*""(Subscript[S, 5])''[t] = "", \(\(S'\)'\)[t]]; 
Print[" "]; 
    
Print[\*""(Subscript[S, 5])''[t] + 3(Subscript[S, 5])'[t] + (Subscript[S, 5])[t] = "", 
      Expand[L]]; 
Print[" "]; 

    f[t_]\  = \ ∑\+\(n = 0\)\%5 F[n, t]; 

    Print[\*""(Subscript[f, 5])[t] = (∑_(n = 0)^5)f[n,t] = "", 
      f[t]]; 
Print[" "]; 

    Print[\*""(Subscript[S, 5])''[t] + 3(Subscript[S, 5])'[t] + (Subscript[S, 5])[t] == (Subscript[f, 5])[t]""]; 
Print[Expand[L], " == ", f[t]]; 

    Print[Expand[L]\  == \ f[t]]; \)

Exercise 2,  Page 418.  Find the general solution to  2 (U^(''))(t) + 2 \(\(U\^'\)\)(t) + U(t) = F(t).
(a)  Use  F(t) = (t/2).   Recall that we know that:  F(t)  = (∑_(j = 1)^∞)(((((-1))^(n + 1)))/n) sin(j t).

\(Clear[a, b, A, B, EqA, EqB, f, F, L, n, t, T, S, U]; 

    T[n_, t_]\  = \ A[n]\ Cos[n\ t]\  + \ B[n]\ Sin[n\ t]; 

    F[0, t_]\  = \ 0; 

    F[n_, t_]\  = \(\((\(-1\))\)\^\(n - 1\)\ Sin[n\ t]\)\/n; 

    Print["T[n,t] = ", T[n, t]]; 
Print["F[n,t] = ", F[n, t]]; \)

\(Print[
      Eq\  = \ 2\ ∂\_\(t, t\)T[n, t]\  + \ 
            2\ ∂\_t\ T[n, t]\  + \ T[n, t]\  == \ F[n, t]]; 

    Print[EqA\  = \ 
        ReplaceAll[Eq, {Cos[n\ t]\  -> \ 1, Sin[n\ t]\  -> \ 0}]]; 
    
Print[EqB\  = \ 
        ReplaceAll[Eq, {Sin[n\ t]\  -> \ 1, Cos[n\ t]\  -> \ 0}]]; 
    \)

\(solset\  = \ Solve[{EqA, EqB}, \ {A[n], B[n]}]; 

    a[n_]\  = \ solset[[1, 1, 2]]; 

    b[n_]\  = \ solset[[1, 2, 2]]; 

    a[0]\ \  = \ 2\ F[0, t]; 
Print["a[0] = ", a[0]]; 

    Print["a[n] = ", a[n]]; 
Print["b[n] = ", b[n]]; \)

\(U[n_, t_]\  = \ a[n]\ Cos[n\ t]\  + \ b[n]\ Sin[n\ t]; 

    U[0, t]\ \ \  = \(\ a[0]\)\/2; 
Print["U[0,t] = ", U[0, t]]; 

    Print["U[n,t] = ", U[n, t]]; \)

\(L\  = \ 
      2 ∂\_\(t, t\)U[n, t]\  + \ 2 ∂\_t U[n, t]\  + \ 
        U[n, t]; 

    Print[\*""2(∂_(t, t))U[n,t] + 2(∂_t)U[n,t] + U[n,t] = "", F[n, t]]; 

    Print[L, " = ", F[n, t]]; 

    Print[MapAll[Together, L], " = ", F[n, t]]; \)

\(S[t_]\  = \ ∑\+\(n = 0\)\%5 U[n, t]; 

    L\  = \ 2 \(\( S'\)'\)[t]\  + \ 2\ \(S'\)[t]\  + \ S[t]; 

    Print[\*""(Subscript[S, 5])[t] = (∑_(n = 0)^5)U[n,t] = "", 
      S[t]]; 
Print[\*""(Subscript[S, 5])'[t] = "", \(S'\)[t]]; 

    Print[\*""(Subscript[S, 5])''[t] = "", \(\(S'\)'\)[t]]; 
Print[" "]; 
    
Print[\*""2(Subscript[S, 5])''[t] + 2(Subscript[S, 5])'[t] + (Subscript[S, 5])[t] = "", Expand[L]]; 
Print[" "]; 

    f[t_]\  = \ ∑\+\(n = 0\)\%5 F[n, t]; 

    Print[\*""(Subscript[f, 5])[t] = (∑_(n = 0)^5)f[n,t] = "", 
      f[t]]; 
Print[" "]; 

    Print[\*""2(Subscript[S, 5])''[t] + 2(Subscript[S, 5])'[t] + (Subscript[S, 5])[t] == (Subscript[f, 5])[t]""]; 
Print[Expand[L], " == ", f[t]]; 

    Print[Expand[L]\  == \ f[t]]; \)

GoTo Chapter 11

Section 11.4  The Fourier Transform

Theorem 11.9,  Page 420.  (Fourier Transform)  Let  U (t)  and  U'(t)  be piecewise continuous, and
	(∫_(-∞)^∞)|U (t) | dt < M,
for some positive constant  M.  The Fourier transform  F (w)  of  U (t)  is defined as
	F (w) = (1/(2 π))(∫_(-∞)^∞)U (t) (e^(-i w t)) 
                dt.
At points of continuity,  U (t)  has the integral representation
	U (t) = (∫_(-∞)^∞)F (w) (t) (e^(i w t)) 
              dw,
and at a point  t = a  of discontinuity of  U (t),  this integral converges to    
	 ((\(U \((\(a\^-\))\) + U \((\(a\^+\))\)\))/2).

Load Mathematica's  FourierTransform  package. Make sure this is done only ONCE during a Mathematica  session.

Get["Calculus`FourierTransform`"]

Example 11.5,  Page 421.  Find the Fourier transform of   U(t)  =  (e^(-|t | )).

\(Clear[F, F1, F2, F3, t, U, U1, U2, w, w1, w2]; 

    U[t_]\  = E\^\(-Abs[t]\); 
U1[t_]\  = E\^t; 
    
U2[t_]\  = E\^\(-t\); 

    w1[t_]\  = 
      ∫U1[t] \(E\^\(\(-I\)\ w\ t\)\) 
          \[DifferentialD]t; 

    w2[t_]\  = 
      ∫U2[t] \(E\^\(\(-I\)\ w\ t\)\) 
          \[DifferentialD]t; 
Print["U[t] = ", U[t]]; 

    Print[\*""(Subscript[U, 1])[t] = "", U1[t]]; 

    Print[\*""(Subscript[U, 2])[t] = "", U2[t]]; 

    Print[\*""(Subscript[w, 1])[t] = ∫(Subscript[U, 1])[t]\!\(E\^\(\(-I\)\\ w\\ t\)\)\[DifferentialD]t = "", w1[t]]; 

    Print[\*""(Subscript[w, 2])[t] = ∫(Subscript[U, 2])[t]\!\(E\^\(\(-I\)\\ w\\ \\ t\)\)\[DifferentialD]t = "", w2[t]]; \)

Because of the exponential order  (Subscript[w, 1])(-∞) = 0  and  (Subscript[w, 2])(∞) = 0  and the Fourier transform is given by the following computation:

\(F[w_]\  = \ Together[\(w1[0] - w2[0]\)\/\(2  π\)]; 

    Print["U[t] = ", U[t]]; 
Print["F[w] = ", F[w]]; \)

Or we can let Mathematica  work with some very time consuming improper integrals.

\(val1\  = \ 
      Integrate[
        U1[t] E\^\(\(-I\)\ w\ t\), {t, 
          \(-∞\), 0}, Assumptions -> {Im[w] > \(-1\)}]; 

    val2\  = \ 
      Integrate[
        U2[t] E\^\(\(-I\)\ w\ t\), {t, 0, 
          ∞}, Assumptions -> {Im[w] < 1}]; 

    F1\  = \ \(val1\  + \ val2\)\/\(2  π\); 

    F2\  = \ Together[\(val1\  + \ val2\)\/\(2  π\)]; 

    F3\  = \ ExpandAll[Together[\(val1\  + \ val2\)\/\(2  π\)]]; 

    F[w_]\  = \ 
      Factor[ExpandAll[Together[\(val1\  + \ val2\)\/\(2  π\)]]]; 

    Print["U[t] = ", U[t]]; 

    Print["F[w] = ", F1, " = ", F2, " = ", F3]; 

    Print["F[w] = ", F[w]]; \)

Remark. The Mathematica  FourierTransform package does not multiply the integral by (1/(2 π)).

\(Fm[w_]\  = \ 
      FourierTransform[E\^\(-Abs[t]\), \ t, \ ω]; 

    Print[" U[t] = ", E\^\(-Abs[t]\)]; 

    Print["Fm[w] = ", Fm[w]]; \)

Example 11.6,  Page 421.  Find the Fourier transform of   U(t)  =  (1/(1  +  (t^2))).
Solution:  Using the result of Example 11.5 and the symmetry property to find the result.

\(Clear[F, t, U, w]; 
U[t_]\  = 1\/\(1\  + \ t\^2\); 

    F[w_]\  = E\^\(-Abs[t]\)\/\(2  π\); 

    Print["U[t] = ", U[t]]; 
Print["F[w] = ", F[w]]; \)

\(F[w_]\  = \ FourierTransform[U[t], \ t, \ w]; 

    Print["U[t] = ", U[t]]; 
Print["F[w] = ", F[w]]; \)

Remark. The Mathematica  FourierTransform package does not multiply the integral by  (1/(2 π)).
However, the sum involving the UnitStep functions will reduce to the standard answer.

GoTo Chapter 11

Section 11.5  The Laplace Transform

Theorem 11.10,  Page 424.  (Existence of the Laplace Transform)  If  f (t)  is of exponential order,
then its Laplace Transform  ℒ(f (t))=F (s)   is given by
	F (s) = (∫_(-∞)^∞)f (t) (e^(-s t)) 
              dt,   where  s = σ + i ω.
The defining integral for  F (s)  exists at points  s = σ + i τ  in the right half plane  τ > K.

Theorem 11.11,  Page 425.  (Linearity of the Laplace Transform)  Let  f (t)  and  g (t)  have Laplace transforms  F (s)  and  G (s),  respectively.  If  a  and  b  are constants, then   ℒ(a f (t) + b g (t))  =  a F (s)  +   b G (s).

Theorem 11.12,  Page 425.  (Uniqueness of the Laplace Transform)  Let  f (t)  and  g (t)  have Laplace transforms  F (s)  and  G (s),  respectively.   If  F (s) ≡ G (s)  then  f (t) ≡ g (t).

Load Mathematica's LaplaceTransform package.  Make sure this is done only ONCE during a Mathematica  session.

Get["Calculus`LaplaceTransform`"]

Example 11.7,  Page 426.  Find the Laplace transform of the step function:
f(t)  =  1     for     0  ≤  t  <   c,
f(t)  =  0     for     c  <  t.

\(Clear[c, f, g, F, s, t]; 
f[t_]\  = \ 1; 

    g[t_]\  = 
      ∫f[t] \(E\^\(\(-s\)\ t\)\) \[DifferentialD]t; 

    F[s_]\  = 
      ∫\_0\%c f[t] \(E\^\(\(-s\)\ t\)\) 
          \[DifferentialD]t; 
Print["f[t] = ", f[t]]; 

    Print[\*""g[t] = ∫f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", g[t]]; 
Print[" "]; 

    Print["F[s] = g[c]-g[0] = ", g[c] - g[0]]; 

    Print[\*""F[s] = (∫_0^c)f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", F[s]]; \)

Example 11.8,  Page 426.  Find the Laplace transform of   f(t)  =  (e^(a t)).

\(Clear[a, f, g, F, s, t]; 
f[t_]\  = \ E\^\(a\ t\); 

    g[t_]\  = \ 
      ∫f[t] \(E\^\(\(-s\)\ t\)\) \[DifferentialD]t; 

    F[s_]\  = \ 
      Integrate[f[t] E\^\(\(-s\)\ t\), \ {t, 0, ∞}, 
        Assumptions -> {Im[a] == 0, a < s}]; 

    Print["f[t] = ", f[t]]; 

    Print[\*""g[t] = ∫f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", g[t]]; 
Print[" "]; 

    Print["F[s] = g[∞]-g[0] = ", g[∞] - g[0]]; 

    Print[\*""F[s] = (∫_0^∞)f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", F[s]]; \)

Assuming that f(t) is of exponential order, we have g(t)->0 as  t->∞. Then  g(∞) = 0, and the Laplace transform can be computed by the calculation  g(∞) - g(0) = - g(0).

\(Print["f[t] = ", f[t]]; 

    Print[\*""g[t] = ∫f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", g[t]]; 
Print["F[s] = - g[0] = ", \(-g[0]\)]; 
    
Print["F[s] = ", Simplify[\(-g[0]\)]]; \)

We can check this with Mathematica's  result using the LaplaceTransform package.

\(F[s_]\  = \ LaplaceTransform[f[t], \ t, \ s]; 

    Print["f[t] = ", f[t]]; 
Print["F[s] = ", F[s]]; \)

Example 11.9,  Page 426.  Find the Laplace transform of of  f(t) = sinh(a t).   
Solution:  Using the result of Example 11.8.  Since  f(t) = sinh(at) = (((e^(a t))   -  (e^(-a t)) 
          )/2),
we use   ℒ((e^(a t)))  =  (1/(s  -  a))   and   ℒ((e^(-a t)))  =  (1/(s  +  a)).

\(Clear[a, f, f1, f2, f12, F, F1, F2, F12, s, t]; 

    f1[t_]\  = \ E\^\(a\ t\); 

    f2[t_]\  = \ E\^\(\(-a\)\ t\); 

    f12[t_]\  = \ 
      \(E\^\(a\ t\) - E\^\(\(-a\)\ t\)\)\/2; 

    f[t_]\  = \ Sinh[a\ t]; 
F1[s_]\  = \ LaplaceTransform[f1[t], \ t, \ s]; 
    
F2[s_]\  = \ LaplaceTransform[f2[t], \ t, \ s]; 

    F12[s_]\  = \ LaplaceTransform[f[t], \ t, \ s]; 

    F[s_]\  = \ LaplaceTransform[f[t], \ t, \ s]; 

    Print[\*"" \!\(f\_1\)[t] = "", f1[t]]; 

    Print[\*"" \!\(f\_2\)[t] = "", f2[t]]; 

    Print[\*""\!\(f\_12\)[t] = "", f12[t]]; 

    Print[\*""\!\(f\_12\)[t] = "", FullSimplify[f12[t]]]; 

    Print["  f[t] = ", FullSimplify[f[t]]]; 
Print[" "]; 

    Print[\*"" \!\(F\_1\)[s] = "", F1[s]]; 

    Print[\*"" \!\(F\_2\)[s] = "", F2[s]]; 

    Print[\*""\!\(F\_12\)[s] = \!\(\(F\_1[s] - F\_2[s]\)\/2\) = "", 
      \(F1[s] - F2[s]\)\/2]; 

    Print[\*""\!\(F\_12\)[s] = \!\(\(F\_1[s] - F\_2[s]\)\/2\) = "", 
      Together[\(F1[s] - F2[s]\)\/2]]; 

    Print[" F[s] = L[Sinh[a t]] = ", F[s]]; \)

Example 11.10,  Page 427.   Find the Laplace transform of   f(t)  =  t.

\(Clear[f, g, F, s, t]; 
f[t_]\  = \ t; 

    g[t_]\  = \ 
      ∫f[t] \(E\^\(\(-s\)\ t\)\) \[DifferentialD]t; 

    F[s_]\  = \ 
      Integrate[f[t] E\^\(\(-s\)\ t\), \ {t, 0, ∞}, 
        Assumptions -> {Im[s] == 0, s > 0}]; 

    Print["f[t] = ", f[t]]; 

    Print[\*""g[t] = ∫f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", g[t]]; 
Print[" "]; 

    Print["F[s] = g[∞]-g[0] = ", g[∞] - g[0]]; 

    Print[\*""F[s] = (∫_0^∞)f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", F[s]]; \)

Assuming that f(t) is of exponential order, we have g(t)->0 as t->∞.  Then  g(∞) = 0, and the Laplace transform can be computed by the calculation  g(∞) - g(0) = - g(0).

\(Print["f[t] = ", f[t]]; 

    Print[\*""g[t] = ∫f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", g[t]]; 
Print["F[s] = - g[0] = ", \(-g[0]\)]; 
    \)

We can check this with Mathematica's  result using the LaplaceTransform package.

\(F[s_]\  = \ LaplaceTransform[t, \ t, \ s]; 
Print["f[t] = ", t]; 

    Print["F[s] = ", F[s]]; \)

Example 11.11,  Page 427.   Find the Laplace transform of   f(t)  =  cos(b t).

Method 1.  Using integration

\(Clear[b, f, g, F, s, t]; 
f[t_]\  = \ Cos[b\ t]; 

    g[t_]\  = \ 
      ∫f[t] \(E\^\(\(-s\)\ t\)\) \[DifferentialD]t; 

    F[s_]\  = \ 
      Integrate[f[t] E\^\(\(-s\)\ t\), \ {t, 0, ∞}, 
        Assumptions -> {Im[b] == 0, Im[s] == 0, s > 0}]; 

    Print["f[t] = ", f[t]]; 

    Print[\*""g[t] = ∫f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", g[t]]; 
Print[" "]; 

    Print["F[s] = g[∞]-g[0] = ", g[∞] - g[0]]; 

    Print[\*""F[s] = (∫_0^∞)f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", F[s]]; \)

Assuming that  f(t)  is of exponential order, we have  g(t) -> 0  as  t -> ∞.  Then  g(∞) = 0, 
and the Laplace transform  can be computed by  the calculation   g(∞) - g(0)  =  - g(0).

\(Print["f[t] = ", f[t]]; 

    Print[\*""g[t] = ∫f[t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t = "", g[t]]; 
Print["F[s] = - g[0] = ", \(-g[0]\)]; 
    
Print["F[s] = - g[0] = ", Simplify[\(-g[0]\)]]; \)

Method 2.  Since  f(t)  =  cos(bt)  =  (((e^(i b t))   +   
            (e^(-i b t)))/2),  
we use   L1((e^(i b t)))  =  (1/(s  -  ib))   and   L1((e^(-i b t)))  =  (1/(s  +  ib))

\(Clear[b, f, f1, f2, f12, F, F1, F2, F12, s, t]; 

    f1[t_]\  = \ E\^\(I\ b\ t\); 

    f2[t_]\  = \ E\^\(\(-I\)\ b\ t\); 

    f12[t_]\  = \ 
      \(E\^\(I\ b\ t\) + 
          E\^\(\(-I\)\ b\ t\)\)\/2; 

    f[t_]\  = \ Cos[b\ t]; 
F1[s_]\  = \ LaplaceTransform[f1[t], \ t, \ s]; 
    
F2[s_]\  = \ LaplaceTransform[f2[t], \ t, \ s]; 

    F12[s_]\  = \ LaplaceTransform[f[t], \ t, \ s]; 

    F[s_]\  = \ LaplaceTransform[f[t], \ t, \ s]; 

    Print[\*"" \!\(f\_1\)[t] = "", f1[t]]; 

    Print[\*"" \!\(f\_2\)[t] = "", f2[t]]; 

    Print[\*""\!\(f\_12\)[t] = "", f12[t]]; 

    Print[\*""\!\(f\_12\)[t] = "", FullSimplify[f12[t]]]; 

    Print["  f[t] = ", FullSimplify[f[t]]]; 
Print[" "]; 

    Print[\*"" \!\(F\_1\)[s] = "", F1[s]]; 

    Print[\*"" \!\(F\_2\)[s] = "", F2[s]]; 

    Print[\*""\!\(F\_12\)[s] = \!\(\(F\_1[s] + F\_2[s]\)\/2\) = "", 
      \(F1[s] + F2[s]\)\/2]; 

    Print[\*""\!\(F\_12\)[s] = \!\(\(F\_1[s] + F\_2[s]\)\/2\) = "", 
      Together[\(F1[s] + F2[s]\)\/2]]; 

    Print[" F[s] = L[Cos[b t]] = ", F[s]]; \)

Example 11.12,  Page 427.  Find the inverse Laplace transform of   
      F(s)  =  ((3 s  +  6)/((s^2)  +  9)).

\(Clear[A, f, f1, f2, F, L1, L2, s, t]; 

    F[s_]\ \  = \ \ \(3  s\  + \ 6\)\/\(s\^2\  + \ 9\); 

    A\  = \ Expand[F[s]]; 
Print["F[s] = ", F[s]]; 

    Print["F[s] = ", A]; \)

The transform  F(s)  is a linear combination.

\(f1[t_]\  = Cos[3  t]; 
f2[t_]\  = Sin[3  t]; 

    L1[s_]\  = \ s\/\(s\^2\  + \ 9\); 
L2[s_]\  = \ 3\/\(s\^2\  + \ 9\); 

    Print[\*""\!\(f\_1\)[t] = "", f1[t]]; 

    Print[\*""\!\(f\_2\)[t] = "", f2[t]]; 

    Print[\*""\!\(L\_1\)[s] = "", L1[s]]; 

    Print[\*""\!\(L\_2\)[s] = "", L2[s]]; 

    Print[" F[s] = ", F[s]]; 

    Print[\*""Is F[s] == 3 \!\(L\_1\)[s] + 2 \!\(L\_2\)[s] ?""]; 

    Print[F[s]\  == 3\ L1[s]\  + \ 2\ L2[s], ",   ", 
      Expand[F[s]]\  == \ 3\ L1[s]\  + \ 2\ L2[s]]; \)

The inverse of  (Subscript[L, 1])  is  (Subscript[f, 1])(t) = cos(3t)  and  the inverse of  (Subscript[L, 2])  is  (Subscript[f, 2])(t) = sin(3t).  
Hence  f(t) = 3 (Subscript[f, 1])(t) + 2 (Subscript[f, 2])(t)

\(f[t_]\  = \ 3\ f1[t]\  + \ 2\ f2[t]; 

    Print[\*""f[t] = 3\!\(f\_1\)[t] + 2\!\(f\_2\)[t]""]; 

    Print["f[t] = ", f[t]]; \)

We can check this with Mathematica's  result using the LaplaceTransform package.

\(f[t_]\  = \ InverseLaplaceTransform[F[s], \ s, \ t]; 

    Print["F[s] = ", F[s]]; 
Print["f[t] = ", f[t]]; 

    Print[\*""f[t] = 3\!\(f\_1\)[t]+2\!\(f\_2\)[t] = "", 
      3  f1[t] + 2  f2[t]]; \)

GoTo Chapter 11

Section 11.6  Laplace Transforms of Derivatives and Integrals

Theorem 11.13,  Page 430.  (Differentiation of f(t))   Let  f (t)  and  f'(t)  be continuous for  0 ≤ t, and of exponential order.   Then   ℒ(f'(t))=s F (s) - f (0),  where  ℒ(f (t))=F (s).

Theorem 11.14,  Page 431.  (Integration of f(t))   Let  f (t)  and  f'(t)  be continuous for  0 ≤ t,  and of exponential order.   Then   ℒ(∫f (t) dt)= ((F (s))/s),  where  ℒ(f (t))=F (s).

Load the following Mathematica  packages. Make sure this is done only ONCE in a Mathematica session.

Get["Calculus`LaplaceTransform`"]

Example 11.13,  Page 430.	 Use Theorem 11.13 and find   ℒ((cos^2)(t))

\(Clear[f, F, Lf, LDf, s, t]; 
f[t_]\  = \ Cos[t]\^2; 

    Print[" f[t] = ", f[t]]; 
Print[" f[0] = ", f[0]]; 

    Print["f'[t] = ", \(f'\)[t]]; 

    Print["f'[t] = ", Simplify[\(f'\)[t]]]; \)

Use the fact that   ℒ(sin(2t))  =  ((- 2)/((s^4)  +  4)).

\(LDf\ \  = \ \ \(-2\)\/\(s\^2\  + \ 4\); 

    eqn\ \  = \ \ LDf\  == \ s\ Lf\  - \ f[0]; 
Print[eqn]; 

    solset\  = \ Solve[eqn, \ Lf]; 
Print[solset]; 

    Lf\  = \ solset[[1, 1, 2]]; 

    Print["L[f'[t]] = ", LDf]; 

    Print["L[f'[t]] = s L[f[t]] - f[0]"]; 
Print[" L[f[t]] = ", Lf]; 
    
Print[" L[f[t]] = ", Simplify[Lf]]; \)

We can check this with Mathematica's  result using the LaplaceTransform package.

\(F[s_]\  = \ LaplaceTransform[f[t], \ t, \ s]; 

    Print["   f[t] = ", f[t]]; 
Print["L[f[t]] = ", F[s]]; \)

Example 11.14,  Page 431.	 Use Theorem 11.14 and find  ℒ(f(t)).
(a)  Find   ℒ(t2).

\(Clear[f, F, Lf, LDf, s, t]; 
f[t_]\  = \ t\^2; 

    Print[" f[t] = ", f[t]]; \)

Use the fact that   \(\(f\^'\)\)(t)  =  2t  and  ℒ(2t)  =  (2/((s^2))).

\(LDf\ \  = \ 2\/s\^2; 
Lf\  = \ \ LDf\/s; 

    Print["      f'[t] = ", \(f'\)[t]]; 

    Print["   L[f'[t]] = ", LDf]; 

    Print[\*""L[∫f'[t]\[DifferentialD]t] = L[f'[t]]/s""]; 
Print["L[∫f'[t]\[DifferentialD]t] = ", Lf]; 

    Print["    L[f[t]] = ", Lf]; \)

We can check this with Mathematica's  result using the LaplaceTransform package.

\(F[s_]\  = \ LaplaceTransform[f[t], \ t, \ s]; 

    Print["   f[t] = ", f[t]]; 
Print["L[f[t]] = ", F[s]]; \)

(b)  Find   ℒ((t^3)).

\(Clear[f, F, Lf, LDf, s, t]; 
f[t_]\  = \ t\^3; 

    Print[" f[t] = ", f[t]]; \)

Use the fact that   \(\(f\^'\)\)(t)  =  3(t^2)  and  ℒ(3(t^2))  =  (6/((s^3))).

\(LDf\ \  = \ 6\/s\^3; 
Lf\  = \ \ LDf\/s; 

    Print["      f'[t] = ", \(f'\)[t]]; 

    Print["   L[f'[t]] = ", LDf]; 

    Print[\*""L[∫f'[t]\[DifferentialD]t] = L[f'[t]]/s""]; 
Print["L[∫f'[t]\[DifferentialD]t] = ", Lf]; 

    Print["    L[f[t]] = ", Lf]; \)

We can check this with Mathematica's  result using the LaplaceTransform package.

\(F[s_]\  = \ LaplaceTransform[f[t], \ t, \ s]; 

    Print["   f[t] = ", f[t]]; 
Print["L[f[t]] = ", F[s]]; \)

Example 11.15,  Page 432.	 Solve the initial value problem
     (y^(''))(t)  +  y(t)  =  0    with    y(0) = 2  and  \(\(y\^'\)\)(0) = 3.

\(Clear[eqn, f, F, s, solset, t, y, y0, y1, Y]; 
y0\  = \ 2; 

    y1\  = \ 3; 
f[t_]\  = \ 0; 
F[s_]\  = \ 0; 

    Print[" y[0] = ", y0]; 
Print["y'[0] = ", y1]; 

    Print[" f[t] = ", f[t]]; 
Print[" F[s] = ", F[s]]; \)

\(Clear[Y]; 

    eqn\ \  = \ \ s\^2\ Y[s]\  - \ s\ y0\  - \ y1\  + \ Y[s]\  == \ F[s]; 

    Print[eqn]; 
solset\  = \ Solve[eqn, \ Y[s]]; 
Print[solset]; 

    Y[s_]\  = \ solset[[1, 1, 2]]; 

    Print["Y[s] = ", Y[s]]; 
Print["Y[s] = ", Expand[Y[s]]]; \)

Using the known Laplace transforms  ℒ(sin t) = (1/((s^2) + 1))  and  ℒ(cos t) = (s/((s^2) + 1))
the solution is the linear combination   f(t)  =  3 sin(t)  +  2 cos(t).

We can check this with Mathematica's  result using the LaplaceTransform package.

\(f[t_]\  = \ InverseLaplaceTransform[Y[s], \ s, \ t]; 

    Print["Y[s] = ", Expand[Y[s]]]; 
Print["f[t] = ", f[t]]; \)

\(Print["f[t] = ", f[t]]; 
Print["f''[t] = ", \(\(f'\)'\)[t]]; 

    Print["f[t] + f''[t] = ", f[t] + \(\(f'\)'\)[t]]; 

    Print["f[0] = ", f[0]]; 
Print["f'[0] = ", \(f'\)[0]]; \)

We can check this with Mathematica's  result using the DSolve package.

\(Clear[y]; 
eqn\  = \ \(\(y'\)'\)[t]\  + \ y[t]\  == \ 0; 
Print[eqn]; 
    
solset\  = \ DSolve[{eqn, \ y[0] == 2, \ \(y'\)[0] == 3}, \ y[t], \ t]; 
    
Print[solset]; 

    y[t_]\  = \ solset[[1, 1, 2]]; 

    Print["y[t] = ", y[t]]; \)

\(Clear[t, y]; 
y[t_]\  = \ 2\ Cos[t] + 3\ Sin[t]; 

    Plot[y[t], {t, 0, π}, 
PlotRange -> {{0, π}, {\(-2\), 3.7}}, 
      PlotStyle -> {RGBColor[0, 0, 1]}, 
      AxesLabel -> {"t", "y"}, 
      Ticks -> {Range[0, π, π\/4], Range[\(-2\), 3.5, 1]}]; 

    Print["y[t] = ", y[t]]; \)

Example 11.16,  Page 432.	 Solve the initial value problem
     (y^(''))(t)  +  \(\(y\^'\)\)(t)  -  2 y(t) =  0    with    y(0) = 1  and  \(\(y\^'\)\)(0) = 4.

\(Clear[eqn, f, F, s, solset, t, y, y0, y1, Y]; 
y0\  = \ 1; 

    y1\  = \ 4; 
f[t_]\  = \ 0; 
F[s_]\  = \ 0; 

    Print[" y[0] = ", y0]; 
Print["y'[0] = ", y1]; 

    Print[" f[t] = ", f[t]]; 
Print[" F[s] = ", F[s]]; \)

\(Clear[Y]; 

    eqn\ \  = \ 
      s\^2\ Y[s]\  - \ s\ y0\  - \ y1\  + \ s\ Y[s]\  - \ y0\  - \ 2\ Y[s]\ 
         == \ F[s]; 
Print[eqn]; 
solset\  = \ Solve[eqn, \ Y[s]]; 

    Print[solset]; 

    Y[s_]\  = \ solset[[1, 1, 2]]; 

    Print["Y[s] = ", Y[s]]; 
Print["Y[s] = ", Apart[Y[s]]]; \)

Using the known Laplace transforms  ℒ((e^t)) = (1/(s - 1)) and  ℒ((e^(-2 t))) = (1/(s + 2))
the solution is the linear combination  f(t)  =  2 (e^t) - (e^(-2 t)).

We can check this with Mathematica's  result using the LaplaceTransform package.

\(f[t_]\  = \ InverseLaplaceTransform[Y[s], \ s, \ t]; 

    Print["Y[s] = ", Apart[Y[s]]]; 
Print["f[t] = ", f[t]]; \)

\(Print["f[t] = ", f[t]]; 
Print["f'[t] = ", \(f'\)[t]]; 

    Print["f''[t] = ", \(\(f'\)'\)[t]]; 

    Print["f''[t] + f'[t] - 2f[t] = ", 
      \(\(f'\)'\)[t] + \(f'\)[t] - 2  f[t]]; 

    Print["f''[t] + f'[t] - 2f[t] = ", 
      Expand[\(\(f'\)'\)[t] + \(f'\)[t] - 2  f[t]]]; 

    Print["f[0] = ", f[0]]; 
Print["f'[0] = ", \(f'\)[0]]; \)

We can check this with Mathematica's  result using the DSolve package.

\(Clear[y]; 

    eqn\  = \ \(\(y'\)'\)[t]\  + \ \(y'\)[t] - \ 2  y[t]\  == \ 0; 

    Print[eqn]; 

    solset\  = \ DSolve[{eqn, \ y[0] == 1, \ \(y'\)[0] == 4}, \ y[t], \ t]; 

    Print[solset]; 

    y[t_]\  = \ solset[[1, 1, 2]]; 

    Print["y[t] = ", y[t]]; 
Print["y[t] = ", Expand[y[t]]]; \)

\(Clear[t, y]; 

    y[t_]\  = \ \(-E\^\(\(-2\)\ t\)\) + 2\ E\^t; 
    
Plot[y[t], {t, 0, 2}, 
PlotRange -> {{0, 2}, {0, 15}}, 
      PlotStyle -> {RGBColor[0, 0, 1]}, 
      AxesLabel -> {"t", "y"}, 
      Ticks -> {Range[0, 2, 0.5], Range[0, 15, 2.5]}]; 
    Print["y[t] = ", y[t]]; \)

GoTo Chapter 11

Section 11.7  Shifting Theorems and the Step Function

Theorem 11.15,  Page 434.   (Shifting the Variable  s)   If  F (s)  is the Laplace transform of  f (t),  then  ℒ((e^at)f(t))=F (s - a).

Theorem 11.16,  Page 434.   (Shifting the Variable  t)   If  F (s)  is the Laplace transform of  f (t),  and  0 ≤ a,  then  ℒ((Subscript[U, a])(t)f(t - a))=(e^(-as))F(s).

Load the following Mathematica  packages.  Make sure this is done only ONCE in a Mathematica session.

Get["Calculus`LaplaceTransform`"]

Example 11.17,  Page 435.	 Use Theorem 11.15 and find  ℒ((t^n)(e^at)).
Solution.  Use the fact that  ℒ((t^n))=((n!)/((s^(n + 1)))).

\(Clear[a, F, G, n, s]; 
F[s_]\  = \ \(n!\)\/s\^\(n + 1\); 

    Print[\*""L[\!\(t\^n\)] = "", F[s]]; 

    Print[\*""L[\!\(t\^n\)\!\(E\^\(a\\ t\)\)] = "", 
      F[s - a]]; 

    Print[\*""L[\!\(t\^n\)\!\(E\^\(a\\ t\)\)] = "", 
      FunctionExpand[F[s - a]]]; \)

We can check this with Mathematica's  result using the LaplaceTransform package.

\(G[s_]\  = \ 
      LaplaceTransform[t\^n\ E\^\(a\ t\), \ t, \ s]; 

    Print[\*""L[\!\(t\^n\)\!\(E\^\(a\\ t\)\)] = "", 
      G[s]]; \)

Example 11.18,  Page 435.	 Use Theorem 11.16 and find   ℒ((Subscript[U, c])(t)).
Solution:  Let  f(t) = 1  and  F(s)  =  (1/s).

\(Clear[c, f, F, g, G, n, s, t]; 
f[t_]\  = \ 1; 
F[s_]\  = \ 1\/s; 

    Print["        f[t] = ", f[t]]; 
Print["     L[f[t]] = ", F[s]]; 
    
Print[\*""L[\!\(U\_c\)[t]f[t]] = "", 
      \(\(E\ \)\^\(\(-c\)\ s\)\) F[s]]; \)

We can check this with Mathematica's  result using the LaplaceTransform package.
For illustration purposes we use  c = π.

\(g[t_]\  = \ UnitStep[t - π]; 

    G[S_]\  = \ LaplaceTransform[UnitStep[t - π], \ t, \ s]; 

    Print["    g[t] = ", g[t]]; 

    Print[\*""L[\!\(U\_π\)[t]] = "", G[s]]; \)

Example 11.19,  Page 435.	 Find  ℒ(f(t))  for  f(t)  given in Figure 11.24.

\(Clear[f, F, s, t]; 

    f[t_]\  = \ 
      1\  - \ UnitStep[t - 1]\  + \ UnitStep[t - 2]\  - 
\ \ \ \ \ \ \ \ 
        UnitStep[t - 3]\  + \ UnitStep[t - 4]\  - \ UnitStep[t - 5]; 

    Plot[f[t], \ {t, 0, 6}, Ticks -> {Range[0, 6, 1], Range[0, 1, 1]}, 
      PlotStyle -> {RGBColor[0, 0, 1]}, 
      AxesLabel -> {"t", "y"}, \ AspectRatio -> 1\/6]; 

    Print["f[t] = ", f[t]]; \)

Use Mathematica's LaplaceTransform package.

\(F[s_]\  = \ LaplaceTransform[f[t], \ t, \ s]; 

    Print["f[t] = ", f[t]]; 
Print["F[s] = ", F[s]]; \)

Example 11.20,  Page 436.	 Solve the initial value problem
     (y^(''))(t)  +  y(t)  =  (Subscript[U, π])(t)    with    y(0) = 0  and  y'(0) = 0.

\(Clear[eqn, f, F, s, solset, t, y, y0, y1, Y]; 
y0\  = \ 0; 

    y1\  = \ 0; 
f[t_]\  = UnitStep[t - π]; 

    F[s_]\  = \ E\^\(\(-π\)\ s\)\/s; 

    Print[" y[0] = ", y0]; 
Print["y'[0] = ", y1]; 

    Print[" f[t] = ", f[t]]; 
Print[" F[s] = ", F[s]]; \)

\(Clear[Y]; 

    eqn\ \  = \ s\^2\ Y[s]\  - \ s\ y0\  - \ y1\  + \ Y[s]\  == \ F[s]; 

    Print[eqn]; 
solset\  = \ Solve[eqn, \ Y[s]]; 
Print[solset]; 

    Y[s_]\  = \ solset[[1, 1, 2]]; 

    Print["Y[s] = ", Y[s]]; 

    Y[s_]\  = \ 
      E\^\(\(-π\)\ s\)\ 
        Apart[1\/\(s\ \((1\  + \ s\^2)\)\)]; 
Print["Y[s] = ", Y[s]]; 

    Print["Y[s] = ", Expand[Y[s]]]; \)

Use the facts that    ℒ((Subscript[U, π])(t))  = (((e^(-πs)))/s)  and   ℒ((Subscript[U, π])(t)cos(t - π))  = (( s (e^(-πs)))/(1  +  (s^2)))

\(y[t_]\  = \ 
      UnitStep[t - π]\  - \ UnitStep[t - π] Cos[t - π]; 

    Print["y[t] = ", y[t]]; \)

We can check this with Mathematica's  result using the DSolve package.

\(Clear[y]; 

    eqn\  = \ \(\(y'\)'\)[t]\  + \ y[t]\  == \ UnitStep[t - π]\)sol  =  DSolve[{eqn,  y[0] == 0,  y'[0] == 0},  y[t],  t]\(y[t_]\  = \ Expand[sol[\([1, 1, 2]\)]\ ]; 
Print["y[t] = ", y[t]]; 
    \)

\(Clear[t, y]; 

    y[t_]\  = \ UnitStep[\(-π\) + t] + Cos[t]\ UnitStep[\(-π\) + t]; 
    
Plot[y[t], {t, 0, 2  π}, PlotRange -> {{0, 2  π}, {0, 2}}, 
      PlotStyle -> {RGBColor[0, 0, 1]}, 
      AxesLabel -> {"t", "y"}, 
      Ticks -> {Range[0, 2  π, π\/2], Range[0, 2, 0.5]}]; 

    Print["y[t] = ", y[t]]; \)

This differs from the traditional mathematics solution by including a dirac function term.

GoTo Chapter 11

Section 11.8  Multiplication  and  Division  by  t

Theorem 11.17,  Page 438.   (Multiplication by t)  If  F (s)  is the Laplace transform of  f (t),  then  ℒ(t f (t))=- F'(s).

Theorem 11.18,  Page 438.   (Division by t)    Let both  f (t)  and  ((f (t))/t)  have Laplace transforms and let  F (s)  denote the Laplace transform of  f (t).   If   (lim_(\(t -> \(0\^+\)\)))((f (t))/t)   exists
then   ℒ(((f (t))/t))=(∫_s^∞)F (σ) dσ.

Load the following Mathematica  packages. Make sure this is done only ONCE in a Mathematica session.

Get["Calculus`LaplaceTransform`"]

Example 11.21,  Page 439.	 Use Theorem 11.17 and find   ℒ(t cos(b t)).

Solution:  Use the fact that   ℒ(cos(bt))  = (s/((s^2)  +  (b^2))).

\(Clear[b, f, F, s, t]; 
f[t_]\  = \ Cos[b\ t]; 

    F[s_]\  = \(\ s\)\/\(s\^2\  + \ b\^2\); 

    Print["     f[t] = ", f[t]]; 
Print["  L[f[t]] = ", F[s]]; 

    Print[" "]; 
Print["   t f[t] = ", t\ f[t]]; 

    Print["L[t f[t]] = - F'[s]"]; 
Print["L[t f[t]] = ", \(F'\)[s]]; 
    
Print["L[t f[t]] = ", Together[\(F'\)[s]]]; \)

We can check this with Mathematica's  result using the LaplaceTransform package.

\(Ft[s_]\  = \ Together[LaplaceTransform[t\ f[t], \ t, \ s]\ ]; 

    Print["   t f[t] = ", t\ f[t]]; 
Print["L[t f[t]] = ", Ft[s]]; 
    \)

Example 11.22,  Page 439.	 Use Theorem 11.18 and find   ℒ( ((sin (t))/t)).
Solution: Use the fact that   ℒ(sin(t))  =  (1/((s^2)  +  1)).

\(Clear[f, F, s, t, Y]; 
f[t_]\  = \ Sin[t]; 

    F[s_]\  = \ 1\/\(s\^2\  + \ 1\); 

    Y[s_]\  = \ 
      Integrate[F[r], {r, s, ∞}, 
        Assumptions -> {Im[s] == 0, s > 0}]; 

    Print["    f[t] = ", f[t]]; 
Print["     F[s]= ", F[s]]; 

    Print[" "]; 
Print[\*""   f[t]/t = "", f[t]\/t]; 

    Print[\*""L[f[t]/t] = (∫_s^∞)F[r]\[DifferentialD]r""]; 
Print[\*""L[f[t]/t] = "", Y[s]]; \)

We can check this with Mathematica's  result using the LaplaceTransform package.

\(Y[s_]\  = \ LaplaceTransform[f[t]\/t, \ t, \ s]; 

    Print[\*""   \!\(f[t]\/t\) = "", f[t]\/t]; 

    Print[\*""L[\!\(f[t]\/t\)] = "", Y[s]]; \)

Example 11.23,  Page 439.	 Solve the initial value problem
     t (y^(''))(t)  -  t \(\(y\^'\)\)(t)  -  y(t)  =  0    with    y(0) = 0  and  \(\(y\^'\)\)(0) = 0.

\(Clear[eqn, f, F, Ly, s, solset, t, y, y0, Y]; 
y0\  = \ 0; 

    f[t_]\  = 0; 
F[s_]\  = 0; 
Print[" y[0] = ", y0]; 

    Print[" f[t] = ", f[t]]; 
Print[" F[s] = ", F[s]]; \)

\(Clear[Y]; 

    eqn\ \  = \ \ 
      \((\(-\ s\^2\) \(Y'\)[s]\  - \ 2\ s\ Y[s]\  + \ y0)\)\  - 
          \((\(-\ s\)\ \(Y'\)[s]\  - \ Y[s])\)\  - \ Y[s]\ \  == \ F[s]; 

    Print[eqn]; 
solset\  = \ DSolve[eqn, \ Y[s], s]; 
Print[solset]; 

    Y[s_]\  = \ solset[[1, 1, 2]]; 

    y[t_]\  = \ InverseLaplaceTransform[Y[s], \ s, \ t]; 

    Ly\  = \ t\ \(\(y'\)'\)[t]\  - \ t\ \(y'\)[t]\  - \ y[t]; 

    Print["Y[s] = ", Y[s]]; 
Print[" "]; 

    Print["y[t] = ", y[t]]; 
Print["y'[t] = ", \(y'\)[t]]; 

    Print["y''[t] = ", \(\(y'\)'\)[t]]; 
Print[" "]; 

    Print["t y''[t] - t y'[t] - y[t] = ", Ly]; 

    Print["t y''[t] - t y'[t] - y[t] = ", Expand[Ly]]; \)

\(Clear[t, y]; 
y[t_]\  = \ t\ E\^t; 

    Plot[y[t], {t, 0, 1}, PlotRange -> {{0, 1}, {0, 3}}, 
      PlotStyle -> {RGBColor[0, 0, 1]}, 
      AxesLabel -> {"t", "y"}, 
      Ticks -> {Range[0, 1, 0.25], Range[0, 3, 0.5]}]; 

    Print["y[t] = ", y[t]]; \)

GoTo Chapter 11

Section 11.9  Inverting the Laplace Transform

Theorem 11.19,  Page 441.  (Nonrepeated Linear Factors)  Let  P (s)  be a poynomial of degree at most  n - 1.  If  Q (s)  has degree n,  and has distinct complex roots  (Subscript[a, 1]),(Subscript[a, 2]),⋯,(Subscript[a, n]),  then
	Y (s)=((P (s))/(Q (s)))=((P (s))/((s - (Subscript[a, 1])) (s - (Subscript[a, 2])) ⋯ 
                  (s - (Subscript[a, n]))))= (∑_(k = 1)^n)((Res[Y, (Subscript[a, k])])/(s  -  (Subscript[a, k]))).

Theorem 11.20,  Page 441.  (A Repeated Linear Factors)  If  P (s)  and Q (s)  are polynomials of degree  μ   and  ν,  respectively and  μ < ν + n  and  Q (a) ≠ 0,  then
	Y (s)=((P (s))/((((s - a))^n)Q(s)))= (∑_(k = 1)^n)((Subscript[A, k])/(((s - a))^k)) + R (s),
where  R (s)  is the sum of all partial fractions that do not involve factors of the form  (((s - a))^j).  Furthermore, the coefficients  (Subscript[A, k])  can be computed with the formula
	(Subscript[A, k])=(1/((n  -  k)!))(lim_(s -> a))(∂_({s, n - k}))((P (s))/(Q (s)))   for   k = 1, 2, ⋯, n. 

Theorem 11.21,  Page 442.  (Irreducible Quadratic Factors)  Let  P (s)  and  P (s)  be polynomials with real coefficients such that the degree of  P (s)  is at most  1  larger than the degree of  Q (s).   If  T (s)  does not have a factor of the form  (((s - a))^2) + (b^2),  then
	Y (s)=((P (s))/(Q (s)))=((P (s))/(((((s - a))^2) + (b^2) )T(s)))=((2 A (s  -  a ) -  2 B b)/((((s  -  a ))^2)   +   (b^2))) + R (s),
where  A  + i B=((P (a  +  i b))/(Q'(a  +  i b))).

Theorem 11.22,  Page 445.  (Inverse Laplace Transform)  Let  F (s)=((P (s))/(Q (s))),  where  P (s)  and  Q (s)  are polynomials of degree m  and  n, respectively, and  n > m.  The inverse Laplace transform of  F (s)  is given by
	f (t)=(ℒ^(-1))(F(s))= ∑ Res[F(s)(e^(s t)),(Subscript[s, k])],
where the sum is taken over all the residues of the complex function  F(s)(e^(s t)).

Theorem 11.23,  Page 446.  (Heaviside Expansion Theorem)  Let  P (s)  and  Q (s)  be polynomials of degree m  and  n, respectively, where  n > m.   If  Q (s)  has  n  distinct simple zeros at the points  (Subscript[s, 1]),(Subscript[s, 2]),⋯,(Subscript[s, n]),  then  ((P (s))/(Q (s)))  is the Laplace transform of the function  f (t)  given by
	f (t)=(ℒ^(-1))(((P (s))/(Q (s))))= (∑_(k = 1)^n)((P((Subscript[s, k])))/(Q'((Subscript[s, k]))))(e^((Subscript[s, k]) t)).

Load the following Mathematica  packages.  Make sure this is done only ONCE in a Mathematica  session.

Get["Calculus`LaplaceTransform`"]

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

\(Clear[a1, a2, a3, b1, F, PQ, Pr, s, Y]; 

    Y[s_]\  = \ \(s\^3\  - \ 4  s\  + \ 1\)\/\(s \((s - 1)\)\^3\); 

    Print["Y[s] = ", Y[s]]; 
Print["Y[s] = ", Apart[Y[s]]]; \)

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

\(PQ\  = \ \(s\^3\  - \ 4  s\  + \ 1\)\/s; 

    a3\  = \ Limit[PQ, s -> 1]; 

    a2\  = \ Limit[∂\_s\ PQ, s -> 1]; 

    a1\  = 1\/\(2!\)\ Limit[∂\_\(s, s\)PQ, s -> 1]; 

    Print[\*""\!\(a\_3\) = \!\(lim\+\(s -> 1\)\) "", PQ, 
      " = ", a3]; 

    Print[\*""\!\(a\_2\) = \!\(lim\+\(s -> 1\)\) "", 
      Together[∂\_s\ PQ], " = ", a2]; 

    Print[\*""\!\(a\_1\) = \!\(lim\+\(s -> 1\)\) "", 
      Together[∂\_\(s, s\)PQ], " = ", a1]; \)

At  s = 0, we compute as follows:

\(PR\  = \ \(s\^3\  - \ 4  s\  + \ 1\)\/\((s - 1)\)\^3; 

    b1\  = \ Limit[PR, s -> 0]; 

    Print[\*""\!\(b\_1\) = \!\(lim\+\(s -> 0\)\) "", PR, 
      " = ", b1]; \)

The partial fraction expansion is:

\(F[s_]\  = 
      \(\ a3\)\/\((s\  - \ 1)\)\^3\  + \(\ a2\)\/\((s\  - \ 1)\)\^2 + \ 
        a1\/\(s\  - \ 1\)\  + \(\ b1\)\/s; 
Print["F[s] = ", F[s]]; \)

Or we can use Mathematica's  command to find the partial fraction expansion.

Print["Y[s] = ", Apart[Y[s]]];

Using the table of Laplace transforms, the solution is:

\(For[i = 1, i ≤ 4, \(i++\), 
      Yi\  = \ \(Apart[Y[s]]\)[\([i]\)]; 

      yi\  = \ InverseLaplaceTransform[\(Apart[Y[s]]\)[\([i]\)], \ s, \ t]; 

      Print[Yi, "          ", yi]]; 

    y[t_]\  = \ 
      \(-\ t\^2\)\ E\^t\  + \ t\ E\^t\  + \ 
        2\ E\^t\  - \ 1; 
Print["y[t] = ", y[t]]; \)

We can check this with Mathematica's  result using the InverseLaplaceTransform package.

\(y[t_]\  = \ InverseLaplaceTransform[Y[s], \ s, \ t]; 

    Print["Y[s] = ", Apart[Y[s]]]; 
Print["y[t] = ", y[t]]; \)

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

\(Clear[a1, a2, A1, A2, b1, b2, B1, B2, F, F1, F2, i, res1, res2, s, Y, 
      Yi, z1, z2]; 
Y[s_]\  = \ \(5  s\)\/\(\((s\^2 + 4)\) \((s\^2 + 9)\)\); 
    
Print["Y[s] = ", Y[s]]; 
Print["Y[s] = ", Apart[Y[s]]]; \)

The simple poles in the upper half plane occur at  (Subscript[z, 1]) = 2i  and  (Subscript[z, 2]) = 3i.

\(z1\  = \ 2  I; 
z2\  = \ 3  I; 

    res1\  = \ Residue[Y[s], {s, z1}]; 
res2\  = \ Residue[Y[s], {s, z2}]; 

    Print["Res[Y[s],", z1, "] = ", res1]; 

    Print["Res[Y[s],", z2, "] = ", res2]; \)

\(a1\  = \ Re[z1]; 
b1\  = \ Im[z1]; 
A1\  = \ Re[res1]; 

    B1\  = \ Im[res1]; 
a2\  = \ Re[z2]; 
b2\  = \ Im[z2]; 

    A2\  = \ Re[res2]; 
B2\  = \ Im[res2]; 

    F1[s_]\  = 
      \((2\ A1 \((s\  - \ a1)\)\  - \ 2\ B1\ b1)\)\/\((
          \((s\  - \ a1)\)\^2\  + \ b1\^2)\); 

    F2[s_]\  = 
      \((2\ A2 \((s\  - \ a2)\)\  - \ 2\ B2\ b2)\)\/\((
          \((s\  - \ a2)\)\^2\  + \ b2\^2)\); 
Print["F1[s] = ", F1[s]]; 
    
Print["F2[s] = ", F2[s]]; 

    Print[" F[s] = ", F1[s]\  + \ F2[s]]; \)

The partial fraction expansion for  Y(s)  is:

Print["Y[s] = ", Apart[Y[s]]];

Using the table of Laplace transforms, the answer is:

\(For[i = 1, i ≤ 2, \(i++\), 
      Yi\  = \ \(Apart[Y[s]]\)[\([i]\)]; 

      yi\  = \ InverseLaplaceTransform[\(Apart[Y[s]]\)[\([i]\)], \ s, \ t]; 

      Print[Yi, "          ", yi]]; 

    y[t_]\  = \ Cos[2  t]\  - \ Cos[3  t]; 
Print["y[t] = ", y[t]]; \)

We can check this with Mathematica's  result using the InverseLaplaceTransform package.

\(y[t_]\  = \ InverseLaplaceTransform[Y[s], \ s, \ t]; 

    Print["Y[s] = ", Apart[Y[s]]]; 
Print["y[t] = ", y[t]]; 

    Print["y[t] = ", Expand[y[t]]]; \)

Example 11.26,  Page 444.  Find the inverse Laplace transform of:
      Y(s) = (((s^3) +  (s^2) - s + 1)/(s (((s + 1))^2) ((s^2) + 1))).

\(Clear[i, s, t, y, Y, Yi]; 

    Y[s_]\  = \ 
      \(s\^3 + 3  s\^2 - s + 1\)\/\(s \(\((s + 1)\)\^2\) \((s\^2 + 1)\)\); 

    Print["Y[s] = ", Y[s]]; 
Print["Y[s] = ", Apart[Y[s]]]; \)

Using the table of Laplace transforms, the answer is:

\(For[i = 1, i ≤ 4, \(i++\), 
      Yi\  = \ \(Apart[Y[s]]\)[\([i]\)]; 

      yi\  = \ InverseLaplaceTransform[\(Apart[Y[s]]\)[\([i]\)], \ s, \ t]; 

      Print[Yi, "          ", yi]]; 

    y[t_]\  = \ 
      1\  - \ 2\ t\ E\^\(-t\) - \ 2\ E\^\(-t\) + 
        \ Sin[t]\  + \ Cos[t]; 
Print["y[t] = ", y[t]]; \)

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

\(Clear[eqn1, eqn2, s, solset, t, x, x0, X, y, y0, Y]; 
x0\  = \ 2; 

    y0\  = \ 1; 

    eqn1\ \  = \ \ s\ Y[s]\  - \ y0\ \  == \ \ \ Y[s]\  - \ X[s]; 

    eqn2\ \  = \ \ s\ X[s]\  - \ x0\ \  == \ \ 5  Y[s]\  - \ 3  X[s]; 

    Print["x[0] = ", x0]; 
Print["y[0] = ", y0]; 
Print[eqn1]; 

    Print[eqn1]; 
solset\  = \ Solve[{eqn1, eqn2}, \ {X[s], Y[s]}]; 

    Print[solset]; 

    X[s_]\  = \ solset[[1, 1, 2]]; 

    Y[s_]\  = \ solset[[1, 2, 2]]; 

    y[t_]\  = \ InverseLaplaceTransform[Y[s], \ s, \ t]; 

    x[t_]\  = \ InverseLaplaceTransform[X[s], \ s, \ t]; 

    Print["X[s] = ", X[s]]; 
Print["Y[s] = ", Y[s]]; 

    Print[" "]; 
Print["x[t] = ", x[t]]; 

    Print["y[t] = ", y[t]]; 
Print[" "]; 

    Print["        y'[t] = ", \(y'\)[t]]; 

    Print["  y[t] - x[t] = ", Expand[y[t] - x[t]]\ ]; 
Print[" "]; 

    Print["        x'[t] = ", \(x'\)[t]]; 

    Print["5y[t] - 3x[t] = ", Expand[5  y[t]\  - \ 3  x[t]]]; \)

We can check this with Mathematica's  result using the DSolve package.

\(Clear[eqn1, eqn2, solset, t, x, y]; 

    eqn1\  = \ \(y'\)[t]\  == \ \ y[t]\  - \ x[t]; 

    eqn2\  = \ \(x'\)[t]\  == \ 5  y[t]\  - \ 3  x[t]; 
Print[eqn1]; 

    Print[eqn1]; 

    solset\  = \ 
      DSolve[{eqn1, eqn2, \ x[0] == 2, \ y[0] == 1}, \ 

        \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {y[t], \ x[t]}, \ t]; 

    Print[solset]; 

    y[t_]\  = \ 
      FullSimplify[solset[[1, 1, 2]]]; 

    x[t_]\  = \ 
      FullSimplify[solset[[1, 2, 2]]]; 

    Print[" "]; 
Print["x[t] = ", x[t]]; 

    Print["y[t] = ", y[t]]; 
Print[" "]; 

    Print["        y'[t] = ", \(y'\)[t]]; 

    Print["  y[t] - x[t] = ", Expand[y[t] - x[t]]\ ]; 
Print[" "]; 

    Print["        x'[t] = ", \(x'\)[t]]; 

    Print["5y[t] - 3x[t] = ", Expand[5  y[t]\  - \ 3  x[t]]]; \)

\(ParametricPlot[{x[t], y[t]}, {t, 0, 5}, 
      PlotRange -> {{\(-0.1\), 2}, {\(-0.1\), 1}}, 
      PlotStyle -> {RGBColor[0, 0, 1]}, 
      AxesLabel -> {"x", "y"}, 
      Ticks -> {Range[0, 2, 0.5], Range[0, 1, 0.25]}]; 

    Print["x[t] = ", x[t]]; 
Print["y[t] = ", y[t]]; \)

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

\(Clear[F, P, Q, s, solset, s1, s2, s3]; 
P[s_]\  = \ 4  s\  + \ 3; 

    Q[s_]\  = \ s\^3\  + \ 2  s\^2\  + \ s\  + \ 2; 
F[s_]\  = \ P[s]\/Q[s]; 
    
Print["P[s] = ", P[s]]; 
Print["Q[s] = ", Q[s]]; 

    Print["F[s] = ", F[s]]; \)

\(solset\  = \ Solve[Q[s] == 0, s]; 

    s1\  = \ solset[[1, 1, 2]]; 

    s2\  = \ solset[[2, 1, 2]]; 

    s3\  = \ solset[[3, 1, 2]]; 

    Print["Q[s] = ", Q[s]]; 
Print["Q[s] = ", Factor[Q[s]]]; 

    Print["The roots of Q[s] are:"]; 
Print[solset]; 

    Print[\*""\!\(s\_1\) = "", s1]; 

    Print[\*""\!\(s\_2\) = "", s2]; 

    Print[\*""\!\(s\_3\) = "", s3]; \)

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

\(Print[\*""P[-2]/(Q')[-2] = "", 
      P[\(-2\)]\/\(Q'\)[\(-2\)]]; 

    Print[\*""P[I]/(Q')[I] = "", 
      P[I]\/\(Q'\)[I]]; 

    Print[\*""P[-I]/(Q')[-I] = "", P[\(-I\)]\/\(Q'\)[\(-I\)]]; \)

\(f[t_]\  = 
      P[\(-2\)]\/\(Q'\)[\(-2\)]\ E\^\(\(-2\) t\) + 
        P[I]\/\(Q'\)[I]\ 
          E\^\(I\ t\) + 
        P[\(-I\)]\/\(Q'\)[\(-I\)]\ 
          E\^\(\(-I\)\ t\); 

    Print["f[t] = ", f[t]]; 
Print["f[t] = ", ComplexExpand[f[t]]]; 
    \)

We can check this with Mathematica's  result using the InverseLaplaceTransform package.

\(f[t_]\  = \ InverseLaplaceTransform[F[s], \ s, \ t]; 

    Print["F[s] = ", Apart[F[s]]]; 
Print["f[t] = ", f[t]]; \)

GoTo Chapter 11

Section 11.10  Convolution

Theorem 10.24,  Page 448.  (Convolution Theorem)  Let  F (s)  and  G (s)  denote the Laplace transforms of  f (t)  and  g (t),  respectively.  Then the product  H (s) =F (s) G (s)  is the Laplace transform of the convolution of  f (t)  and  g (t),  and is denoted by  h (t) = (f*g) (t),  and has the integral representation 
h (t)=(f*g) (t)= (∫_0^t)f (τ) g (t  -  τ) 
                dτ,  orh (t)=(g*f) (t)= (∫_0^t)g (τ) f (t  -  τ) 
              dτ.

Load the following Mathematica  packages.  Make sure this is done only ONCE in a Mathematica  session.

Get["Calculus`LaplaceTransform`"]

Example 11.29,  Page 449.  Use convolution to find the inverse Laplace transform of 
      H(s)  = ((2 s)/(((((s^2)  +  1))^2))).
Solution:  H(s) is the product of  F(s)  =  (1/((s^2)  +  1))  and  G(s)  =  ((2 s)/((s^2)  +  1)), 
which arethe Laplace transfoms of   f(t) = sin(t)  and  g(t) = 2 cos(t),  respectively.

\(Clear[f, F, g, G, h, H, int, s, t, τ, val]; 

    F[s_]\  = \ 1\/\(s\^2\  + \ 1\); 

    G[s_]\  = \ \(2  s\)\/\(s\^2\  + \ 1\); 

    H[s_]\  = \ \(2  s\)\/\((s\^2\  + \ 1)\)\^2; 

    Print["    F[s] = ", F[s]]; 
Print["    G[s] = ", G[s]]; 

    Print["F[s]G[s] = ", F[s] G[s]]; 
Print["    H[s] = ", H[s]]; 
    \)

\(f[t_]\  = \ Sin[t]; 
g[t_]\  = \ 2\ Cos[t]; 

    int\  = \ ∫f[t - τ] g[τ] \[DifferentialD]τ; 

    h[t_]\  = \ 
      ∫\_0\%t f[t - τ] g[τ] \[DifferentialD]τ; 

    Print["      f[t] = ", f[t]]; 
Print["      g[t] = ", g[t]]; 

    Print["f[t-τ]g[τ] = ", f[t - τ] g[τ]]; 

    Print["∫f[t-τ]g[τ]\[DifferentialD]τ = ", 
      int]; 
Print[
      "∫f[t-τ]g[τ]\[DifferentialD]τ = ", 
      Expand[int]]; 

    Print[\*""         h[t] = (∫_0^t)f[t-τ]g[τ]\[DifferentialD]τ""]; 
Print["         h[t] = ", h[t]]; \)

We can check this with Mathematica's  result using the InverseLaplaceTransform package.

\(h[t_]\  = \ InverseLaplaceTransform[H[s], \ s, \ t]; 

    Print["H[s] = ", H[s]]; 
Print["h[t] = ", h[t]]; \)

Example 11.30,  Page 450.  Use the convolution theorem to solve the integral equation
f(t) = 2 cos(t) - ∫ (t-τ)f(τ)d τ,   where the integral is taken over the interval [0,t].
Solution:  Take the Laplace transform of each of the terms and get:

\(Clear[eqn, f, F, s, solset]; 

    eqn\  = \ F[s]\  == \ \(2  s\)\/\(s\^2 + \ 1\)\  - \ \ 1\/s\^2\ F[s]; 

    solset\  = \ Solve[eqn, \ F[s]]; 
Print[eqn]; 
Print[solset]; 

    F[s_]\  = \ 
      Apart[solset[[1, 1, 2]]]; 

    Print["F[s] = ", F[s]]; \)

Using a table of Laplace transforms, the solution is:

\(f[t_]\  = \ \(-t\)\ Sin[t]\  + \ 2\ Cos[t]; 

    Print["f[t] = ", f[t]]; \)

We can check this with Mathematica's  result using the InverseLaplaceTransform package.

\(f[t_]\  = \ InverseLaplaceTransform[F[s], \ s, \ t]; 

    Print["F[s] = ", F[s]]; 
Print["f[t] = ", f[t]]; \)

Example 11.31,  Page 451. Find the Laplace transform of the Dirac delta function  δ(t).
Solution:  For any  a > 0  we define  (Subscript[δ, a])(t)  on the interval  [0,a]  as follows:

Clear[a, d, f, F, s, t]\(d[a_, t_]\  = \ 1\/a; 

    F[a_, s_]\ \  = \ \ 
      ∫\_0\%a d[a, t] \(E\^\(\(-s\)\ t\)\) 
          \[DifferentialD]t; 
Print["d[a,t] = ", d[a, t]]; 

    Print[\*""F[a,s] = (∫_0^a)d[a,t]\!\(E\^\(\(-s\)\\ t\)\)\[DifferentialD]t""]; 
Print["F[a,s] = ", F[a, s]]; 

    Print["F[a,s] = ", Together[F[a, s]]]; \)

Let  a->0  to obtain the Laplace transform of   δ(t).

\(\(Print[\*""F[s] = \!\(lim\+\(a -> 0\)\) F[a,s] = "", 
      Limit[F[a, s], a -> 0]]; \)\)

We can check this with Mathematica's  result using the LaplaceTransform package.

\(f[t_]\  = \ DiracDelta[t]; 

    F[s_]\  = \ LaplaceTransform[DiracDelta[t], \ t, \ s]; 

    Print["f[t] = ", f[t]]; 
Print["F[s] = ", F[s]]; \)

Example 11.32,  Page 452.  Solve the initial value problem
     (y^(''))(t) + 4\(\(y\^'\)\)(t) + 13y(t)  =  3 δ(t)    with   y(0) = 0  and  \(\(y\^'\)\)(0) = 0.
Solution:  Taking transforms results in the equation:

\(Clear[eqn, s, solset, t, y, Y]; 

    eqn\ \  = \ \ \((s\^2\  + \ 4  s\  + \ 13)\)\ Y[s]\ \  == \ \ 3; 

    solset\  = \ Solve[eqn, \ Y[s]]; 
Print[eqn]; 
Print[solset]; 

    Y[s_]\  = \ solset[[1, 1, 2]]; 

    Print["Y[s] = ", Y[s]]; \)

Using a table of Laplace transforms, the solution is:

y[_t]  =  (E^(-2 t)) Sin[3  t]

We can check this with Mathematica's  result using the InverseLaplaceTransform package.

\(y[t_]\  = \ InverseLaplaceTransform[Y[s], \ s, \ t]; 

    Print["Y[s] = ", Y[s]]; 
Print["y[t] = ", y[t]]; \)

Example 11.33,  Page 453.   Use convolution to solve the initial value problem
	(y^(''))(t)  +  y(t) = tan(t)	    with  y(0) = 1  and  \(\(y\^'\)\)(0) = 2.
Solution.  First solve  (u^(''))(t) + u(t) = 0  with u(0) = 1 and \(\(u\^'\)\)(0) = 2.
Second solve for (v^(''))(t) + v(t) = tan(t)   with  v(0) = 0 and \(\(v\^'\)\)(0) = 0.
Then the desired solution is  y(t) = u(t) + v(t).

\(Clear[eqn, f, g, int, s, solset, t, τ, u, U, v, v1, v2, v3, v4, 
      val, y, Y]; 

    eqn\  = \ \(s\^2\) U[s]\  - \ s\  - \ 2\  + \ U[s]\  == 0; 

    solset\  = \ Simplify[Solve[eqn, U[s]]]; 
Print[eqn]; 
Print[solset]; 

    U[s_]\  = \ solset[[1, 1, 2]]; 

    u[t_]\  = \ InverseLaplaceTransform[U[s], s, t]; 

    Print["U[s] = ", U[s]]; 
Print[" "]; 

    Print[" u[t] = ", u[t]]; 
Print[" u[0] = ", u[0]]; 

    Print["u'[0] = ", \(u'\)[0]]; \)

\(Y[s_]\  = \ 1\/\(s\^2\  + \ 1\); 

    f[t_]\  = \ InverseLaplaceTransform[Y[s], s, t]; 
g[t_]\  = \ Tan[t]; 

    int\  = \ ∫f[t - τ] g[τ] \[DifferentialD]τ; 

    v[t_]\  = \ 
      ∫\_0\%t f[t - τ] g[τ] \[DifferentialD]τ; 

    Print["      f[t] = ", f[t]]; 
Print["      g[t] = ", g[t]]; 

    Print["f[t-τ]g[τ] = ", f[t - τ] g[τ]]; 

    Print["∫f[t-τ]g[τ]\[DifferentialD]τ = ", 
      int]; 
Print[" "]; 

    Print[\*""v[t] = (∫_0^t)f[t-τ]g[τ]\[DifferentialD]τ""]; 
Print["v[t] = ", v[t]]; 
Print[" "]; 
    
Print["v''[t]+v[t] = ", \(\(v'\)'\)[t] + v[t]]; 

    Print["v''[t]+v[t] = ", Simplify[\(\(v'\)'\)[t] + v[t]]]; \)

Now use a trig substitutions to simplify the expression for v[t].

\(v1\  = \ 
      Cos[t]\ \((Log[Cos[t\/2] - Sin[t\/2]] - Log[Cos[t\/2] + Sin[t\/2]])\) + 
        Sin[t]; 

    v2\  = \ Cos[t]\ 
          Log[\(Cos[t\/2] - Sin[t\/2]\)\/\(Cos[t\/2] + Sin[t\/2]\)] + Sin[t]; 
    
v3\  = \ 
      Cos[t]\ Log[
            \(Cos[t\/2]\^2 - Sin[t\/2]\^2\)\/\((Cos[t\/2] + Sin[t\/2])\)\^2]
             + Sin[t]; 

    v4\  = \ Cos[t]\ Log[Cos[t]\/\(1 + 2\ Cos[t\/2]\ Sin[t\/2]\)] + Sin[t]; 

    v[t_]\  = \ Cos[t]\ Log[Cos[t]\/\(1 + Sin[t]\)] + Sin[t]; 

    y[t_]\  = \ u[t]\  + \ v[t]; 
Print["u[t] = ", u[t]]; 

    Print["v[t] = ", v[t]]; 
Print["y[t] = ", y[t]]; 

    Print[" "]; 
Print["y''[t]+y[t] = ", \(\(y'\)'\)[t] + y[t]]; 

    Print["y''[t]+y[t] = ", Simplify[\(\(y'\)'\)[t] + y[t]]]; 

    Print[" y[0] = ", y[0]]; 
Print["y'[0] = ", \(y'\)[0]]; \)

GoTo Chapter 11