Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to computing page for the fourth course APMA0360
Return to Mathematica tutorial for the first course APMA0330
Return to Mathematica tutorial for the second course APMA0340
Return to Mathematica tutorial for the fourth course APMA0360
Return to the main page for the course APMA0330
Return to the main page for the course APMA0340
Return to the main page for the course APMA0360
Return to Part VI of the course APMA0330


This section gives an introduction and basic statements regarding the Laplace transform.

Definition of Laplace transform

Let f be an arbitrary (complex-valued or real-valued) function defined on an semi-infinite interval [0, ∞); then the integral

\begin{equation} \label{EqLaplace.1} f^L (\lambda ) = \left( {\cal L} \,f \right) (\lambda ) = \int_0^{\infty} f(t)\,e^{-\lambda t} \,{\text d} t = \lim_{N\to +\infty} \int_0^{N} f(t)\,e^{-\lambda t} \,{\text d} t \end{equation}
is said to be the Laplace transform of f provided that the integral \eqref{EqLaplace.1} converges for some value \( \lambda = s \) of a parameter λ. Therefore, the Laplace transform of a function (if it exists) depends on a parameter λ, which could be either a real number or a complex number. Saying that a function f(t) has a Laplace transform fL means that for some λ = s, the limit
\[ f^L (\lambda ) = \lim_{N\to \infty} \, \int_0^{N} f(t)\,e^{-\lambda t} \,{\text d} t \]
exists. From the definition of integral, it follows that the Laplace transform does not depend on the values of an integrated function at a discrete number of points. Therefore, the Laplace transform can map different functions into the same output. Since application of the Laplace transformation to differential equations requires the inverse Laplace transform, we need a class of functions that is in bijection relation with its Laplace transforms. The integral that defines the Laplace transform does not have to converge. For example, neither \( {\cal L} \left[ 1/t \right] \) nor \( {\cal L} \left[ e^{t^2} \right] \) exist. There are known some sufficient conditions guaranteeing the existence of \( {\cal L} \left[ f(t) \right] . \)
Theorem 1: If a function f is absolutely integrable over any finite interval from \( [0, \infty ) ; \) and the Laplace integral \( \int_0^{\infty} f(t)\,e^{-\lambda t} \,{\text d} t \) converges for some complex number \( \lambda = s , \) then it converges in the half-plane \( \mbox{Re}\,\lambda > \mbox{Re}\, s , \) i.e., in \( \left\{ \lambda \in \mathbb{C} \, : \, \Re\, \lambda > \Re\, s \right\} . \)
Definition: The smallest real number σ∈ℝ for which the integral \( \int_0^{\infty} f(t)\,e^{-\sigma t} \,{\text d} t \) converges is called the abscissa of convergence of the function f.

We plot the abscissa of convergence and the domain where the Laplace transformation converges.
har = Graphics[{Arrowheads[0.06], Thickness[0.01], Blue, Arrow[{{-0.3, 0}, {1.7, 0}}]}];
var = Graphics[{Arrowheads[0.06], Thickness[0.01], Blue, Arrow[{{0.0, -0.92}, {0.0, 0.92}}]}];
fil = Plot[{1.2 + 0.05*Cos[10*x], -1.2 - 0.05*Sin[10*x]}, {x, 0.4, 1.6}, Filling -> {1 -> {2}}];
line = Graphics[{Thick, Red, Line[{{0.4, -0.92}, {0.4, 0.92}}]}];
t1 = Graphics[{Black, Text[Style["O", Bold, 18], {-0.1, -0.1}]}];
t2 = Graphics[{Black, Text[Style["Re\[Lambda]", Bold, 18], {1.6, 0.1}]}];
t3 = Graphics[{Black, Text[Style["Im\[Lambda]", Bold, 18], {0.15, 0.94}]}];
t4 = Graphics[{Black, Text[Style["Re\[Lambda] > s", Bold, 18], {0.9, 0.4}]}];
t5 = Graphics[{Black, Text[Style["s", Bold, 18], {0.35, 0.1}]}];
Show[t1, t2, t3, t4, t5,var, har, fil, line]
       Abscissa of convergence and the domain of convergence for a Laplace transformation.            Mathematica code

