Laplace Transform Examples

These are some of the Laplace transforms in the table in many texts. Check that they match with your text. Check the syntax: the first part of the command is the function to be transformed; the second part is the variable of the function to be transformed (usually t); the third part is the variable of the transformed function (usually s).


  LaplaceTransform[1,t,s]


  LaplaceTransform[Exp[a t],t,s]


  LaplaceTransform[Cosh[ a t],t,s]


  LaplaceTransform[Sin[w t],t,s]


  LaplaceTransform[Exp[a t]Sin[w t],t,s]


  LaplaceTransform[t^6,t,s]


  LaplaceTransform[t Sin[w t],t,s]

The Laplace transform function in Mathematica can handle the operational formulas of the Laplace Transform. Compare these with what is in your text.


  LaplaceTransform[f'[t],t,s]


  LaplaceTransform[t f[t],t,s]


  LaplaceTransform[Exp[a t] f[t],t,s]

Mathematica can work with the Dirac delta function and the Heaviside function, which Mathematica calls the UnitStep function. Compare these with what is in your text.


  LaplaceTransform[DiracDelta[t-2],t,s]


  LaplaceTransform[DiracDelta[t-a],t,s]


  LaplaceTransform[(Exp[-t]-1)/t,t,s]

Curious.... Notice that this is technically correct. The second one is Laplace transform of 1/t evaluated at s+1, which is what the Laplace transform of Exp[-t]/t would be. It looks like we must resort to an operational formula: LT[1/t f(t)]=Integral[LT[f(t)], from s to infinity]


  F=LaplaceTransform[Exp[-t]-1,t,x]


  Integrate[F,{x,s,Infinity}]

So, Mathematica is no cure all. You still need to know what you are doing.

How about a periodic function? Here is one of period 2Pi with amplitude 1.


  Clear[g]
  g[t_]:=If[N[Mod[t,2Pi]] < Pi,1,-1]


  Plot[N[g[t]],{t,0,5Pi}];


  G[s_]:=LaplaceTransform[N[g[t]],t,s]

You'll get many warnings here, but it will plot!


  Plot[G[s],{s,0,3Pi}];

Is this the same as what we found in class?


  Plot[(1-Exp[-Pi s])/(s (1+Exp[- Pi s])),{s,.01,8},
  PlotRange->{0,2.5}];

It should look close....


  test=G[s]-(1-Exp[-Pi s])/(s (1+Exp[-Pi s]))

Big Deal!


  test/.s->5

Much Better! Not!


  N[%]

That's better. Let's check a few more points.


  N[test/.s->10]


  N[test/.s->1]

Notice the numerical integration routine in Mathematica has some problems for small s. It should, look again at what you are integrating! You probably learned all about this is your numerical analysis class.

Up to Laplace Transforms and Differential Equations