Skip to main content

CLP-4 Vector Calculus

Section A.9 Review of Linear Ordinary Differential Equations

Definition A.9.1.

  1. A differential equation is an equation for an unknown function that contains the derivatives of that unknown function. For example \(y''(t)+y(t)=0\) is a differential equation for the unknown function \(y(t)\text{.}\)
  2. A differential equation is called an ordinary differential equation (often shortened to “ODE”) if only ordinary derivatives appear. That is, if the unknown function has only a single independent variable. A differential equation is called a partial differential equation (often shortened to “PDE”) if partial derivatives appear. That is, if the unknown function has more than one independent variable. For example \(y''(t)+y(t)=0\) is an ODE while \(\frac{\partial^2 u}{\partial\, t^2}(x,t)=c^2 \frac{\partial^2 u}{\partial\, x^2}(x,t)\) is a PDE.
  3. The order of a differential equation is the order of the highest derivative that appears. For example \(y''(t)+y(t)=0\) is a second order ODE.
  4. An ordinary differential equation that is of the form
    \begin{equation} a_0(t) y^{(n)}(t) + a_1(t) y^{(n-1)}(t)+\cdots +a_n(t)y(t) =F(t)\tag{A.9.1} \end{equation}
    with given coefficient functions \(a_0(t)\text{,}\) \(\cdots\text{,}\) \(a_n(t)\) and \(F(t)\) is said to be linear. Otherwise, the ODE is said to be nonlinear. For example, \(y'(t)^2+y(t)=0\text{,}\) \(y'(t)y''(t)+y(t)=0\) and \(y'(t)=e^{y(t)}\) are all nonlinear.
  5. The ODE (A.9.1) is said to have constant coefficients if the coefficients \(a_0(t)\text{,}\) \(a_1(t)\text{,}\) \(\cdots\text{,}\) \(a_n(t)\) are all constants. Otherwise, it is said to have variable coefficients. For example, the ODE \(y''(t)+7y(t)=\sin t\) is constant coefficient, while \(y''(t)+ty(t)=\sin t\) is variable coefficient.
  6. The ODE (A.9.1) is said to be homogeneous if \(F(t)\) is identically zero. Otherwise, it is said to be inhomogeneous or nonhomogeneous. For example, the ODE \(y''(t)+7y(t)=0\) is homogeneous, while \(y''(t)+7y(t)=\sin t\) is inhomogeneous. A homogeneous ODE always has the trivial solution \(y(t)=0\text{.}\)
  7. An initial value problem is a problem in which one is to find an unknown function \(y(t)\) that satisfies both a given ODE and given initial conditions, like \(y(t_0)=1\text{,}\) \(y'(t_0)=0\text{.}\) Note that all of the conditions involve the function \(y(t)\) (or its derivatives) evaluated at a single time \(t=t_0\text{.}\)
  8. A boundary value problem is a problem in which one is to find an unknown function \(y(t)\) that satisfies both a given ODE and given boundary conditions, like \(y(t_0)=0\text{,}\) \(y(t_1)=0\text{.}\) Note that the conditions involve the function \(y(t)\) (or its derivatives) evaluated at two different times.
The following theorem gives the form of solutions to the ODE (A.9.1).
As an example of the most commonly used techniques for solving linear, constant coefficient ODE's, we consider the RLC circuit, which is the electrical circuit consisting of a resistor of resistance \(R\text{,}\) a coil (or solenoid) of inductance \(L\text{,}\) a capacitor of capacitance \(C\) and a voltage source arranged in series, as shown below. Here \(R\text{,}\) \(L\) and \(C\) are all nonnegative constants.
We're going to think of the voltage \(x(t)\) as an input signal, and the voltage \(y(t)\) as an output signal. The goal is to determine the output signal produced by a given input signal. If \(i(t)\) is the current flowing at time \(t\) in the loop as shown and \(q(t)\) is the charge on the capacitor, then the voltages across \(R\text{,}\) \(L\) and \(C\text{,}\) respectively, at time \(t\) are \(Ri(t)\text{,}\) \(L\diff{i}{t}(t)\) and \(y(t)=\frac{q(t)}{C}\text{.}\) By the Kirchhoff's law 1  that says that the voltage between any two points has to be independent of the path used to travel between the two points, these three voltages must add up to \(x(t)\) so that
\begin{equation} Ri(t) + L\diff{i}{t}(t) + \frac{q(t)}{C} = x(t)\tag{A.9.3} \end{equation}
Assuming that \(R,\ L,\ C\) and \(x(t)\) are known, this is still one differential equation in two unknowns, \(i(t)\) and \(q(t)\text{.}\) Fortunately, there is a relationship between the two. Namely
\begin{equation} i(t)=\diff{q}{t}(t) = Cy'(t)\tag{A.9.4} \end{equation}
This just says that the capacitor cannot create or destroy charge on its own; all charging of the capacitor must come from the current. Substituting (A.9.4) into (A.9.3) gives
\begin{equation*} LCy''(t) + RCy'(t) + y(t) = x(t) \end{equation*}
As a concrete example, we'll take an ac voltage source and choose the origin of time so that \(x(0)=0\text{,}\) \(x(t)=E_0\sin(\om t)\text{.}\) Then the differential equation becomes
\begin{equation} LCy''(t)+RCy'(t)+y(t)=E_0\sin(\om t)\tag{A.9.5} \end{equation}
This is a second order, linear, constant coefficient ODE. So we know, from Theorem A.9.2, that the general solution is of the form \(y_p(t)+C_1y_1(t)+C_2y_2(t)\text{,}\) where
  • \(y_p(t)\text{,}\) the particular solution, is any one solution to (A.9.5),
  • \(C_1,C_2\) are arbitrary constants and
  • \(y_1(t)\text{,}\) \(y_2(t)\) are any two independent solutions of the corresponding homogeneous equation
    \begin{equation} LCy''(t)+RCy'(t)+y(t)=0\tag{A.9.6} \end{equation}
So to find the general solution to (A.9.5), we need to find three functions: \(y_1(t)\text{,}\) \(y_2(t)\) and \(y_p(t)\text{.}\)
  • Finding \(y_1(t)\) and \(y_2(t)\text{:}\) The best way to find \(y_1\) and \(y_2\) is to guess them. Any solution, \(y_h(t)\text{,}\) of (A.9.6) has to have the property that \(y_h(t)\text{,}\) \(RCy_h'(t)\) and \(LCy_h''(t)\) cancel each other out for all \(t\text{.}\) We choose our guess so that \(y_h(t)\text{,}\) \(y_h'(t)\) and \(y_h''(t)\) are all proportional to a single function of \(t\text{.}\) Then it will be easy to see if \(y_h(t)\text{,}\) \(RCy_h'(t)\) and \(LCy_h''(t)\) all cancel. All derivatives of the function \(e^{rt}\) are again proportional to \(e^{rt}\text{.}\) Hence we try \(y_h(t)=e^{rt}\text{,}\) with the constant \(r\) to the determined. This guess is a solution of (A.9.6) if and only if
    \begin{equation} \begin{split} &LCr^2e^{rt}+RCre^{rt}+e^{rt}=0 \iff LCr^2+RCr+1 =0 \\ &\hskip0.5in\iff r=\frac{-RC\pm\sqrt{R^2C^2-4LC}}{2LC}\equiv r_{1,2} \end{split}\tag{A.9.7} \end{equation}
    How we proceed depends on the sign of \(R^2C^2-4LC\text{.}\) That is, whether \(R \gt 2\sqrt{\frac{L}{C}}\) or \(R \lt 2\sqrt{\frac{L}{C}}\) or \(R = 2\sqrt{\frac{L}{C}}\text{.}\)
    • Finding \(y_1(t)\) and \(y_2(t)\text{,}\) when \(R \gt 2\sqrt{\frac{L}{C}}\text{:}\) Then \(R^2C^2-4LC \gt 0\text{,}\) and \(r_1\) and \(r_2\) are two different real numbers. We may take \(y_1(t)=e^{r_1t}\) and \(y_2(t)=e^{r_2t}\) so that the complimentary solution is \(C_1y_1(t)+C_2y_2(t)=C_1 e^{r_1t}+C_2e^{r_2 t} \text{.}\)
    • Finding \(y_1(t)\) and \(y_2(t)\text{,}\) when \(R \lt 2\sqrt{\frac{L}{C}}\text{:}\) Then \(R^2C^2-4LC \lt 0\) and \(r_1\) and \(r_2\) are the two different complex numbers \(-\rho\pm i\nu\text{,}\) where
      \begin{equation*} \rho=\frac{R}{2L}\qquad\text{and}\qquad \nu=\frac{\sqrt{4LC-R^2C^2}}{2LC} \end{equation*}
      We may again take \(C_1 e^{r_1t}+C_2e^{r_2 t}\) as the complimentray solution. However we can also rewrite \(C_1 e^{r_1t}+C_2e^{r_2 t}\) in terms of real valued functions by using that \(e^{\pm i\theta}=\cos\theta\pm i\sin\theta\text{:}\)
      \begin{align*} &C_1 e^{r_1t}+C_2e^{r_2 t} =e^{-\rho t}\big[C_1e^{i\nu t}+C_2e^{-i\nu t}\big]\\ &\hskip0.5in=e^{-\rho t}\big[C_1\big\{\cos(\nu t)+i\sin(\nu t)\big\}+ C_2\big\{\cos(\nu t)-i\sin(\nu t)\big\}\big]\\ &\hskip0.5in=e^{-\rho t}\big[D_1\cos(\nu t)+D_2\sin(\nu t)\big] \end{align*}
      where 2  \(D_1=C_1+C_2,\ D_2=i(C_1-C_2)\text{.}\) So we may also take \(y_1(t)=e^{-\rho t}\cos(\nu t)\text{,}\) \(y_2(t)=e^{-\rho t}\sin(\nu t)\) in the complementary solution.
      There is yet a third useful way to write the complementary solution. Think of \((D_1,D_2)\) as a point in the \(xy\)-plane. Call the polar coordinates of that point \(A\) and \(\theta\) so that \(D_1=A\cos\theta\) and \(D_2=A\sin\theta\text{.}\) Then, using the trig identity \(\cos(\alpha+\beta) =\cos \alpha\cos\beta-\sin \alpha\sin \beta\text{,}\) with \(\alpha=\nu t\) and \(\beta=-\theta\text{,}\)
      \begin{equation} \begin{split} &e^{-\rho t}\big[D_1\cos(\nu t)+D_2\sin(\nu t)\big]\\ &\hskip0.5in=e^{-\rho t}\big[A\cos(\nu t)\cos\theta+A\sin(\nu t)\sin\theta\big]\\ &\hskip0.5in=Ae^{-\rho t}\cos(\nu t-\theta) \end{split}\tag{A.9.8} \end{equation}
      We have, in effect, replaced the two arbitrary constants \(D_1\) and \(D_2\text{,}\) whose values would normally be determined by initial conditions, by two other arbitrary constants, \(R\) and \(\theta\text{,}\) whose values would also normally be determined by initial conditions.
    • Finding \(y_1(t)\) and \(y_2(t)\text{,}\) when \(R=2\sqrt{\frac{L}{C}}\text{:}\) Then \(R^2C^2-4LC=0\) so that \(r_1=r_2\text{.}\) We may take \(y_1=e^{r_1t}\text{,}\) but \(e^{r_2t}=e^{r_1t}\) is certainly not a second independent solution. So we still need to find \(y_2\text{.}\) Here is a trick (called reduction of order 3 ) for finding the other solutions: look for solutions of the form \(v(t)e^{-r_1 t}\text{.}\) Here \(e^{-r_1 t}\) is the solution we have already found and \(v(t)\) is to be determined. To save writing, set \(\rho=\frac{R}{2L}\) so that \(r_1=r_2=\rho\text{.}\) To save writing also divide ((A.9.5)\(_{\rm h}\)) by \(LC\) and substitute that \(\frac{R}{L}=2\rho\) and \(\frac{1}{LC}=\frac{R^2}{4L^2}=\rho^2\text{.}\) (Recall that we are assuming that \(R^2=\frac{4L}{C}\text{.}\)) So ((A.9.5)\(_{\rm h}\)) is equivalent to
      \begin{equation*} y_h''(t)+2\rho\,y_h'(t)+\rho^2\,y_h(t)=0 \end{equation*}
      Substitute in
      \begin{align*} y_h(t)&=\ \ \ v(t)e^{-\rho t}\\ y_h'(t)&= -\rho v(t)e^{-\rho t}+\phantom{2\rho}v'(t)e^{-\rho t}\\ y_h''(t)&= \phantom{-}\rho^2 v(t)e^{-\rho t}-2\rho v'(t)e^{-\rho t} +v''(t)e^{-\rho t} \end{align*}
      So when \(y_h(t)=v(t)e^{-\rho t}\text{,}\)
      \begin{align*} &y_h''(t)+2\rho\,y_h'(t)+\rho^2\,y_h(t)\\ &\hskip0.5in=\big[\rho^2\!-\!2\rho^2\!+\!\rho^2\big]v(t)e^{-\rho t} +\big[-2\rho\!+\!2\rho\big]v'(t)e^{-\rho t}+v''(t)e^{-\rho t}\\ &\hskip0.5in=v''(t)e^{-\rho t} \end{align*}
      Thus \(v(t)e^{-\rho t}\) is a solution of ((A.9.5)\(_{\rm h}\)) whenever the function \(v''(t)=0\) for all \(t\text{.}\) But, for any values of the constants \(C_1\) and \(C_2\text{,}\) \(v(t)=C_1+C_2t\) has vanishing second derivative so \(\big(C_1+C_2t\big)e^{-\rho t}=\big(C_1+C_2t\big)e^{-r_1 t}\) solves ((A.9.5)\(_{\rm h}\)). This is of the form \(C_1y_1(t)+C_2y_2(t)\) with \(y_1(t)=e^{-r_1t}\text{,}\) the solution that we found first, and \(y_2(t)=te^{-r_1t}\text{,}\) a second independent solution. So we may take \(y_2(t)=te^{r_1t}\text{.}\)
  • Finding \(y_p(t)\text{:}\) The best way to find \(y_p\) is to guess it. We guess that the circuit responds to an oscillating input voltage with an output voltage that oscillates at the same frequency. So we try \(y_p(t)=\mathcal{A}\sin(\om t-\varphi)\) with the amplitude \(\mathcal{A}\) and phase \(\varphi\) to be determined.
    For \(y_p(t)\) to be a solution, we need
    \begin{align*} LCy_p''(t)+RCy_p'(t)+y_p(t) &=E_0 \sin(\om t) \end{align*}
    or
    \begin{align*} &-LC\om^2\mathcal{A}\sin(\om t-\varphi)+RC\om \mathcal{A}\cos(\om t-\varphi) +\mathcal{A}\sin(\om t-\varphi)\\ &\hskip2in=E_0 \sin(\om t)\\ &\hskip2in=E_0 \sin(\om t-\varphi+\varphi) \end{align*}
    and hence, applying \(\sin(A+B)=\sin A\cos B+\cos A\sin B\) with \(A=\om t-\varphi\) and \(B=\varphi\text{,}\)
    \begin{align*} &\big(1-LC\om^2\big)\mathcal{A}\sin(\om t-\varphi)+RC\om \mathcal{A}\cos(\om t-\varphi)\\ &\hskip1in =E_0 \cos(\varphi)\sin(\om t-\varphi) + E_0 \sin(\varphi)\cos(\om t-\varphi) \end{align*}
    Matching coefficients of \(\sin(\om t-\varphi)\) and \(\cos(\om t-\varphi)\) on the left and right hand sides gives
    \begin{align} \big(1-LC\om^2\big)\mathcal{A}&= E_0 \cos(\varphi)\tag{A.9.9}\\ RC\om \mathcal{A}&=E_0 \sin(\varphi)\tag{A.9.10} \end{align}
    It is now easy to solve for \(\mathcal{A}\) and \(\varphi\)
    \begin{alignat*}{1} \frac{\knowl{./knowl/eqnODERden.html}{\text{(A.9.10)}}}{\knowl{./knowl/eqnODERnum.html}{\text{(A.9.9)}}} &\implies \tan(\varphi) = \frac{RC\om}{1-LC\om^2}\\ &\implies \varphi = \arctan\frac{RC\om}{1-LC\om^2}\\ \sqrt{\knowl{./knowl/eqnODERnum.html}{\text{(A.9.9)}}^2\!+\knowl{./knowl/eqnODERden.html}{\text{(A.9.10)}}^2} &\implies\sqrt{\big(1\!-\!LC\om^2\big)^2+R^2C^2\om^2}\ \mathcal{A}= E_0\\ &\implies \mathcal{A}=\frac{E_0}{\sqrt{(1\!-\!LC\om^2)^2+R^2C^2\om^2}} \end{alignat*}
Naturally, different input frequencies \(\om\) give different output amplitudes \(\mathcal{A}\text{.}\) Here is a graph of \(\mathcal{A}\) against \(\om\text{,}\) with all other parameters held fixed.
Note that there is a small range of frequencies that give a large amplitude response. This is the phenomenon of resonance. It is exploited in the design of radio and television tuning circuitry. It has also been dramatically illustrated in, for example, the collapse 4  of the Tacoma narrows bridge.
By part (b) of Theorem A.9.2, an initial value problem consisting of an \(n^{\rm th}\) order linear ODE with reasonable 5  coefficients and \(n\) initial conditions always has exactly one solution. We shall now see that a boundary value problem may have no solutions at all. Or it may have exactly one solution. Or it may have infinitely many solutions. We shall start by finding all solutions to the ODE
\begin{equation} y'+y=0\tag{A.9.11} \end{equation}
We shall then impose various boundary conditions and see what happens.
The function \(y(t)=e^{rt}\) is a solution to (A.9.11) if and only if
\begin{equation*} r^2e^{rt}+e^{rt}=0\iff r^2+1=0\iff r=\pm i \end{equation*}
where \(i\) (which electrical engineers often denote 6  \(j\)) is a square root of \(-1\text{.}\) Thus the general solution to the second order linear ODE (A.9.11) is \(y(t)=C'_1 e^{it}+C'_2e^{-it}\text{,}\) with \(C_1'\) and \(C_2'\) arbitrary constants. We may rewrite this general solution in terms of \(\sin t\) and \(\cos t\) by substituting in
\begin{equation*} e^{it}=\cos t+i\sin t\qquad e^{-it}=\cos t-i\sin t \end{equation*}
This gives
\begin{equation*} y(t)=C'_1\big(\cos t+i\sin t)+C'_2(\cos t-i\sin t) =C_1\cos t+C_2\sin t \end{equation*}
where \(C_1=C'_1+C'_2\text{,}\) and \(C_2=i(C'_1-C'_2)\text{.}\) Note that there is nothing stopping \(C_1'\) and \(C_2'\) from being complex numbers. So there is nothing stopping \(C_1=C'_1+C'_2\text{,}\) and \(C_2=i(C'_1-C'_2)\) from being real numbers.
  1. Now consider the boundary value problem
    \begin{equation} y'+y=0\qquad y(0)=0\qquad y(2\pi)=1\tag{A.9.12} \end{equation}
    The function \(y(t)\) satisfies the ODE if and only if it is of the form
    \begin{equation*} y(t)=C_1\cos t+C_2\sin t \end{equation*}
    for some constants \(C_1\) and \(C_2\text{.}\) A function of this form satisfies the boundary condition \(y(0)=0\) if and only if
    \begin{equation*} 0=y(0)= C_1\cos 0+C_2\sin 0 =C_1 \end{equation*}
    A function of this form satisfies the boundary condition \(y(2\pi)=1\) if and only if
    \begin{equation*} 1=y(2\pi)= C_1\cos 2\pi+C_2\sin 2\pi =C_1 \end{equation*}
    The two requirements \(C_1=0\) and \(C_1=1\) are incompatible. So the boundary value problem (A.9.12) has no solution at all.
  2. Next consider the boundary value problem
    \begin{equation} y'+y=0\qquad y(0)=0\qquad y\Big(\frac{\pi}{2}\Big)=0\tag{A.9.13} \end{equation}
    The function \(y(t)\) satisfies the ODE if and only if it is of the form
    \begin{equation*} y(t)=C_1\cos t+C_2\sin t \end{equation*}
    for some constants \(C_1\) and \(C_2\text{.}\) A function of this form satisfies the boundary condition \(y(0)=0\) if and only if
    \begin{equation*} 0=y(0)= C_1\cos 0+C_2\sin 0 =C_1 \end{equation*}
    A function of this form satisfies the boundary condition \(y\big(\frac{\pi}{2}\big)=0\) if and only if
    \begin{equation*} 0=y\Big(\frac{\pi}{2}\Big) = C_1\cos \Big(\frac{\pi}{2}\Big)+C_2\sin\Big(\frac{\pi}{2}\Big) =C_2 \end{equation*}
    So we have a solution if and only if \(C_1=C_2=0\) and the boundary value problem (A.9.13) has exactly one solution, namely \(y(t)=0\text{,}\) which is a bit dull.
  3. Finally consider the boundary value problem
    \begin{equation} y'+y=0\qquad y(0)=0\qquad y(2\pi)=0\tag{A.9.14} \end{equation}
    The function \(y(t)\) satisfies the ODE if and only if it is of the form
    \begin{equation*} y(t)=C_1\cos t+C_2\sin t \end{equation*}
    for some constants \(C_1\) and \(C_2\text{.}\) A function of this form satisfies the boundary condition \(y(0)=0\) if and only if
    \begin{equation*} 0=y(0)= C_1\cos 0+C_2\sin 0 =C_1 \end{equation*}
    A function of this form satisfies the boundary condition \(y(2\pi)=0\) if and only if
    \begin{equation*} 0=y(2\pi)= C_1\cos (2\pi)+C_2\sin(2\pi) =C_1 \end{equation*}
    So we have a solution if and only if \(C_1=0\) and the boundary value problem (A.9.14) has infinitely many solutions, namely \(y(t)=C_2\sin t\) with \(C_2\) being an arbitrary constant.
Gustav Robert Kirchhoff (1824--1887) was a German physicist.
Don't make the mistake of thinking that \(C_1\) and \(C_2\) have to be real numbers, forcing \(D_2\) to be pure imaginary. In most applications, \(D_1\) and \(D_2\) will be pure real and \(C_1\) and \(C_2\) will be complex.
The modern method of reduction of order was created by the French mathematician, physicist and music theorist Jean le Rond d'Alembert (1717-1783). The interested reader can easily search out more about his life.
There are videos of the collapse on the web.
For example, continuous.
This is to avoid confusion with the current, which is typically called \(i\text{.}\)