Theorem 2: The Laplace transform is a linear operator.
In most applications t is the time and the domain of the real variable t is the time domain. But the product λt in \( e^{-\lambda\, t} \) is necessarily a pure number. One way to see this is by expanding the exponential function into the Taylor series
\[ e^{-\lambda\, t} = 1 - \lambda t + \frac{1}{2!}\, (\lambda t)^2 - \frac{1}{3!}\, (\lambda t)^3 + \cdots . \]
If λt had any units, such as millimeters or seconds, the terms in the series would all have different units and summation would make no sense. Since λt is a pure number, λ must have the units of 1/t. Hence, the product λt represents a dimensionless number (such as cycles) and λ has the units of frequency. It is often advantageous to let λ be complex, and consider it as the complex frequency. Then the set of values of λ is referred to as the frequency domain.
Definition: A function f is said to be piecewise continuous or intermittent on a finite closed interval [𝑎,b] if the interval can be divided into finitely many subintervals so that f(t) is continuous on each subinterval and approaches a finite limit at the end points of each subinterval from the interior.
A function is said to be piecewise continuous or intermittent on the infinite interval if it is piecewise continuous on every finite compact subinterval.
For our needs, we will use more restrictive definition of the intermittent function. A function f(t), defined on semi-infinite interval [0, ∞), is piecewise continuous if this interval can be broken into finite number of pieces
\[ [0, \infty ) = [0, b_1) \cup (a_2 , b_2 ) \cup \cdots \cup (a_m, \infty ) , \]
so that the function f(t) is continuous on each of them and has finite limit values at the endpoints. A piecewise continuous function can be defined as
\[ f(t) = \begin{cases} f_1 (t) , & \ 0 < t < b_1 , \\ f_2 (t) , & \ a_2 < t < b_2 , \\ \vdots \\ f_m (t) , & a_m < t < \infty , \end{cases} \]
where each function fk(t), k = 1, 2, … , m, is continuous on the interval (𝑎k, bk) and has finite limit values at 𝑎k and bk. We do not specify the values of the function f(t) at endpoints (𝑎k, bk) because we are going to apply the Laplace transformation to such intermittent functions; recall that the integral is not sensitive to the values of the function at a finite number of points. So wherever the function has values at the points of discontinuities, its Laplace transform does not depend on these values.
Definition: The Heaviside function H(t) is the unit step function:
\begin{equation} \label{EqLaplace.2} H(t) = \begin{cases} 1, & \quad t > 0 , \\ 1/2, & \quad t=0, \\ 0, & \quad t < 0. \end{cases} \end{equation}
      We plot the Heaviside function:
a = Graphics[{Black, Dashed, Arrowheads[0.05], Arrow[{{3, -0.2}, {3, 1.2}}]}];
b = Graphics[{Blue, Thickness[0.02], Arrowheads[0.07], Arrow[{{3.7, 1}, {3, 1}}]}];
c = Graphics[{Blue, Thickness[0.02], Arrowheads[0.07], Arrow[{{2, 0}, {3, 0}}]}];
d = Graphics[{PointSize[Large], Point[{3, 1/2}]}];
e = Graphics[{Black, Dashed, Arrowheads[0.05], Arrow[{{3.0, 0.0}, {3.7, 0}}]}];
t1 = Graphics[{Black, Text[Style["1/2", Bold, 18], {3.1, 0.5}]}];
t2 = Graphics[{Black, Text[Style["0", Bold, 18], {3.05, -0.05}]}];
t3 = Graphics[{Black, Text[Style["1", Bold, 18], {2.93, 1.0}]}];
t4 = Graphics[{Black, Text[Style["t", Bold, 18], {3.6, 0.1}]}];
Show[a, b, c, d, e, t1, t2, t3, t4]
       Heaviside function.            Mathematica code

