Title: Default for 20.4 Solving Differential Equations
Course: HELM Workbooks 2023-2024

Solving ODEs using Laplace transforms

We begin with a straightforward initial value problem involving a first order constant coefficient differential equation. Let us find the solution of \[{dy\over{dt}}+2y=12\text{e}^{3t}\qquad y(0)=3\] using the Laplace transform approach.

Although it is not stated explicitly we shall assume that \(y(t)\) is a causal function (we have no interest in the value of \(y(t)\) if \(t < 0\).) Similarly, the function on the right-hand side of the differential equation \((12\text{e}^{3t})\), the 'forcing function', will be assumed to be causal. (Strictly, we should write \(12\text{e}^{3t}u(t)\) but the step function \(u(t)\) will often be omitted.) Let us write \({\cal L}\{y(t)\}=Y(s)\). Then, taking the Laplace transform of every term in the differential equation gives: \[ {\cal L}\{{dy\over {dt}}\}+{\cal L}\{2y\}={\cal L}\{12\text{e}^{3t}\}\]

Now \[\begin{eqnarray*} {\cal L}\{{dy\over {dt}}\}&=&-y(0)+sY(s)=-3+sY(s)\\{\cal L}\{2y\}&=&2Y(s)\qquad \text{ and}\qquad {\cal L}\{12\text{e}^{3t}\}={12\over {s- 3}} \end{eqnarray*}\]

Substituting these expressions into the transformed version of the differential equation gives: \[ [-3+sY(s)]+2Y(s)={12\over {s-3}}\]

Solving for \(Y(s)\) we have \[ (s+2)Y(s)={12\over {s-3}}+3={3+3s\over {s-3}}\]

Therefore \[ Y(s)={3(s+1)\over {(s+2)(s-3)}}\]

Now, using partial fractions, this last expression can be written in a more convenient form: \[ Y(s)={3/5\over {(s+2)}}+{12/5\over {(s-3)}}\] and then, inverting: \[y(t)={\cal L}^{-1}\{Y(s)\}=\tfrac{3}{5}{\cal L}^{-1}\{{1\over {s+2}}\}+\tfrac{12}{5}{\cal L}^{-1}\{{1\over {s-3}}\} \] thus \[y(t)=\tfrac{3}{5}\text{e}^{-2t}u(t)+\tfrac{12}{5}\text{e}^{3t}u(t)\]

This is the solution to the given initial value problem.

Exercise

The equation governing the build up of charge, \(q(t)\), on the capacitor of an RC circuit is \(\displaystyle{R{dq\over {dt}}+{1\over C}q=v_0}\).

[Image: Simple circuit diagram showing a resistor and capacitor in series.]

where \(v_0\) is the constant d.c. voltage. Initially, the circuit is relaxed and the circuit is then 'closed' at \(t=0\) and so \(q(0)=0\) is the initial condition for the charge.

Use the Laplace transform method to solve the differential equation for \(q(t)\). Assume the forcing term \(v_0\) is causal.

1. Begin by finding an expression for \(Q(s)={\cal L}\{q(t)\}\):
\(Q(s)=\)
2. Now expand the expression using partial fractions:
\(Q(s)=\)
3. Now obtain \(q(t)\) by taking inverse Laplace transforms:
\(q(t)=\)
Feedback: 1. \(\displaystyle{Q(s)={v_0C\over {s(RCs+1)}}}\) since, taking the Laplace transform of each term in the differential equation: \[\begin{eqnarray*} R{\cal L}\{{dq\over {dt}}\}+{1\over C}{\cal L}\{q\}&=&{\cal L}\{v_0\}\qquad\qquad\qquad\qquad\qquad\qquad\\ \text{ i.e.}\qquad R[-q(0)+sQ(s)]+{1\over C}Q(s)&=&{v_0\over s} \end{eqnarray*} \] where, we emphasize, the Laplace transform of the constant term \(v_0\) is \(\dfrac{v_0}{s}\). Inserting \(q(0)=0\) we have, after some rearrangement, \[Q(s)={v_0C\over {s(RCs+1)}}.\] 2. You should obtain \(\displaystyle{Q(s)=v_0C\left[{1\over s}-{RC\over {RCs+1}}\right]}\) 3. \(q(t)=v_0C(1-\text{e}^{-t/RC})u(t)\) since \[ {\cal L}^{-1}\{{1\over s}\}=1\qquad \text{ and}\qquad {\cal L}^{-1}\{{RC\over {RCs+1}}\}={\cal L}^{-1}\{{1\over {s+ (1/RC)}}\}=\text{e}^{-t/RC}\] The solution to this problem is illustrated in the following diagram. [Image: A graph showing the charge in the capacitor, growing over time but capped above by v0C.]

Example

