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

COMPLEX ANALYSIS: for Mathematics and Engineering, 
4th Edition,  2001,  ISBN: 0-7637-1425-9
Jones & Bartlett Publishers, Inc.  
40 Tall Pine Drive, Sudbury, MA 01776  
Tele.  (800) 832-0034, FAX:  (508)  443-8000  
E-mail:  mkt@jbpub.com  
Internet:  http://www.jbpub.com/  
This free software is compliments of the authors.
John H. Mathews,   mathews@fullerton.edu 
Russell W. Howell,  howell@westmont.edu

CHAPTER 11  FOURIER SERIES and the LAPLACE TRANSFORM

a = A = b = B = c = d = s = S = t = T = u = U = v = V = w = W = x = X = y = Y = z = Z = 
                                        0; 
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,ℒf,ℒDf,n,PQ,PR,r,res1,res2,s,solset,s1,s2,s3,S,S9,t,table,τ,T,θ,u,U,U1,U2,U7,v,v1,v2,v3,v4,val,V,w,w1,w2,W,x,X,y,y0,y1,Y,Yi,z,z1,z2,Z]; 
Needs["Graphics`Colors`"];

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

Theorem 11.13  (Differentiation of f(t)), Page 521. Let f(t)  and  f'(t) be continuous for t ≥ 0, and of exponential order. Then

		ℒ(f' (t))=s F (s) - f (0),  

where F (s)=ℒ(f (t)).

Proof of Theorem 11.13, see text Page 521.

Corollary 11.1  (Differentiation of f(t)),  Page 522.  If  f (t),   f' (t)  and  f'' (t)  are of exponential order, then  

	ℒ(f'' (t))=(s^2) F (s) - s f (0) - f' (0).

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

Solution 11.13.

Enter f[t] and compute  f[0]  and  f'[t].

Remove[s, t]; 
Clear[f, F, Lf, LDf]; 
f[t_]  =  Cos[t]^2; 
Print[" f[t] = ", f[t]]; 
Print[" f[0] = ", f[0]]; 
Print["f'[t] = ", f'[t]]; 
Print["f'[t] = ", TrigReduce[f'[t]]];

Use the fact that  ℒ(Sin[2  t])=(2/((s^2)  +  4))  to help solve for ℒ(f[t]).

LDf   =   ((-2)/((s^2)  +  4)); 
eqn1   =   LDf  ==  
          s F[s]  -  f[0]; 
eqn2   =   LDf + f[0]  ==  
          s F[s]; 
eqn3   =  
        Together[ LDf + f[0]]  ==  
          s F[s]; 
solset  =  Solve[eqn3,  F[s]]; 
solset = MapAll[Simplify, solset]; 
Lf  =  
        (Subscript[solset, [[1, 1, 2]]]); 
Print["ℒ(f'[t]) = ", 
        LDf]; 
Print[" f[0] = ", f[0]]; 
Print[""]; 
Print["ℒ(f'[t]) = s F[s] - f[0]"]; 
Print[eqn1]; 
Print[eqn2]; 
Print[eqn3]; 
Print[solset]; 
Print[""]; 
Print["ℒ(f[t]) = ", 
        Simplify[Lf]];

Aside. 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[t]) = ", 
        F[s]];

Theorem 11.14  (Integration of f(t)),  Page 522. Let f (t)  and  f' (t) be continuous for 0 ≤ t, and of exponential order and ℒ(f (t))=F (s), then  

		ℒ(∫f (t) dt)=((F (s))/s).

Example 11.14,  Page 522.	 Use Theorem 11.14 to find  ℒ(f[t]).  (a)  Find  ℒ((t^2)),  (b)  Find  ℒ((t^3)).

Solution 11.14 (a).  Find  ℒ((t^2)).

Enter the function  f[t]  =  (t^2).

Remove[s, t]; 
Clear[f, F, Lf, LDf]; 
f[t_]  =  (t^2); 
Print[" f[t] = ", f[t]];

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

ℒDf  = (2/(s^2)); 
ℒf =  ((ℒDf)/s); 
Print["f'[t] = ", f'[t]]; 
Print["ℒ(f'[t]) = ",ℒDf]; 
Print[""]; 
\(Print[\*""ℒ(∫f(t)\[DifferentialD]t) = ((ℒ (f'[t]))/s)""];\) 
Print["ℒ(∫f(t)\[DifferentialD]t) = (",ℒDf,")/",s," = ",ℒf]; 
Print[""]; 
Print["ℒ(f[t]) = ",ℒf]; 
Null

Aside. 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[t]) = ", 
        F[s]];

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

Enter the function  f[t]  =  (t^3).

Remove[s, t]; 
Clear[f, F, Lf, LDf]; 
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)).

ℒDf  = (6/(s^3)); 
ℒf =  ((ℒDf)/s); 
Print["f'[t] = ", f'[t]]; 
Print["ℒ(f'[t]) = ",ℒDf]; 
Print[""]; 
\(Print[\*""ℒ(∫f(t)\[DifferentialD]t) = ((ℒ (f'[t]))/s)""];\) 
Print["ℒ(∫f(t)\[DifferentialD]t) = (",ℒDf,")/",s," = ",ℒf]; 
Print[""]; 
Print["ℒ(f[t]) = ",ℒf]; 
Null

Aside. 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[t]) = ", 
        F[s]];

For many physical problems involving mechanical systems and electric circuits, the transform F(s) is known, and the inverse of Y(s) can easily be computed. This process is referred to as the operational calculus and has the advantage of changing problems in differential equations into problems in algebra. Then the solution obtained will satisfy the specific initial conditions.

Example 11.15,  Page 523.  Solve the initial value problem  

		y''[t]  +  y[t]  =  0
with
y[0] = 2,  and  y'[0] = 3

Solution 11.15.

Enter the initial conditions and the functions f[t] and F[s].  Then Laplace transform the D.E. and solve for Y[s].

Remove[s, t, y, Y]; 
Clear[eqn, f, F, solset, y0, y1]; 
de  =  y''[t]  +  y[t]  ==  
          f[t]; 
eqn = 
        ReplaceAll[
          de, {f[t] -> F[s], 
            y[t] -> Y[s], y'[t] -> 
              s Y[s] - y0, y''[t] -> 
              (s^2) Y[s] - s y0 - y1}]; 
Print[de]; 
Print[eqn]; 
Print[""]; 
y0  =  2; 
y1  =  3; 
f[t_]  =  0; 
F[s_]  =  0; 
solset  =  Solve[eqn,  Y[s]]; 
Print[" y[0] = ", y0]; 
Print["y'[0] = ", y1]; 
Print[" f[t] = ", f[t]]; 
Print[" F[s] = ", F[s]]; 
Print[""]; 
Print[de]; 
Print[""]; 
Print[eqn]; 
Print[solset]; 
Print[""]; 
Y[s_]  =  
        (Subscript[solset, [[1, 1, 2]]]); 
Print["Y[s] = ", Y[s]]; 
Y[s_]  = Expand[Y[s]]; 
Print["Y[s] = ", Y[s]];

Using the known Laplace transforms  ℒ(Sin[t])=(1/(1  +  (s^2)))  and  ℒ(Cos[t])=(s/(1  +  (s^2))) the solution f[t] is the linear combination  y[t] = 2 Cos[t] + 3 Sin[t].

\(
\(Print["Y[s] = ", \(Y[s]\)\_\(\([[\)\(1\)\(]]\)\), " + ", \(Y[s]\)\_\(\([[\)\(2\)\(]]\)\)];\)\ \)
\(\(Print["y[t] = ", 
        InverseLaplaceTransform[\(Y[s]\)\_\(\([[\)\(1\)\(]]\)\), \ s, \ t], " + ", 
        InverseLaplaceTransform[\(Y[s]\)\_\(\([[\)\(2\)\(]]\)\), \ s, \ t]];\)\ \)

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

y[t_]  =  
        InverseLaplaceTransform[Y[s],  s,  t]; 
Print["Y[s] = ", Expand[Y[s]]]; 
Print["y[t] = ", y[t]];

Aside. We can substitute y[t] into the D.E. and verify it is a solution.

Print["y[t] = ", y[t]]; 
Print["y''[t] = ", y''[t]]; 
Print["y[t] + y''[t] = ", y[t] + y''[t]]; 
Print["y[0] = ", y[0]]; 
Print["y'[0] = ", y'[0]];

Aside. We use Mathematica/s DSolve package to solve the D.E. and plot the solution.

Clear[t, y]; 
de  =  y''[t]  +  y[t]  ==  
          0; 
ics = {y[0] == 2,  y'[0] == 3}; 
solset  =  
        DSolve[Flatten[{de,  ics}],  y[t],  
          t]; 
Print[de]; 
Print[ics]; 
Print[solset]; 
y[t_]  =  
        (Subscript[solset, [[1, 1, 2]]]); 
\(\(Plot[y[t], {t, 0, π}, 

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

Example 11.16,  Page 524.  Solve the initial value problem  

		y''[t] + y'[t] - 2 y[t]  =  0
and
y[0] = 1,   and   y'[0] = 4

Solution 11.16.

Enter the initial conditions and the functions f[t] and F[s].  Then Laplace transform the D.E. and solve for Y[s].

Remove[s, t, y, Y]; 
Clear[eqn, f, F, solset, y0, y1]; 
de =  y''[t] + y'[t] - 2 y[t] ==  
          f[t]; 
eqn = 
        ReplaceAll[
          de, {f[t] -> F[s], 
            y[t] -> Y[s], y'[t] -> 
              s Y[s] - y0, y''[t] -> 
              (s^2) Y[s] - s y0 - y1}]; 
Print[de]; 
Print[eqn]; 
Print[""]; 
y0  =  1; 
y1  =  4; 
f[t_]  =  0; 
F[s_]  =  0; 
solset  =  Solve[eqn,  Y[s]]; 
Print[" y[0] = ", y0]; 
Print["y'[0] = ", y1]; 
Print[" f[t] = ", f[t]]; 
Print[" F[s] = ", F[s]]; 
Print[""]; 
Print[de]; 
Print[""]; 
Print[eqn]; 
Print[solset]; 
Print[""]; 
Y[s_]  =  
        (Subscript[solset, [[1, 1, 2]]]); 
Print["Y[s] = ", Y[s]]; 
Y[s_]  = Apart[Y[s]]; 
Print["Y[s] = ", Y[s]];

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

\(
\(Print["Y[s] = ", \(Y[s]\)\_\(\([[\)\(1\)\(]]\)\), " + (", \(Y[s]\)\_\(\([[\)\(2\)\(]]\)\), ")"];\)\ \)
\(\(Print["y[t] = ", 
        InverseLaplaceTransform[\(Y[s]\)\_\(\([[\)\(1\)\(]]\)\), \ s, \ t], " + (", 
        InverseLaplaceTransform[\(Y[s]\)\_\(\([[\)\(2\)\(]]\)\), \ s, \ 
          t], ")"];\)\ \)

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

y[t_]  =  
        InverseLaplaceTransform[Y[s],  s,  t]; 
Print["Y[s] = ", Expand[Y[s]]]; 
Print["y[t] = ", y[t]];

Aside. We can substitute y[t] into the D.E. and verify it is a solution.

Print["y[t] = ", y[t]]; 
Print["y''[t] = ", y''[t]]; 
Print["y'' + y' - 2 y = ",  y''[t] + y'[t] - 
          2 y[t]]; 
Print["y'' + y' - 2 y = ",  
        Expand[y''[t] + y'[t] - 2 y[t]]]; 
Print["y[0] = ", y[0]]; 
Print["y'[0] = ", y'[0]];

Aside. We use Mathematica/s DSolve package to solve the D.E. and plot the solution.

Clear[t, y]; 
de  =  y''[t] + y'[t] - 2 y[t]  ==  
          0; 
ics = {y[0] == 1,  y'[0] == 4}; 
solset  =  
        DSolve[Flatten[{de,  ics}],  y[t],  
          t]; 
solset = ExpandAll[solset]; 
Print[de]; 
Print[ics]; 
Print[solset]; 
y[t_]  =  
        (Subscript[solset, [[1, 1, 2]]]); 
\(\(Plot[y[t], {t, 0, 2}, 
PlotRange -> {{0, 2}, {0, 15}}, 
        PlotStyle -> Magenta, AxesLabel -> {"t", "y"}, 
        Ticks -> {Range[0, 2, 0.5], Range[0, 15, 2.5]}];\)\ \)
Print["y[t] = ", y[t]];

Section 11.6  Exercises for Laplace Transforms of Derivatives and Integrals
See textbook page 524.

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

GO TO  THE  Table of Contents