Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Lecture 18
In this Lecture we discuss how to use Mathematica in our studies of the expansion (to use in the solu-
tion of differential equations) of non-integrable functions. The tool to be used here is the Laplace
transform. This is effectively a Fourier transform (and inverse transform) continued into the complex
plane, i.e., the path of the underlying integral is parallel to the imaginary axis instead of the real axis.
Recall that we apply this transform to functions that are zero for arguments < 0, by assumption. We
can start by considering some examples (See Eq. (18.4))
In[6]:= f1@t_D := UnitStep@tD
In[7]:= LaplaceTransform@f1@tD, t, pD
Out[7]=
1
p
Note that Mathematica does not remind us of the constraints on the value of p, e.g., here that Re[p] > 0.
Next consider powers
In[8]:= f2@t_D := t^n UnitStep@tD
In[9]:= LaplaceTransform@f2@tD, t, pD
Out[9]= p-1-n
Gamma@1 + nDwhere again we must really require that Re[p] > 0. Now exponentials
In[10]:= f3@t_D := Exp@-a tD UnitStep@tD
In[11]:= LaplaceTransform@f3@tD, t, pD
Out[11]=
1
a + p
where Re[p+a] > 0 is required to make sense.
In[12]:= f4@t_D := Sin@Β tD UnitStep@tD
In[13]:= LaplaceTransform@f4@tD, t, pD
Out[13]=
Β
p2 + Β2
In[14]:= f5@t_D := Cos@Β tD UnitStep@tD
In[15]:= LaplaceTransform@f5@tD, t, pD
Out[15]=
p
p2 + Β2
In[16]:= f6@t_D := Sinh@Γ tD UnitStep@tD
In[17]:= LaplaceTransform@f6@tD, t, pD
Out[17]=
Γ
p2 - Γ2
In[18]:= f7@t_D := Cosh@Γ tD UnitStep@tD
In[19]:= LaplaceTransform@f7@tD, t, pD
Out[19]=
p
p2 - Γ2
Then we have the inverse transform (a defined function to use instead of the contour integrals dis-
cussed in the Lecture)
In[20]:= InverseLaplaceTransformB1
p
, p, tF
Out[20]= 1
In[21]:= InverseLaplaceTransformAp-1-n Gamma@1 + nD, p, tEOut[21]= t
n
Note that Mathematica does not explicitly return the implied theta function, UnitStep[t], which is explicit
in the analytic approach.
In[22]:= InverseLaplaceTransformB1
a + p, p, tF
Out[22]= ã-a t
In[23]:= InverseLaplaceTransformBΒ
p2 + Β2, p, tF
Out[23]= Sin@t ΒD
In[24]:= InverseLaplaceTransformBp
p2 + Β2, p, tF
Out[24]= Cos@t ΒD
In[25]:= InverseLaplaceTransformBΓ
p2 - Γ2, p, tF
Out[25]=
1
2
ã-t Γ I-1 + ã2 t ΓM
Also known as Sinh[Γ t]
In[26]:= InverseLaplaceTransformBp
p2 - Γ2, p, tF
Out[26]=
1
2
ã-t Γ I1 + ã2 t ΓM
Or Cosh[Γ t].
2 Lec18_228_09.nb
For fun we can also try the inverse transform as the explicit (Bromwich) integral
In[27]:=
1
2 Π äIntegrateB
p
p2 - Γ2Exp@p tD, 8p, Γ + 1 - ä ¥, Γ + 1 + ä ¥
In[34]:= LaplaceTransform@x''@tD + 2 x'@tD + x@tD, t, pDOut[34]= LaplaceTransform@x@tD, t, pD +
2 p LaplaceTransform@x@tD, t, pD + p2 LaplaceTransform@x@tD, t, pDThen we can transform the differential equation and solve for the transform of the solution, which we
identify in the function call
In[35]:= Solve@LaplaceTransform@x''@tD + 2 x'@tD + x@tD, t, pD LaplaceTransform@t, t, pD,LaplaceTransform@x@tD, t, pDD
Out[35]= ::LaplaceTransform@x@tD, t, pD ® 1p2 H1 + pL2 >>
Thus we are back to where we were above and the transform back
In[36]:= InverseLaplaceTransform@%, p, tD
Out[36]= 99x@tD ® -2 + 2 ã-t + t + ã-t t==Alternatively we could include the initial conditions inside Solve
In[37]:= Clear@xD
In[38]:= Solve@8LaplaceTransform@x''@tD + 2 x'@tD + x@tD, t, pD LaplaceTransform@t, t, pD,x@0D == 0, x'@0D == 0
In[40]:= PlotA-2 + 2 ã-t + t + ã-t t, 8t, -1, 10