Solve the second-order initial-value problem: \[{d^2y\over {dt^2}}+2{dy\over {dt}}+2y=\text{e}^{-t}\qquad y(0)=0,\ \ \ y'(0)=0 \] using the Laplace transform method.

Solution

As usual we shall assume the forcing function is causal (i.e. is really \(\text{e}^{-t}u(t)\).) Taking the Laplace transform of each term: \[ {\cal L}\{{d^2y\over {dt^2}}\}+2{\cal L}\{{dy\over {dt}}\}+2{\cal L}\{y\}={\cal L}\{\text{e}^{-t}\}\] that is, \[[-y'(0)-sy(0)+s^2Y(s)]+2[-y(0)+sY(s)]+2Y(s)={1\over {s+1}}\]

Inserting the initial conditions and rearranging: \[ Y(s)[s^2+2s+2]={1\over {s+1}}\qquad\text{ i.e.}\qquad Y(s)={1\over {(s+1)(s^2+2s+2)}} \] Then, using partial fractions: \[ {1\over {(s+1)(s^2+2s+2)}}\equiv {1\over {s+1}}-{(s+1)\over {s^2+2s+2}}\equiv{1\over {s+1}}-{(s+1)\over {(s+1)^2+1}}\] where we have completed the square in the second term of the right-hand side. We can now take the inverse Laplace transform: \[\begin{eqnarray*} y(t)={\cal L}^{-1}\{Y(s)\}&=&{\cal L}^{-1}\{{1\over {s+1}}\}-{\cal L}^{-1}\{{s+1\over {(s+1)^2+1}}\}\\&=&(\text{e}^{-t}-\text{e}^{-t}\cos t)u(t) \\ &=&e^{-t}(1-\cos t)u(t) \end{eqnarray*}\] which is the solution to the initial value problem.

Exercise

Use Laplace transforms to solve:

1. \( \displaystyle{{dx\over {dt}}+x=9\text{e}^{2t}\qquad x(0)=3}\)
\(x(t)=\)
2. \(\displaystyle{{d^2x\over {dt^2}}+x=2t\qquad x(0)=0\quad x'(0)=5}\)
\(x(t)=\)
Feedback: 1. \(x(t)=3\text{e}^{2t}\) 2. \(x(t)=3\sin t+2t\)

Example

A damped spring, constrained to move in one direction, such as might be found in a railway buffer, is subjected to an impulse of duration 5 seconds. The spring constant divided by the mass causing the impulse is 10 m\(^{-2}\) s\(^{-2}\) and the frictional force divided by this mass is 2 m\(^{-2}\)s\(^{-2}\).

1. Write down the equation governing the motion in terms of the displacement \(x\) m and time \(t\) seconds including the impulse \(u(t)\).
2. Write down the initial conditions on the displacement \((x)\) and velocity.
3. Solve the equation for displacement as a function of time.
4. Draw a graph of the oscillations for \(t=0\) to \(10\)s.

Solution

1. Since the system involves a restoring force and friction, after dividing through by the mass, the equation of motion may be written: \[\displaystyle \dfrac{d^2 x}{dt^2} + 2 \dfrac{dx}{dt} + 10 x = u(t) - u(t-5)\] where the right-hand side represents the impulse being switched on at \(t=0\) s and switched off at \(t=5\) s.
2. Since the system starts from rest \(x(0)=x'(0)=0\).
3. Taking the Laplace Transform of each term of the differential equation gives \[\displaystyle {\cal L}\left[\dfrac{d^2 x}{dt^2}\right] + 2{\cal L}\left[ \dfrac{dx}{dt} \right] + 10 {\cal L}\left[x\right] = {\cal L}\left[u(t)\right] - {\cal L}\left[u(t-5)\right]\] i.e. \(s^2 X(s) - s\,x(0) - x'(0) + 2 (s \, X(s) - x(0) ) + 10 X(s) = \frac{1}{s} - \frac{1}{s} \text{e}^{-5s}\)
but as \(x(0) = x'(0) = 0\), this simplifies to \(\ \displaystyle s^2 X(s) + 2 \; s \; X(s) + 10 X(s) = \frac{1}{s}\left[1-e^{-5s}\right]\) \[\begin{eqnarray*} \text{i.e.} \qquad X(s) &=& \frac{1}{s(s^2 + 2s + 10)}\left[ 1 - \text{e}^{-5s}\right]\\ &=& \left[\frac{1}{10}\cdot\frac{1}{s} - \frac{1}{10}\cdot \frac{s+2}{s^2+2s+10}\right]\left[ 1 - \text{e}^{-5s}\right]\ \text{(using partial fractions)} %\\ &=& \left[\frac{1}{10}\frac{1}{s} - \frac{1}{10} %\frac{s+1+1}{(s+1)^2 + 3^2 }\right]\left[ 1 - \text{e}^{-5s}\right] \\ &=& \left[\frac{1}{10}\cdot\frac{1}{s} - \frac{1}{10}\cdot \frac{s+1}{(s+1)^2 + 3^2} - \frac{1}{30}\cdot \frac{3}{(s+1)^2 + 3^2} \right]\left[ 1 - \text{e}^{-5s}\right] \\ &=& \frac{1}{10}\cdot\frac{1}{s} - \frac{1}{10}\cdot \frac{s+1}{(s+1)^2 + 3^2} - \frac{1}{30}\cdot \frac{3}{(s+1)^2 + 3^2} \\ &&- \frac{1}{10}\cdot\frac{1}{s} \text{e}^{-5s} + \frac{1}{10}\cdot \frac{s+1}{(s+1)^2 + 3^2}\text{e}^{-5s} + \frac{1}{30}\cdot \frac{3}{(s+1)^2 + 3^2}\text{e}^{-5s} \end{eqnarray*}\]
4. [Image: Figure shows a graph with a damped oscillation at 0.1m followed by another damped oscillation at 0m after the impulse.]
According to the graph the damped spring has a damped oscillation about a displacement of 0.1 m after the start of the impulse and a damped oscillation about a displacement of zero after the impulse has finished.

Solving systems of differential equations

The Laplace transform method is also well suited to solving systems of differential equations. A simple example will illustrate the technique.

Let \(x(t), \ y(t)\) be two independent functions which satisfy the coupled differential equations

\[\begin{eqnarray*} {dx\over {dt}}+y&=&\text{e}^{-t} \\ {dy\over{dt}}-x&=&3\text{e}^{-t} \\ x(0)&=&0, \quad y(0)=1\end{eqnarray*}\] Now, using a traditional approach, we could try to eliminate one of the unknown functions from this system: for example, from the first: \[\displaystyle {dy\over {dt}}=-\text{e}^{-t}-{d^2x\over {dt^2}} \text{ (taking the derivative and rearranging)}\] This can then be substituted in the second equation: \(\displaystyle{{dy\over {dt}}-x=3\text{e}^{-t}}\), to give: \[\displaystyle -{d^2x\over {dt^2}}-x=4\text{e}^{-t}\] which can then be solved in the normal way (either using the complementary function/particular integral approach or else the Laplace transform approach.) However, this approach is not workable if we have large numbers of first order differential equations to deal with. Let us instead use the Laplace transform directly.

If we use the notation that \[\displaystyle {\cal L}\{x(t)\}=X(s) \qquad \text{ and} \qquad {\cal L}\{y(t)\}=Y(s)\] then, by taking the Laplace transform of every term in the given differential equations, we obtain: \[\begin{eqnarray*} -x(0)+sX(s)+Y(s)&=&{1\over {s+1}}\\-y(0)+sY(s)-X(s)&=&{3\over {s+1}} \end{eqnarray*}\] which, using the initial conditions and rearranging gives \[\begin{eqnarray*} sX(s)+Y(s)&=&{1\over {s+1}}\\-X(s)+sY(s)&=&{s+4\over {s+1}}\quad \end{eqnarray*}\]

Key Point

Taking the Laplace transform converts a system of differential equations into
a system of algebraic simultaneous equations.

We can solve these algebraic equations (in \(X(s)\) and \(Y(s)\)) using a variety of techniques (inverse matrix; Cramer’s determinant method etc.) Here we will use Cramer’s method. \[\begin{eqnarray*} X(s)={ {\left| \begin{matrix} \frac{1}{s+1}&1\\ \frac{s+4}{s+1}&s \end{matrix} \right|} \over { \left| \begin{matrix} s&1\\ -1&s \end{matrix} \right| }} &=& \displaystyle{{\displaystyle{s\over{s+1}}- \displaystyle{{s+4\over {s+1}}}\over {s^2+1}}}\\ &=&{-4\over {(s^2+1)(s+1)}}={2(s-1)\over {s^2+1}}-{2\over {s+1}}\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad \end{eqnarray*}\] and \[\begin{eqnarray*} Y(s)={ {\left| \begin{matrix} s & \frac{1}{s+1}\\ -1& \frac{s+4}{s+1} \end{matrix} \right|} \over { \left| \begin{matrix} s&1\\ -1&s \end{matrix} \right| }}&=&{\displaystyle{{s(s+4)\over {s+1}}}+\displaystyle{{1\over {s+1}}}\over {s^2+1}}\\&=&{s^2+4s+1\over {(s^2+1)(s+1)}}=-{1\over {s+1}}+{2(s+1)\over {s^2+1}}\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad \end{eqnarray*}\]

The last lines in each case having been obtained using partial fractions. We can now invert \(X(s),\ Y(s)\) to find \(x(t),\ y(t)\): \[\begin{eqnarray*} x(t)={\cal L}^{-1}\{X(s)\}&=&2{\cal L}^{-1}\{{s\over {s^2+1}}\}-2{\cal L}^{-1}\{{1\over {s^2+1}}\}-2{\cal L}^{-1}\{{1\over {s+1}}\}\qquad\qquad\qquad\qquad\qquad\qquad\\&=&(2\cos t-2\sin t-2\text{e}^{-t})u(t) \\ y(t)={\cal L}^{-1}\{Y(s)\}&=&-{\cal L}^{-1}\{{1\over {s+1}}\}+2{\cal L}^{-1}\{{s\over {s^2+1}}\}+2{\cal L}^{-1}\{{1\over {s^2+1}}\}\\&=&(-\text{e}^{-t}+2\cos t+2\sin t)u(t) \end{eqnarray*}\] (Note that once the solution for \(x(t)\) is found the solution for \(y(t)\) may be easier to obtain by substituting in the differential equation: \(\displaystyle{y=\text{e}^{-t}-{dx\over {dt}}}\) rather than using Laplace transforms.)

Exercise

Use the Laplace transform to solve the coupled differential equations: \[ {dy\over {dt}}-x=0,\qquad {dx\over {dt}}+y=1,\qquad x(0)=-1,\quad y(0)=1\]

1. Begin by obtaining a system of algebraic equations for \(X(s)\) and \(Y(s)\):
\(X(s)\) + \(Y(s)\) =
\(X(s)\) + \(Y(s)\) =
2. Now solve these equations for \(X(s)\) and \(Y(s)\):
\(X(s) =\)
\(Y(s) =\)
3. Now find the required solution by obtaining the inverse Laplace transforms:
\(x(t) =\)
\(y(t) =\)
Feedback: 1. Writing \({\cal L}\{x(t)\}=X(s)\) and \({\cal L}\{y(t)\}=Y(s)\) you should obtain the set of transformed equations \[ \begin{align} -1+sY(s)-X(s)&=0, \\ 1+sX(s)+Y(s)&={1\over s} \end{align} \] which, when re-arranged, are \[ \begin{align} -X(s)+sY(s) &=1, \\ sX(s)+Y(s) &={1-s\over s}. \end{align} \] 2. \[ X(s)=-{s\over {1+s^2}}\qquad Y(s)={1\over s}-{1\over {1+s^2}}\] 3. You should obtain \(x(t)=-\cos t.u(t)\) and \(y(t)=(1-\sin t).u(t)\). This follows since \[ {\cal L}^{-1}\{-{s\over {1+s^2}}\}=-\cos t.u(t)\qquad {\cal L}^{-1}\{{1\over s}\}=u(t)\qquad {\cal L}^{-1}\{-{1\over {1+s^2}}\}=-\sin t.u(t) \]

Exercise

Solve the given system of differential equations for the initial conditions specified.

1. \[\frac{\mathrm{d}x}{\mathrm{d}t}=y\qquad \frac{\mathrm{d}y}{\mathrm{d}t}= x\qquad x(0)=1\quad y(0)=0\]
\(x(t) =\)
\(y(t) =\)
2. \[ \frac{\mathrm{d}x}{\mathrm{d}t}=4x-2y\qquad \frac{\mathrm{d}y}{\mathrm{d}t}= 5x+2y\qquad x(0)=2\quad y(0)=-2\]
\(x(t) =\)
\(y(t) =\)

The Laplace transform can also be used to solve a pair of coupled second order differential equations.

Solve, for the given initial conditions, \[\begin{align} \frac{\mathrm{d}^2x}{\mathrm{d}t^2} &= y+\sin t\qquad x(0)=1\quad x'(0)=0 \\ \frac{\mathrm{d}^2y}{\mathrm{d}t^2} &=-\frac{\mathrm{d}x}{\mathrm{d}t}+\cos t\qquad y(0)=-1\quad y'(0)=-1 \end{align}\] (Note that the initial conditions on each of \(x(t)\) and \(y(t)\) are needed in the second order situation.)

\(x(t) =\)

\(y(t) =\)

Applications of systems of differential equations

Coupled electrical circuits and mechanical vibrating systems involving several masses in springs offer examples of engineering systems modelled by systems of differential equations.

Electrical circuits

Consider the RL (resistance/inductance) circuit with a voltage \(v(t)\) applied as shown in the figure below.

[Image]

If \(i_1\) and \(i_2\) denote the currents in each loop we obtain, using Kirchhoff's voltage law:

(i) in the right loop: \(L_1\frac{\mathrm{d}i_1}{\mathrm{d}t}+R_2(i_1-i_2)+R_1i_1=v(t)\)

(ii) in the left loop: \(L_2\frac{\mathrm{d}i_2}{\mathrm{d}t}+R_2(i_2-i_1)=0\)

Example

Suppose, in the above circuit, that \(L_1=0.8\) henry, \(L_2=1\) henry, \(R_1=1.4\, \Omega \quad R_2=1\, \Omega\)

Assume zero initial conditions: \(i_1(0)=i_2(0)=0\).

Suppose that the applied voltage is constant: \( v(t)=100\) volts \(t\ge 0\).

Solve the problem by Laplace transforms.

Solution

Begin by obtaining \(V(s)\), the Laplace transform of \(v(t)\):

We have, from the definition of the Laplace transform: \[ V(s)=\int_0^{\infty}100\text{e}^{-st}dt=100\left[\dfrac{\text{e}^{-st}}{-s}\right]_0^{\infty}=\dfrac{100}{s}\] This is simply the Laplace transform of the step function of height 100.

Now insert the parameter values into the differential equations and obtain the Laplace transform of each equation. Denote by \(I_1(s), I_2(s)\) the Laplace transforms of the unknown currents. (These are equivalent to \(X(s)\) and \(Y(s)\) of the theory.):

\[\begin{align} 0.8\dfrac{di_1}{dt}+i_1-i_2+1.4i_1&=v(t) \\ \dfrac{di_2}{dt}+i_2-i_1&=0 \end{align}\] Rearranging and dividing the first equation by 0.8: \[\begin{align} \dfrac{di_1}{dt}+3i_1-1.25i_2&=1.25v(t) \\ \dfrac{di_2}{dt}-i_1+i_2&=0 \end{align} \] Taking Laplace transforms and inserting the initial conditions \(i_1(0)=0,\ i_2(0)=0\): \[\begin{align} (s+3)I_1(s)-1.25I_2(s)&=\dfrac{125}{s} \\ -I_1(s)+(s+1)I_2(s)&=0 \end{align}\]

Now solve these equations for \(I_1(s)\) and \(I_2(s)\). Put each expression into partial fractions and finally take the inverse Laplace transform to obtain \(i_1(t)\) and \(i_2(t)\):

We find \[ I_1(s)=\dfrac{125(s+1)}{s(s+1/2)(s+7/2)}=\dfrac{500}{7s}-\dfrac{125}{3(s+1/2)}-\dfrac{625}{21(s+7/2)}\] in partial fractions.

Hence \(\displaystyle i_1(t)=\dfrac{500}{7}-\dfrac{125}{3}\text{e}^{-t/2}-\dfrac{625}{21}\text{e}^{-7t/2}\)

Similarly \[ I_2(s)=\dfrac{125}{s(s+1/2)(s+7/2)}=\dfrac{500}{7s}-\dfrac{250}{3(s+1/2)} +\dfrac{250}{21(s+7/2)}\] which has inverse Laplace transform: \[ i_2(t)=\dfrac{500}{7}-\dfrac{250}{3}\text{e}^{-t/2}+\dfrac{250}{21}\text{e}^{-7t/2}\]

Notice in both cases that \(i_1(t)\) and \(i_2(t)\) tend to the steady state value \(\dfrac{500}{7}\) as \(t\) increases.

Exercise

For the above system, if \(m=1\), \(k=2\) and the initial conditions are \[ y_1(0)=1\quad y_1'(0)=\sqrt{6}\quad y_2(0)=1\quad y_2'(0)=-\sqrt{6}\] use Laplace transforms to solve the system of differential equations to find \(y_1(t)\) and \(y_2(t)\).

1. Begin by letting \(Y_1(s), Y_2(s)\) be the Laplace transforms of \(y_1(t), y_2(t)\) respectively and take the transforms of the differential equations, inserting the initial conditions, to get a system of algebraic equations:
\(Y_1(s)\) + \(Y_2(s)\) =
\(Y_1(s)\) + \(Y_2(s)\) =
2. Solve these equations (e.g. by Cramer's rule or by Gauss elimination) then use partial fractions and finally take inverse Laplace transforms:
\(y_1(t) =\)
\(y_2(t) =\)
Feedback: 1. \[ (s^2+4)Y_1-2Y_2=s+\sqrt{6}\] \[-2Y_1+(s^2+4)Y_2=s-\sqrt{6}\] 2. \[ Y_1(s)=\dfrac{(s+\sqrt{6})(s^2+4)+2(s-\sqrt{6})}{(s^2+4)^2-4}=\dfrac{s}{s^2+2}+\dfrac{\sqrt{6}}{s^2+6}\] from which \[ y_1(t)=\cos \sqrt{2} t+\sin\sqrt{6} t.\] A similar calculation gives \[ y_2(t)=\cos \sqrt{2} t-\sin\sqrt{6} t.\] We see that the motion of each mass is composed of two harmonic oscillations; the system model was undamped so, on this model, the vibration continues indefinitely.

Example

Charge on a capacitor

In the circuit shown in the figure below, the switch \(S\) is closed at \(t=0\) with a capacitor charge \(q(0)=q_0=\) constant and \(dq/dt(0)=0\).

[Image: A circuit with a resistor an inductor, and a capacitor in series.]

Show that \( q(t)=q_0(t)\text{e}^{-\alpha t}\left[ \cos\omega t+\dfrac{\alpha}{w}\sin \omega t\right]\) where \(\alpha=\dfrac{R}{2L}\) and \(\omega^2=\dfrac{1}{LC}-\alpha^2\)

Laplace transform properties required

The following properties are needed to solve this problem.

\[F(s+a)={\cal L}\{e^{-at}f(t)\}\] | (P1)
\[{\cal L}\left\{\dfrac{df(t)}{dt}\right\}=s\{f(t)\}-f(0)\] | (P2)
\[{\cal L}\left\{\dfrac{d^2f(t)}{dt^2}\right\}=s^2{\cal L}\{f(t)\}-\dfrac{df}{dt}(0)-s\ f(0)\] | (P3)
\[ {\cal L}\{\sin kt\}=\dfrac{k}{s^2+k^2} \quad \text{with} \quad s>0\] | (P4)
\[{\cal L}\{\cos kt\}=\dfrac{s}{s^2+k^2} \quad \text{with} \quad s>0\] | (P5)
\[{\cal L}^{-1}\{{\cal L}\{f(t)\}\}=f(t)\] | (P6)

Solution

STEP 1 Establish the differential equation for \(q(t)\) using, for example, Kirchhoff's law.

When the switch \(S\) is closed, the inductance \(L\), capacitance \(C\) and resistance \(R\) give rise to a.c. voltages related by \[ V_A-V_B=L\dfrac{di}{dt},\ V_B-V_D=R\ i,\ V_D-V_F=q/C \text{ respectively}\] So since \(V_A-V_F=(V_A-V_B)+(V_B-V_D)+(V_D-V_F)=0\) and \(i=\dfrac{dq}{dt}\) we have

\[ L\dfrac{d^2q}{dt^2}+R\frac{dq}{dt}+\frac{q}{C}=0 \tag{1}\]

STEP 2 Write the Laplace transform of the differential equation substituting for the initial conditions:

Since the Laplace transform is linear, the transform of differential Equation (1) is

\[ {\cal L}\left\{L\frac{d^2q}{dt^2}+R\frac{dq}{dt}+\frac{q}{C}\right\}=L{\cal L}\left\{\frac{d^2q}{dt^2}\right\}+R{\cal L}\left\{\frac{dq}{dt}\right\}+{\cal L}\{\dfrac{q}{C}\}=0. \tag{2}\]

We deal with each derivative term in turn: Using property (P3), \[ {\cal L}\left\{\frac{d^2q}{dt^2}\right\}=s^2{\cal L}\{q(t)\}-\frac{dq}{dt}(0)-s\ q(0).\] So, using the initial conditions \(q(0)=q_0\) and \(\dfrac{dq}{dt}(0)=0\) \[ {\cal L}\left\{\frac{d^2q}{dt^2}\right\}=s^2{\cal L}\{q(t)\}-s\ q_0. \tag{3}\]

By means of property (P2) \[ {\cal L}\left\{\frac{dq}{dt}\right\}=s{\cal L}\{q(t)\}-q_0 \tag{4} \]

STEP 3 Solve for the function \({\cal L}\{q(t)\}\) by substituting from (3) and (4) into Equation (2):

\[ L[s^2{\cal L}\{q(t)\}-sq_0]+R[s{\cal L}\{q(t)\}-q_0]+\dfrac{1}{C}{\cal L}\{q(t)\}=0\]\[\qquad\quad\Rightarrow\qquad {\cal L}\{q(t)\}[Ls^2+Rs+\dfrac{1}{C}]=Lsq_0+Rq_0\]

\[\qquad\quad\Rightarrow\qquad {\cal L}\{q(t)\}=\dfrac{(Ls+R)}{(Ls^2+Rs+\dfrac{1}{C})}q_0 \tag{5} \]

Using the definitions \(\alpha=\dfrac{R}{2L}\) and \(\omega^2=\dfrac{1}{LC}-\alpha^2\) enables the denominator in Equation (5) to be expressed as the sum of two squares, \[ \begin{align} L\ s^2+R \ s+\dfrac{1}{C}&=L[s^2+\dfrac{Rs}{L}+\dfrac{1} {LC}]=L[s^2+2\alpha s+\dfrac{1}{LC}] \\ &=L[s^2+2\alpha s+\alpha^2+\omega^2]=L[\{s+\alpha\}^2+\omega^2].\end{align}\] Consequently, with the new expression for the denominator, Equation (5) becomes \[ {\cal L}\{q(t)\}=q_0\left[\frac{s}{(s+\alpha)^2+\omega^2}+\frac{R}{L}\ \frac{1}{(s+\alpha)^2+\omega^2}\right]. \tag{6} \]

STEP 4 Use the inverse Laplace transform to obtain \(q(t)\):

The inverse Laplace transform is used to find \(q(t).\)

Taking the inverse Laplace transform of Equation (6) and using the linearity properties \[ {\cal L}^{-1}\{{\cal L}\{q(t)\}\}=q_0{\cal L}^{-1}\left\{\frac{s} {(s+\alpha)^2+\omega^2}+\frac{R}{L}\ \frac{1}{(s+\alpha)^2+\omega^2}\right\}.\] Using property (P6) this can be written as \[ q(t)=q_0{\cal L}^{-1}\left\{\frac{s+\alpha}{(s+\alpha)^2+\omega^2}+\frac{-\alpha}{(s+\alpha)^2+\omega^2}+\frac{R}{L\omega}\ \frac{\omega}{(s+\alpha)^2+\omega^2}\right\}. \] Using the linearity of the Laplace transform again \[ q(t)=q_0 {\cal L}^{-1}\left\{\frac{s+\alpha}{(s+\alpha)^2+\omega^2}\right\}+{\cal L}^{-1}\left\{\frac{-\alpha}{(s+\alpha)^2+\omega^2}\right\}+{\cal L}^{-1}\left\{\frac{R}{L\omega}\frac{\omega}{(s+\alpha)^2+\omega^2}\right\}. \tag{7}\]

Using properties (P1) and (P5) \[ {\cal L}^{-1}\left\{\frac{s+\alpha}{(s+\alpha)^2+\omega^2}\right\}=\text{e}^{-\alpha t}\cos \omega t. \tag{8}\]

Similarly, \[ {\cal L}^{-1}\left\{\frac{-\alpha}{(s+\alpha)^2+\omega^2}\right\}=-(\dfrac{\alpha}{\omega})\{\text{e}^{-\alpha t}\sin \omega t\} \tag{9} \]

and \[ {\cal L}^{-1}\left\{\frac{R}{L\omega}\ \frac{\omega}{(s+a)^2+\omega^2}\right\}=(\dfrac{R}{L\omega })\text{e}^{-\alpha t}\sin\omega t. \tag{10} \]

Substituting (8), (9) and (10) in (7) gives \[ q(t)=q_0 \text{e}^{-\alpha t}\left[\cos\omega t+\left\{-\dfrac{\alpha}{\omega}+\dfrac{R}{L\omega}\right\}\text{e}^{-\alpha t}\sin\omega t\right]. \tag{11} \]

STEP 5 Finally, show that for \(t>0\) the solution is \[(t)=q_0\text{e}^{-\alpha t}[\cos \omega t+(\dfrac{\alpha}{\omega})\sin\omega t]\] where \(\alpha=\dfrac{R}{2L}\) and \(\omega^2=\dfrac{1}{LC}-\alpha^2.\)

Substituting \(\alpha=\dfrac{R}{2L}\) in (11) gives \[ \begin{align} q(t)&=q_0 \text{e}^{-\alpha t}\left[\cos\omega t+[-\dfrac{\alpha}{\omega}+\dfrac{2\alpha}{\omega}]\text{e}^{-\alpha t}\sin \omega t\right] \\ &=q_0\text{e}^{-\alpha t}[\cos\omega t+\dfrac{\alpha}{\omega}\sin\omega t]. \end{align} \]

Example

Deflection of a uniformly loaded beam

Introduction
A uniformly loaded beam of length \(L\) is supported at both ends. The deflection \(y(x)\) is a function of horizontal position \(x\) and obeys the differential equation \[\frac{d^4y}{dx^4}(x)=\frac{1}{EI}q(x) \tag{1} \]

where \(E\) is Young's modulus, \(I\) is the moment of inertia and \(q(x)\) is the load per unit length at point \(x\). We assume in this problem that \(q(x) = q\) (a constant). The boundary conditions are (i) no deflection at \(x=0\) and \(x=L\) (ii) no curvature of the beam at \(x=0\) and \(x=L\).

[Image: Diagram showing a beam with uniform load across it.]

Problem in words

In addition to being subject to a uniformly distributed load, a beam is supported so that there is no deflection and no curvature of the beam at its ends. Applying a Laplace Transform to the differential equation (1), find the deflection of the beam as function of horizontal position along the beam.

Mathematical formulation of the problem

Find the equation of the curve \(y(x)\) assumed by the bending beam that solves (1). Use the coordinate system shown in Figure 1 where the origin is at the left extremity of the beam. In this coordinate system, the mathematical formulations of the boundary conditions which require that there is no deflection at \(x=0\) and \(x=L\), and that there is no curvature of the beam at \(x=0\) and \(x=L,\) are

1. \(y(0)=0\)
2. \(y(L)=0\)
3. \(\dfrac{d^2y}{dx^2}\big|_{x=0} = 0\)
4. \(\dfrac{d^2y}{dx^2}\big|_{x=L}=0\)

Note that \(\dfrac{dy(x)}{dx}\) and \(\dfrac{d^2y(x)}{dx^2}\) are respectively the slope and the radius of curvature of the curve at point \((x,y).\)

Mathematical analysis

The following Laplace transform properties are needed: \[\qquad\displaystyle {\cal L}\left\{\frac{d^nf(x)}{dx^n}\right\}=s^nF(s)-\sum_{k=1}^n\ s^{k-1}\ \frac{d^{n-k}f}{dx^{n-k}}\Bigg|_{x=0} \tag*{(P1)}\]

\[\qquad\displaystyle {\cal L}\left\{1\right\}=1/s \tag*{(P2)}\]

\[\qquad\displaystyle{\cal L}\left\{x^n\right\}=n!/x^{n+1}\tag*{(P3)}\]

\[\qquad\displaystyle {\cal L}^{-1}\left\{{\cal L}\left\{f(x)\right\}\right\}=f(x) \tag*{(P4)}\]

To solve a differential equation involving the unknown function \(f(x)\) using Laplace transforms

1. Write the Laplace transform of the differential equation using property (P1)
2. Solve for the function \({\cal L}\left\{f(x)\right\}\) using properties (P2) and (P3)
3. Use the inverse Laplace transform to obtain \(f(x)\) using property (P4)

Using the linearity properties of the Laplace transform, (1) becomes \[\qquad\displaystyle {\cal L}\left\{\frac{d^4y}{dx^4}(x)\right\}-{\cal L}\{\dfrac{q}{EI}\}=0.\] Using (P1) and (P2) \[\qquad\displaystyle s^4{\cal L}\{y(x)\}-\sum_{k=1}^4 s^{k-1}\frac{d^{4-k}y}{dx^{4-k}}\Bigg|_{x=0}-\frac{q}{EI}\ \frac{1}{s}=0.\tag{2} \]

The four terms of the sum are

\[\qquad\displaystyle \sum_{k=1}^4 s^{k-1}\frac{d^{4-k}y}{dx^{4-k}}=\frac{d^3y}{dx^3}\ \Bigg|_{x=0}+s\frac{d^2y}{dx^2}\Bigg|_{x=0}+s^2\frac{dy}{dx}\Bigg|_{x=0}+s^3y(0).\]

The boundary conditions give \(y(0)=0\) and \(\dfrac{d^2y}{dx^2}\Bigg|_{x=0}= 0.\) So (2) becomes \[\qquad\displaystyle s^4 L\{y(x)\}-\frac{d^3y}{dx^3}\ \Bigg|_{x=0}-s^2\frac{dy}{dx}\Bigg|_{x=0}-\frac{q}{EI}\ \frac{1}{s}=0.\tag{3} \]

Here \(\dfrac{d^3y}{dx^3}\ \Bigg|_{x=0}\) and \(\dfrac{dy}{dx}\Bigg|_{x=0}\) are unknown constants, but they can be determined by using the remaining two boundary conditions \(y(L)=0\) and \(\dfrac{d^2y}{dx^2}\ \Bigg|_{x=L}=0.\)

Solving for \({\cal L}\{y(x)\}\), (3) leads to

\[\qquad\displaystyle {\cal L}\{y(x)\}= \frac{1}{s^4}\ \frac{d^3y}{dx^3} \Bigg|_{x=0}+\frac{1}{s^2}\frac{dy}{dx}\Bigg|_{x=0}+\frac{q}{EI}\ \frac{1}{s^5}.\]

Using the linearity of the Laplace transform, the inverse Laplace transform of this equation gives

\[{\cal L}^{-1}\left\{{\cal L}\{y(x)\}\right\}= \dfrac{d^3y}{dx^3}\ \Bigg|_{x=0} \times {\cal L}^{-1}\left\{\dfrac{1}{s^4}\right\}\,+\,\dfrac{dy}{dx}\ \Bigg|_{x=0} \times {\cal L}^{-1}\left\{\frac{1}{s^2}\right\}\,+\,\frac{q}{EI}\ {\cal L}^{-1}\left\{\frac{1}{s^5}\right\}.\] Hence \[\qquad\displaystyle y(x) = \dfrac{d^3y}{dx^3}\ \Bigg|_{x=0} \times {\cal L}^{-1}\left\{3!\frac{1}{s^4}\right\}/3! \,+\,\frac{dy}{dx}\Bigg|_{x=0} \times {\cal L}^{-1}\left\{\frac{1}{s^2}\right\}\,+\,\frac{q}{EI}{\cal L}^{-1}\left\{4! \frac{1}{s^5}\right\}/4!\]

So using (P3)

\[\qquad\displaystyle y(x) = \frac{d^3y}{dx^3}\Bigg|_{x=0} \times {\cal L}^{-1} \{{\cal L}\{x^3\}\}/6\,+\,\frac{dy}{dx}\Bigg|_{x=0} \times {\cal L}^{-1}\{{\cal L}\{x^1\}\}\,+\,\frac{q}{EI} {\cal L}^{-1} \{{\cal L}\{x^4\}\}/24.\] Simplifying by means of (P4) \[\qquad\displaystyle y(x) =\frac{d^3y}{dx^3}\Bigg|_{x=0}\times x^3/6\,+\,\frac{dy}{dx}\Bigg|_{x=0}\times x\,+\, \frac{q}{EI} x^4/24. \tag{4}\]

To use the boundary condition \(\dfrac{d^2y}{dx^2}\Bigg|_{x=L}=0\), take the second derivative of (4), to obtain \[\qquad\displaystyle \frac{d^2y}{dx^2}(x)=\frac{d^3y}{dx^3}\Bigg|_{x=0}\times x+\frac{q}{2EI} x^2.\]

The boundary condition \(\dfrac{d^2y}{dx^2}\Bigg|_{x=L} = 0\) implies \[\qquad\displaystyle \frac{d^3y}{dx^3}\Bigg|_{x=0}=-\frac{q}{2EI} L. \tag{5} \]Using the last boundary condition \(y(L)=0\) with (5) in (4) \[\qquad\displaystyle \frac{dy}{dx}\Bigg|_{x=0}=\frac{qL^3}{24EI} \tag{6} \] Finally substituting (5) and (6) in (4) gives

\[\qquad\displaystyle y(x) =\frac{q}{24EI} x^4 -\frac{qL}{12EI} x^3 + \frac{qL^3}{24EI} x .\]

Interpretation

The predicted deflection is zero at both ends as required.

Note This problem was solved by an entirely different means (integrating the ODE) in HELM 19.4.

Consider the vibrating system shown:

[Image: A figure of 3 springs in series with 2 masses in between]

As you can see, the system consists of two equal masses, both \(m\), and 3 springs of the same stiffness \(k.\) The governing differential equations can be obtained by applying Newton’s second law (‘force equals mass times acceleration’): (recall that a single spring of stiffness \(k\) will experience a force \(−ky\) if it is displaced a distance \(y\) from its equilibrium.)

In our system therefore

\[m \dfrac{d^2y_1}{dt^2}= −ky_1 + k(y_2 − y_1)\]

\[m \dfrac{d^2y_2}{dt^2}= −k(y_2 − y_1) − ky_2\]

which is a pair of second order differential equations.