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

Section 11.7  Shifting Theorems and the Step Function

We have seen how the Laplace transform can be used to solve linear differential equations.  Familiar functions that arise in solutions to differential equations are  (e^(a t)) cos (b t)  and  (e^(a t)) sin (b t).  The first shifting theorem will show how their transforms are related to those of   cos (b t)  and  sin (b t)  by shifting the variable  s  in  F(s).  A companion result, called thee second shifting theorem,  will show how the transform of  f(t-a)  can be obtained by multiplying  F(s)  by  (e^(- a s)).  Loosely speaking, these results show that multiplication of  f(t)  by  (e^(a t))  corresponds to shifting  F(s-a),  and shifting  f(t-a)   corresponds to multiplication of the transform F(s)  by  (e^(- a s)).

Theorem 11.15   (Shifting the Variable  s),  Page 525.  If  F (s)  is the Laplace transform of  f (t),  then  

		ℒ((e^(a t)) f (t))=F (s - a).

Proof of Theorem 11.15, see text Page 525.

Definition 11.3   (The Unit Step Function),  Page 526. Let a ≥ 0.  Then, the unit step function (Subscript[U, a]) (t) is

			(Subscript[U, a]) (t)={({{0,, for  t<a,}, {1,, for  t>a.}})}

Theorem 11.16   (Shifting the Variable  t),  Page 526.  If F (s) is the Laplace transform of f (t), and a ≥ 0, then  

			ℒ((Subscript[U, a]) (t) f (t - a))=(e^(-a s)) F (s).

Proof of Theorem 11.16, see text Page 526.

Example 11.17,  Page 527.	 Use Theorem 11.15 and find  ℒ((t^n)(e^at)).

Solution 11.7.

Use the fact that  ℒ((t^n))=((n!)/(s^(n + 1))).

Remove[a, s, t]; 
Clear[F, G, n]; 
f[t_]  =  (t^n); 
F[s_]  =  ((n!)/(s^(n + 1))); 
Print["  f[t] = ", f[t]]; 
Print[" ℒ(", f[t], ") = ", 
        F[s]]; 
Print["  F[s] = ", F[s]]; 
Print[""]; 
\(\(Print[\*""ℒ(f[t] (E^at)) = F[s - a]""];\)\ \)
Print["  F[s - a] = ", F[s - a]]; 
Print[""]; 
\(\(Print["  ℒ(", 
        f[t], \*"" \!\(E\^at\)) = "", 
        F[s - a]];\)\ \)
\(\(Print["  ℒ(", 
        f[t], \*"" \!\(E\^at\)) = "", 
        FunctionExpand[F[s - a]]];\)\ \)

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[""]; 
Print["ℒ(", f[t], ") = ", 
        F[s]]; 
Print[""]; 
\(\(Print["ℒ(" 
          f[t], \*"" \!\(E\^at\)) = "", 
        F[s - a]];\)\ \)

Example 11.18,  Page 527.  Use Theorem 11.16 and find  ℒ((Subscript[U, c]) (t)).

Solution 11.8.

Enter the function  f[t] = 1  and  F[s] = (1/s),  and apply Theorem 11.16.

Remove[c, s, t]; 
Clear[f, F, g, G, n]; 
f[t_]  =  1; 
F[s_]  =  (1/s); 
Print[" f[t] = ", f[t]]; 
Print["ℒ(", f[t], ") = ", 
        F[s]]; 
