This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Add-ons / Standard Packages / Calculus  /

Calculus`LaplaceTransform`

The term transform usually refers to a mathematical operation that takes a given function and returns a new function. The transformation is often done by means of an integral formula. Commonly used transforms are named after Laplace and Fourier. Transforms are frequently used to change a complicated problem into a simpler one. The simpler problem is then solved, usually using elementary algebraic means. The solution to the simpler problem is taken over to the original problem using the inverse transform. A standard example is the use of the Laplace transform to solve a differential equation.
This package implements the Laplace transform. To take a Fourier transform you can use the package Calculus`FourierTransform`. The Laplace transform of a function is the function defined by

.


The Laplace transform and its inverse.

  • This loads the package.
  • In[1]:= <<Calculus`LaplaceTransform`

  • This evaluates a Laplace transform.
  • In[2]:= LaplaceTransform[Sin[t], t, s]

    Out[2]=

  • The functions you are transforming can contain symbolic quantities.
  • In[3]:= LaplaceTransform[t^3 Exp[a t], t, s]

    Out[3]=

  • Here is the inverse transform of the previous result.
  • In[4]:= InverseLaplaceTransform[%, s, t]

    Out[4]=

  • LaplaceTransform knows the standard properties of the transform such as linearity and the behavior of derivatives. The superscript (0,0,2) means the second derivative with respect to the third variable.
  • In[5]:= LaplaceTransform[f'[t] + -t^2 g[t], t, s]

    Out[5]=

    LaplaceTransform recognizes the Dirac delta function DiracDelta and the unit step function UnitStep. These functions are discussed in the section on the Calculus`DiracDelta` package.

  • Here is a transform of an expression involving a delta function.
  • In[6]:= LaplaceTransform[
    Sin[t] DiracDelta[5 t - 7], t, s]

    Out[6]=

  • The inverse transforms of many standard functions include delta functions.
  • In[7]:= InverseLaplaceTransform[Exp[a/s + b], s, t]

    Out[7]=

  • The convention is to make the assumptions about parameters necessary for the transform to exist. However, if the form the transform takes depends on the assumptions made, then the transform will return unevaluated.
  • In[8]:= LaplaceTransform[UnitStep[t - b], t, s]

    Out[8]=

  • Assumptions about parameters can be made by defining Positive, Negative, or Sign for a parameter. This is the transform for a step on the positive real axis.
  • In[9]:= (b /: Positive[b] = True;
    LaplaceTransform[UnitStep[t - b], t, s])

    Out[9]=

  • Here the step is on the negative real axis, outside the integration limits of the Laplace transform.
  • In[10]:= (c /: Sign[c] = 1;
    LaplaceTransform[UnitStep[t + c], t, s])

    Out[10]=


    Multidimensional LaplaceTransform and InverseLaplaceTransform.

  • Here is a multidimensional transform of a function of two variables.
  • In[11]:= LaplaceTransform[t^2 Exp[3 x], {t,x}, {s,v}]

    Out[11]=

  • Here is the inverse transform.
  • In[12]:= InverseLaplaceTransform[%, {s,v}, {t,x}]

    Out[12]=

  • Here is the transform of the one-dimensional heat conduction equation. The function represents the temperature of point at time

    .
  • In[13]:= eqn = LaplaceTransform[
    D[u[x,t], t] == D[u[x,t], {x,2}], t, s]

    Out[13]=

  • The Laplace transform of with respect to is expressed as a function of , U[s][x]

    .
  • In[14]:= (LaplaceTransform[u[x_, t_], t_, s_] := U[s][x];
    eqn)

    Out[14]=

  • DSolve may be used to find U[s][x].
  • In[15]:= soln = DSolve[{eqn /.
    {u[x_,0] -> 3 Sin[2 Pi x]},
    U[s][0]==0, U[s][1]==0}, U[s][x], x]

    Out[15]=

  • The inverse transform gives the solution to the heat equation

    .
  • In[16]:= (InverseLaplaceTransform[U[s_][x_], s_, t_] := u[x, t];
    InverseLaplaceTransform[soln, s, t])

    Out[16]=

  • Here is the transform of another common partial differential equation, the wave equation.
  • In[17]:= eqn = LaplaceTransform[
    D[u[x,t], {t,2}] == 9 D[u[x,t], {x,2}], t, s]

    Out[17]=

  • DSolve gives the Laplace transform of with respect to , U[s][x]

    .
  • In[18]:= soln = MapAll[Cancel, PowerExpand[
    DSolve[{eqn /.
    {u[x,0] -> 20 Sin[2 Pi x] - 10 Sin[5 Pi x],
    Derivative[0,1][u][x,0] -> 0},
    U[s][0]==0, U[s][1]==0}, U[s][x], x]
    ]]

    Out[18]=

  • The inverse transform gives the solution to the wave equation

    .
  • In[19]:= InverseLaplaceTransform[soln, s, t]

    Out[19]=


    Options for LaplaceTransform.

  • Many transforms will be performed more quickly with DefiniteIntegral set to False. A transform that does not evaluate with this setting may evaluate if DefiniteIntegral is set to True. Here a condition for the existence of the transform is expressed using If.
  • In[20]:= LaplaceTransform[Cos[d Sqrt[a t]], t, s,
    DefiniteIntegral->True]

    Out[20]=

  • The Assumptions option is passed to Integrate which returns a simplified expression.
  • In[21]:= LaplaceTransform[Cos[d Sqrt[a t]], t, s,
    DefiniteIntegral->True,
    Assumptions -> {Im[d] == 0 && Re[s/a] > 0}]

    Out[21]=

  • The default setting of the option Analytic causes unrecognized functions to be treated as analytic.
  • In[22]:= LaplaceTransform[D[g[t, x], t], t, s]

    Out[22]=

  • Setting Analytic to False forces the transform to be expressed in terms of a directional limit.
  • In[23]:= LaplaceTransform[
    D[g[t, x], t], t, s, Analytic -> False]

    Out[23]=