Skip to main content
Engineering LibreTexts

11.8: Differential Equations

  • Page ID
    23171
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Differential Equations

    It is often useful to describe systems using equations involving the rate of change in some quantity through differential equations. Recall that one important subclass of differential equations, linear constant coefficient ordinary differential equations, takes the form

    \[A y(t)=x(t) \label{11.27} \]

    where \(A\) is a differential operator of the form

    \[A=a_{n} \frac{d^{n}}{d t^{n}}+a_{n-1} \frac{d^{n-1}}{d t^{n-1}}+\ldots+a_{1} \frac{d}{d t}+a_{0} \label{11.28} \]

    The differential equation in Equation \ref{11.27} would describe some system modeled by \(A\) with an input forcing function \(x(t)\) that produces an output solution signal \(y(t)\). However, the unilateral Laplace transform permits a solution for initial value problems to be found in what is usually a much simpler method. Specifically, it greatly simplifies the procedure for nonhomogeneous differential equations.

    General Formulas for the Differential Equation

    As stated briefly in the definition above, a differential equation is a very useful tool in describing and calculating the change in an output of a system described by the formula for a given input. The key property of the differential equation is its ability to help easily find the transform, \(H(s)\), of a system. In the following two subsections, we will look at the general form of the differential equation and the general conversion to a Laplace-transform directly from the differential equation.

    Conversion to Laplace-Transform

    We can easily generalize the transfer function, \(H(s)\), for any differential equation. Below are the steps taken to convert any differential equation into its transfer function, i.e. Laplace-transform. The first step involves taking the Fourier Transform of all the terms in [link]. Then we use the linearity property to pull the transform inside the summation and the time-shifting property of the Laplace-transform to change the time-shifting terms to exponentials. Once this is done, we arrive at the following equation: \(a_0=1\).

    \[Y(s)=-\sum_{k=1}^{N} a_{k} Y(s) s^{-k}+\sum_{k=0}^{M} b_{k} X(s) s^{-k} \nonumber \]

    \[\begin{align}
    H(s) &=\frac{Y(s)}{X(s)} \nonumber \\
    &=\frac{\sum_{k=0}^{M} b_{k} s^{-k}}{1+\sum_{k=1}^{N} a_{k} s^{-k}}
    \end{align} \nonumber \]

    Conversion to Frequency Response

    Once the Laplace-transform has been calculated from the differential equation, we can go one step further to define the frequency response of the system, or filter, that is being represented by the differential equation.

    Note

    Remember that the reason we are dealing with these formulas is to be able to aid us in filter design. A LCCDE is one of the easiest ways to represent FIR filters. By being able to find the frequency response, we will be able to look at the basic properties of any filter represented by a simple LCCDE.

    Below is the general formula for the frequency response of a Laplace-transform. The conversion is simply a matter of taking the Laplace-transform formula, \(H(s)\), and replacing every instance of \(s\) with \(e^{iw}\).

    \[\begin{align}
    H(w) &=\left.H(s)\right|_{s, s=e^{j w}} \nonumber \\
    &=\frac{\sum_{k=0}^{M} b_{k} e^{-(j w k)}}{\sum_{k=0}^{N} a_{k} e^{-(j w k)}}
    \end{align} \nonumber \]

    Once you understand the derivation of this formula, look at the module concerning Filter Design from the Laplace-Transform (Section 12.9) for a look into how all of these ideas of the Laplace-transform (Section 11.1), Differential Equation, and Pole/Zero Plots (Section 12.5) play a role in filter design.

    Solving a LCCDE

    In order for a linear constant-coefficient difference equation to be useful in analyzing a LTI system, we must be able to find the systems output based upon a known input, \(x(t)\), and a set of initial conditions. Two common methods exist for solving a LCCDE: the direct method and the indirect method, the latter being based on the Laplace-transform. Below we will briefly discuss the formulas for solving a LCCDE using each of these methods.

    Direct Method

    The final solution to the output based on the direct method is the sum of two parts, expressed in the following equation:

    \[y(t)=y_{h}(t)+y_{p}(t) \nonumber \]

    The first part, \(y_{h}(t)\), is referred to as the homogeneous solution and the second part, \(y_{h}(t)\), is referred to as particular solution. The following method is very similar to that used to solve many differential equations, so if you have taken a differential calculus course or used differential equations before then this should seem very familiar.

    Homogeneous Solution

    We begin by assuming that the input is zero, \(x(t)=0\). Now we simply need to solve the homogeneous differential equation:

    \[\sum_{k=0}^{N} a_{k} y(t-k)=0 \nonumber \]

    In order to solve this, we will make the assumption that the solution is in the form of an exponential. We will use lambda, \(\lambda\), to represent our exponential terms. We now have to solve the following equation:

    \[\sum_{k=0}^{N} a_{k} \lambda^{t-k}=0 \nonumber \]

    We can expand this equation out and factor out all of the lambda terms. This will give us a large polynomial in parenthesis, which is referred to as the characteristic polynomial. The roots of this polynomial will be the key to solving the homogeneous equation. If there are all distinct roots, then the general solution to the equation will be as follows:

    \[y_{h}(t)=C_{1}\left(\lambda_{1}\right)^{t}+C_{2}\left(\lambda_{2}\right)^{t}+\ldots+C_{N}\left(\lambda_{N}\right)^{t} \nonumber \]

    However, if the characteristic equation contains multiple roots then the above general solution will be slightly different. Below we have the modified version for an equation where \(\lambda_1\) has \(K\) multiple roots:

    \[y_{h}(t)=C_{1}\left(\lambda_{1}\right)^{t}+C_{1} t\left(\lambda_{1}\right)^{t}+C_{1} t^{2}\left(\lambda_{1}\right)^{t}+\ldots+C_{1} t^{K-1}\left(\lambda_{1}\right)^{t}+C_{2}\left(\lambda_{2}\right)^{t}+\ldots+C_{N}\left(\lambda_{N}\right)^{t} \nonumber \]

    Particular Solution

    The particular solution, \(y_p(t)\), will be any solution that will solve the general differential equation:

    \[\sum_{k=0}^{N} a_{k} y_{p}(t-k)=\sum_{k=0}^{M} b_{k} x(t-k) \nonumber \]

    In order to solve, our guess for the solution to \(y_p(t)\) will take on the form of the input, \(x(t)\). After guessing at a solution to the above equation involving the particular solution, one only needs to plug the solution into the differential equation and solve it out.

    Indirect Method

    The indirect method utilizes the relationship between the differential equation and the Laplace-transform, discussed earlier, to find a solution. The basic idea is to convert the differential equation into a Laplace-transform, as described above, to get the resulting output, \(Y(s)\). Then by inverse transforming this and using partial-fraction expansion, we can arrive at the solution.

    \[L\left\{\frac{d}{d t} y(t)\right\}=s Y(s)-y(0) \nonumber \]

    This can be interatively extended to an arbitrary order derivative as in Equation \ref{11.39}.

    \[L\left\{\frac{d^{n}}{d t^{n}} y(t)\right\}=s^{n} Y(s)-\sum_{m=0}^{n-1} s^{n-m-1} y^{(m)}(0) \label{11.39} \]

    Now, the Laplace transform of each side of the differential equation can be taken

    \[L\left\{\sum_{k=0}^{n} a_{k} \frac{d^{k}}{d t^{k}} y(t)\right\}=L\{x(t)\} \nonumber \]

    which by linearity results in

    \[\sum_{k=0}^{n} a_{k} L\left\{\frac{d^{k}}{d t^{k}} y(t)\right\}=L\{x(t)\} \nonumber \]

    and by differentiation properties in

    \[\sum_{k=0}^{n} a_{k}\left(s^{k} L\{y(t)\}-\sum_{m=0}^{k-1} s^{k-m-1} y^{(m)}(0)\right)=L\{x(t)\}. \nonumber \]

    Rearranging terms to isolate the Laplace transform of the output,

    \[L\{y(t)\}=\frac{L\{x(t)\}+\sum_{k=0}^{n} \sum_{m=0}^{k-1} a_{k} s^{k-m-1} y^{(m)}(0)}{\sum_{k=0}^{n} a_{k} s^{k}}. \nonumber \]

    Thus, it is found that

    \[Y(s)=\frac{X(s)+\sum_{k=0}^{n} \sum_{m=0}^{k-1} a_{k} s^{k-m-1} y^{(m)}(0)}{\sum_{k=0}^{n} a_{k} s^{k}} \label{11.44}. \]

    In order to find the output, it only remains to find the Laplace transform \(X(s)\) of the input, substitute the initial conditions, and compute the inverse Laplace transform of the result. Partial fraction expansions are often required for this last step. This may sound daunting while looking at Equation \ref{11.44}, but it is often easy in practice, especially for low order differential equations. Equation \ref{11.44} can also be used to determine the transfer function and frequency response.

    As an example, consider the differential equation

    \[\frac{d^{2}}{d t^{2}} y(t)+4 \frac{d}{d t} y(t)+3 y(t)=\cos (t) \nonumber \]

    with the initial conditions \(y^{\prime}(0)=1\) and \(y(0)=0\). Using the method described above, the Laplace transform of the solution \(y(t)\) is given by

    \[Y(s)=\frac{s}{\left(s^{2}+1\right)(s+1)(s+3)}+\frac{1}{(s+1)(s+3)}. \nonumber \]

    Performing a partial-fraction decomposition, this also equals

    \[Y(s)=0.25 \frac{1}{s+1}-0.35 \frac{1}{s+3}+0.1 \frac{s}{s^{2}+1}+0.2 \frac{1}{s^{2}+1}. \nonumber \]

    Computing the inverse Laplace transform,

    \[y(t)=\left(0.25 e^{-t}-0.35 e^{-3 t}+0.1 \cos (t)+0.2 \sin (t)\right) u(t). \nonumber \]

    One can check that this satisfies that this satisfies both the differential equation and the initial conditions.

    Summary

    One of the most important concepts of DSP is to be able to properly represent the input/output relationship to a given LTI system. A linear constant-coefficient difference equation (LCCDE) serves as a way to express just this relationship in a discrete-time system. Writing the sequence of inputs and outputs, which represent the characteristics of the LTI system, as a difference equation helps in understanding and manipulating a system.


    This page titled 11.8: Differential Equations is shared under a CC BY license and was authored, remixed, and/or curated by Richard Baraniuk et al..