Print[" F[s] = ", F[s]]; 
Print[""]; 
\(\(Print[\*""ℒ((Subscript[U, c])(t)f[t-c]) = (E^(-cs))F[s]""];\)\ \)
Print["f[t-c] = ", f[t - c]]; 
Print[""]; 
\(\(Print[\*""ℒ(\!\(U\_c\)(t)("", 
        f[t - c], ")) = ", \(E\^\(\(-c\)\ s\)\) 
          F[s]];\)\ \)

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

U[c_, t_]  =  
        UnitStep[t - c]; 
g[t_] = U[c, t] f[t - c]; 
G[s_]  =  
        LaplaceTransform[g[t],  t,  s]; 
Print["g[t] = ", U[c, t] , "(", 
        f[t - c], ")"]; 
Print["g[t] = ", g[t]]; 
Print[""]; 
Print["ℒ(", g[t], ") = ", 
        G[s]]; 
Print[""]; 
\(\(Print[\*""ℒ((Subscript[U, c])(t)("", 
        f[t - c], ")) = ", \(\(\(E\)\(\ \)\)\^\(\(-c\)\ s\)\) F[s]];\)\ \)

Extra Example for Page 527.  Use Theorem 11.16 and find  ℒ((Subscript[U, c]) (t) Cos[t - c]).

Solution for Extra Example Page 527.

Enter the function  f[t] = Cos[t]  and  F[s] = (s/((s^2)  +  1)), and apply Theorem 11.16 .

Remove[c, s, t]; 
Clear[f, F, g, G, n]; 
f[t_]  =  Cos[t]; 
F[s_]  =  (s/((s^2) + 1)); 
Print[" f[t] = ", f[t]]; 
Print["ℒ(", f[t], ") = ", 
        F[s]]; 
Print[" F[s] = ", F[s]]; 
Print[""]; 
\(\(Print[\*""ℒ((Subscript[U, c])(t)f[t-c]) =  (E^(-cs))F[s]""];\)\ \)
Print["f[t-c] = ", f[t - c]]; 
Print[""]; 
\(\(Print[\*""ℒ(\!\(U\_c\)(t)"", 
        f[t - c], ") = ", \ \(E\^\(\(-c\)\ s\)\) 
          F[s]];\)\ \)

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

U[c_, t_]  =  
        UnitStep[t - c]; 
g[t_] = U[c, t] f[t - c]; 
G[s_]  =  
        LaplaceTransform[g[t],  t,  s]; 
Print["g[t] = ", U[c, t] , "(", 
        f[t - c], ")"]; 
Print["g[t] = ", g[t]]; 
Print[""]; 
Print["ℒ(", g[t], ") = ", 
        G[s]]; 
Print[""]; 
\(\(Print[\*""ℒ(\!\(U\_c\)(t)"", 
        f[t - c], ") = ", \ \(E\^\(\(-c\)\ s\)\) 
          F[s]];\)\ \)

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

Solution 11.9.

Enter the function \(f \((t)\) = 
        1 - \(U\_1\) \((t)\) + \(U\_2\) \((t)\) - \(U\_3\) \((t)\) + \(U\_4\) \((t)\) - \(U\_5\) \((t)\)\).

Remove[s, t]; 
Clear[f, F]; 
\(\(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 -> Magenta, AxesLabel -> {"t", "y"},  
        AspectRatio -> (1/6)]; 
Print["f[t] = ", f[t]];

Use Mathematica's LaplaceTransform package to find  ℒ(f[t]).

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

Example 11.20,  Page 528.  Solve the initial value problem  

		y''[t]  +  y[t]  =  (Subscript[U, π]) (t)
with
y[0] = 0,  and  y'[0] = 0

Solution 11.20.

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  =  0; 
y1  =  0; 
f[t_]  = UnitStep[t - π]; 
F[
          s_]  =  ((E^(-π s))/s); 
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_]  =  (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)))/((s^2)  +  
                1))  and  construct y[t].

y[t_]  =  
        UnitStep[t - π]  -  
          UnitStep[t - π] Cos[t - π]; 
Print["y[t] = ", y[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]];

Notice that the derivative of the unit step function involves the  Dirac delta function.

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

Clear[t, y]; 
de  =  y''[t]  +  y[t]  ==  
          UnitStep[t - π]; 
ics = {y[0] == 0,  y'[0] == 0}; 
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, 5  π}, 
        PlotRange -> {{0, 5  π}, {0, 2}}, PlotStyle -> Magenta, 
        AxesLabel -> {"t", "y"}, 
        Ticks -> {Range[0, 5  π, π], 
            Range[0, 2, 1]}]; 
Print["y[t] = ", y[t]];

Section 11.7  Exercises for Shifting Theorems and the Step Function
See textbook page 529.

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