It is known in calculus that if a function f is intermittent on a finite closed (compact) interval, then it is integrable on that interval. But for integrability of the product \( f(t)\, e^{-\lambda t} \) on the semi-infinite interval [0, ∞), we need a stronger condition than piecewise continuity. The following definition provides a sufficient condition on the function f to possess the Laplace transform.
Definition: A function \( f(t), \ t \in [0, \infty ) \) is said to be a function-original if it has a finite number of points of discontinuity (finite jumps) on every finite subinterval of \( [0, \infty ) \) and it grows not faster than an exponential, that is
\begin{equation} \label{EqLaplace.3} | f(t) | \le M\, e^{ct} \qquad \mbox{for} \quad t > T, \end{equation}
with some constants c, M, and T. Moreover, we assume that at points of discontinuity the values of a function-original are equal to the corresponding mean values:
\begin{equation} \label{EqLaplace.4} f(t) = \frac{1}{2} \left[ f(t+0) + f(t-0) \right] = \lim_{\varepsilon \to 0, \ \varepsilon \ge 0} \, \frac{1}{2} \left[ f(t+\varepsilon ) + f(t-\varepsilon ) \right] . \end{equation}
The Laplace transform of such a function is called the image.
In practical applications, the mean value property \eqref{EqLaplace.4} is not essential---it is used mostly in theoretical analysis. We usually do not pay attention to values of the function-original at the points of discontinuity (if any). However, be aware that the inverse Laplace transformation (as well as Fourier) restores the function with the mean value property. Therefore, the inverse Laplace transform automatically defines a function that has the property \eqref{EqLaplace.4}.
Definition: We say that a function f is of exponential order if the inequality \( | f(t) | \le M\, e^{ct} \) holds for some constants c, M, and T. We abbreviate this as \( f = O\left( e^{ct} \right) \) or \( f \in O\left( e^{ct} \right) . \) A function f is said to be of exponential order α, or eo(α) for abbreviation, if \( f = O\left( e^{ct} \right) \) for any real number c > α, but not when c < α.
Theorem 3: The Laplace transform exists for a function of exponential order, and tends to zero at infinite point.
Theorem 4: The Laplace transform establishes a one-to-one correspondence between functions-originals and their images.    ⧫



Example 1: The Laplace transforms of the unit function and the Heaviside function are the same and equal to

\[ {\cal L} \left[ 1 \right] = {\cal L} \left[ H(t) \right] = \int_0^{\infty} \,e^{-\lambda\,t} \,{\text d} t = \frac{1}{\lambda} . \tag{1.1} \]
Note that the Laplace transform (1.1) does not depend on the value of the Heaviside function at t = 0.
Assume s > 0;
Integrate[E^(-s t), {t, 0, A}] // Apart
1/s - E^(-A s)/s
Limit[Integrate[E^(-s t), {t, 0, A}], {A -> \[Infinity]}] // Normal
LaplaceTransform[1, t, s]

Example 2: We find the Laplace transform of the power function:

\[ {\cal L} \left[ t^p \right] = \int_0^{\infty} t^p \,e^{-\lambda\,t} \,{\text d} t = \frac{1}{\lambda^{p+1}} \,\int_0^{\infty} \tau^p \,e^{-\tau} \,{\text d} \tau = \frac{\Gamma (p+1)}{\lambda^{p+1}} , \tag{2.1} \]
where \( \Gamma (\nu ) = \int_0^{\infty} t^{\nu -1} \, e^{-t} \, {\text d} t \) is the Gamma-function of Euler.

Let us consider a particular case when p = -½. The function has infinite discontinuity at t = 0. Hence, this function is not piecewise continuous on [0, ∞). However, its Laplace transform exists and can be found by substitution λt = x², which gives

LaplaceTransform[t^(-1/2), t, s]
\[ {\cal L} \left[ t^{-1/2} \right] = \int_0^{\infty} t^{-1/2} \,e^{-\lambda\,t} \,{\text d} t = \frac{2}{\sqrt{\lambda}} \int_0^{\infty} e^{-x^2} \,{\text d} x = \sqrt{\frac{\pi}{\lambda}} \]
because \( \lambda\,{\text d}t = 2x\,{\text d} x . \) With a similar substitution, we obtain
LaplaceTransform[t^(1/2), t, s]
Sqrt[\[Pi]]/(2 s^(3/2))
\[ {\cal L} \left[ t^{1/2} \right] = \int_0^{\infty} t^{1/2} \,e^{-\lambda\,t} \,{\text d} t = \frac{2}{\lambda\,\sqrt{\lambda}} \int_0^{\infty} x^2 \,e^{-x^2} \,{\text d} x = \frac{1}{2\lambda}\,\sqrt{\frac{\pi}{\lambda}} . \]

Note that the Laplace transform of the power function tp (t ≥ 0) exists only when p > -1. Otherwise, the Laplace transform does not exist because the corresponding integral diverges. This example shows that the Laplace transform exists for a wider class of functions than functions-original.    ■

Example 3: The Laplace transform of the exponential function is

\[ {\cal L} \left[ e^{at} \right] = \int_0^{\infty} e^{at} \,e^{-\lambda\,t} \,{\text d} t = \frac{1}{\lambda -a} . \tag{3.1} \]
Mathematica confirms:
LaplaceTransform[Exp[a*t], t, lambda]
1/(lambda - a)
Its abscissa of convergence is λ = Re𝑎.


Example 4: To find the Laplace transform of the trigonometric functions, we recall that they are real and imaginary parts of pure imaginary exponential functions (known as Euler's formula):

\[ \sin (at) = \Im\, e^{{\bf j} at} \qquad\mbox{and} \qquad \cos (at) = \Re\, e^{{\bf j} at} , \tag{4.1} \]
where j is the unit vector in positive vertical direction on the complex plane, so j2 = -1. As usual, ℑ = Im is the imaginary part of a complex number; correspondingly, ℜ = Re is the real part of a complex number. So ℑ(𝑎 + jb) = b and ℜ(𝑎 + jb) = 𝑎.

Let us take 𝑎 in Eq.(4.1) to be pure imaginary, so 𝑎 ↦ j𝑎. Then

\[ {\cal L} \left[ e^{{\bf j}at} \right] = \int_0^{\infty} e^{{\bf j}at} \,e^{-\lambda\,t} \,{\text d} t = \frac{1}{{\bf j}a - \lambda} = \frac{\lambda +{\bf j}a}{\left( {\bf j}a - \lambda \right) \left( \lambda +{\bf j}a \right)} = \frac{\lambda +{\bf j}a}{\lambda^2 + a^2} . \tag{4.2} \]
Extracting the real part of (4.2), we obtain the Laplace transformations of trigonometric cosine functions:
\[ \Re {\cal L} \left[ e^{{\bf j}at} \right] = \int_0^{\infty} \cos (at) \,e^{-\lambda\,t} \,{\text d} t = \Re \frac{1}{{\bf j}a - \lambda} = \Re \frac{\lambda +{\bf j}a}{\lambda^2 + a^2} = \frac{\lambda}{\lambda^2 + a^2} . \tag{4.3} \]
Mathematica confirms:
LaplaceTransform[Cos[a*t], t, lambda]
lambda/(a^2 + lambda^2)
Similarly, taking the imaginary part, we get
\[ \Im {\cal L} \left[ e^{{\bf j}at} \right] = \int_0^{\infty} \sin (at) \,e^{-\lambda\,t} \,{\text d} t = \Im \frac{1}{{\bf j}a - \lambda} = \Im \frac{\lambda +{\bf j}a}{\lambda^2 + a^2} = \frac{a}{\lambda^2 + a^2} . \tag{4.4} \]
Mathematica confirms:
LaplaceTransform[Sin[a*t], t, lambda]
a/(a^2 + lambda^2)
Here ℜ denotes the real part of a complex number, so ℜ(𝑎 + jb) = 𝑎, and ℑ is the imaginary part, so ℑ(𝑎 + jb) = b. The abscissa of convergence for these trigonometric functions is zero. Note that tangent function does not have a Laplace transform because the corresponding integral \eqref{EqLaplace.1} diverges.
test1 = FullSimplify[ ResourceFunction["IntegrateByParts"][ E^(-s t) Sin[a t],(*t*){t, 0, \[Infinity]}]]
E^(s (-\[Infinity])) Sin[a \[Infinity]] - Inactive[Integrate][(E^(-s t) s Cos[a t])/a, {t, 0, \[Infinity]}]
Finally, we present some examples of Mathematica codes involving the Laplace transform.

Example 5: We present some examples to show how Mathematica can be helpful in dealing with Laplace transformation and its applications. We start with t4sin(𝑎t):

\[ {\cal L} \left[ t^4 \sin (at) \right] = \frac{24 a \left( a^4 -10 a^2 \lambda^2 + 5\lambda^4 \right)}{\left( a^2 + \lambda^2 \right)^5} . \]
LaplaceTransform[t^4 Sin[a*t], t, s]
(24 a (a^4 - 10 a^2 s^2 + 5 s^4))/(a^2 + s^2)^5
Mathematica is able to find the Laplace transform of the derivative:
f[t_] = t^4 *Sin[a*t]
LaplaceTransform[f''[t], t,s]
-((24 a (a^2 - 3 s^2))/(a^2 + s^2)^3) + ( 48 a (a^4 - 6 a^2 s^2 + s^4))/(a^2 + s^2)^4 - ( 24 a^3 (a^4 - 10 a^2 s^2 + 5 s^4))/(a^2 + s^2)^5

There are two kinds of delayed functions. Let us consider a familiar trigonometric function: cos(t). We construct from it two delayed functions: f(t) = cos(t)H(t−𝑎) and g(t) = cos(t−𝑎)H(t−𝑎).

Plot[Cos[t]*HeavisideTheta[t - 1], {t, 0, 2*Pi}, PlotTheme -> "Web"]
Plot[Cos[t - 1]*HeavisideTheta[t - 1], {t, 0, 2*Pi}, PlotTheme -> "Web"]

Graph of cos(t)H(t−𝑎)     Graph of cos(t−𝑎)H(t−𝑎).

Their Laplace transforms are different, as Mathematica reports:
LaplaceTransform[If[t > Pi, Cos[t], t], t, s]
Out[4]= (E^(-\[Pi] s) (-1 + E^(\[Pi] s) - \[Pi] s - s^3/(1 + s^2)))/s^2
Assuming[ a > 0, LaplaceTransform[Cos[t - a]*HeavisideTheta[t - a], t, s]]
\[ {\cal L} \left[ f(t) \right] = {\cal L} \left[ \cos (t)\, H(t-a) \right] = \frac{\lambda\,\cos a - \sin a}{1 + \lambda^2}\, e^{-a\lambda} . \]
\[ {\cal L} \left[ g(t) \right] = {\cal L} \left[ \cos (t-a)\,H(t-a) \right] = \frac{\lambda}{1 + \lambda^2}\, e^{-a\lambda} . \]

Our next example is a periodic function

\[ f(t) = H\left( 2\,\sin t \right) . \]

You will learn in section iv how to handle this case; however, we want to demonstrate the power of Mathematica in determination of the Laplace transform for complicated functions.

    We plot the periodic step function,
Plot[UnitStep[2 Sin[t]], {t, 0, 10*Pi}, PlotStyle -> Thickness[0.016]]
for which we find its Laplace transform:
LaplaceTransform[UnitStep[2 Sin[t]], t, lambda]
Out[5]= E^(\[Pi] lambda)/((1 + E^(\[Pi] lambda)) lambda)

\[ {\cal L} \left[ H\left( 2\,\sin t \right) \right] = \frac{\lambda}{1 + e^{\pi\lambda}}\, e^{\pi\lambda} . \]

The Laplace transform of the arctangent function is expressed through two special functions, called sine integral, Si(x), and

\[ \mbox{Si}(x) = \int_0^x \frac{\sin t}{t}\,{\text d}t \qquad \mbox{and} \qquad \mbox{Ci}(x) = \int_x^{\infty} \frac{\cos t -1}{t} \,{\text d}t \]
called called cosine integral.
LaplaceTransform[ArcTan[t/a], t, s, Assumptions -> a > 0]
Out[5]= (2 CosIntegral[a s] Sin[a s] + Cos[a s] (\[Pi] - 2 SinIntegral[a s]))/(2 s)
\[ {\cal L} \left[ \arctan \left( \frac{t}{a} \right) \right] = \frac{\sin (a\lambda )}{\lambda}\,\mbox{Ci}(a\lambda ) + \frac{\cos (a\lambda )}{\lambda} \left[ \frac{\pi}{2} - \mbox{Si}(a\lambda ) \right] . \]

Now we give an example of application of the inverse Laplace transform:

\[ {\cal L}^{-1} \left[ \frac{4}{\lambda \left( 4 + \lambda^2 \right)} \right] = 2\,\sin^2 t \,H(t) . \]
InverseLaplaceTransform[4/s/(4 + s^2), s, t]
Out[8]= 4 (1/4 - 1/4 Cos[2 t])
Out[9]= 2 Sin[t]^2
Another way to find the inverse Laplace transform is to break the function into a sum of simple terms:
Apart[4/s/(4 + s^2), s]
Out[10]= 1/s - s/(4 + s^2)
LaplaceTransform[2 Sin[t]^2, t, lambda]
Out[11]= 4/(lambda (4 + lambda^2))

\[ \frac{4}{\lambda \left( 4 + \lambda^2 \right)} = \frac{1}{\lambda} - \frac{\lambda}{4 + \lambda^2} . \]



Return to Mathematica page
Return to the main page (APMA0330)
Return to the Part 1 (Plotting)
Return to the Part 2 (First Order ODEs)
Return to the Part 3 (Numerical Methods)
Return to the Part 4 (Second and Higher Order ODEs)
Return to the Part 5 (Series and Recurrences)
Return to the Part 6 (Laplace Transform)
Return to the Part 7 (Boundary Value Problems)