Skip to main content
Mathematics LibreTexts

12.1: Verifying that a Function is a Solution

  • Page ID
    121146
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    Learning Objectives
    1. Given a function, check whether that function does or does not satisfy a given differential equation.
    2. Verify whether a given function does or does not satisfy an initial condition.

    In this section we concentrate on analytic solutions to a differential equation. By analytic solution, we mean a "formula" such as \(y=f(x)\) that satisfies the given differential equation. We saw in Chapter 11 that we can check whether a function satisfies a differential equation (e.g., Example 11.8) by simple differentiation. In this section, we further demonstrate this process.

    Example 12.1

    Show that the function \(y(t)=(2 t+1)^{1 / 2}\) is a solution to the differential equation and initial condition

    \[\frac{d y}{d t}=\frac{1}{y}, \quad y(0)=1 . \nonumber \]

    Solution

    First, we check the derivative, obtaining

    \[\begin{aligned} \frac{d y(t)}{d t}=\frac{d(2 t+1)^{1 / 2}}{d t} & =\frac{1}{2}(2 t+1)^{-1 / 2} \cdot 2 \\ & =(2 t+1)^{-1 / 2}=\frac{1}{(2 t+1)^{1 / 2}}=\frac{1}{y} . \end{aligned} \nonumber \]

    Hence, the function satisfies the differential equation. We must also verify the initial condition. We find that \(y(0)=(2 \cdot 0+1)^{1 / 2}=1^{1 / 2}=1\). Thus the initial condition is also satisfied, and \(y(t)\) is indeed a solution.

    Example 12.2

    Consider the differential equation and initial condition

    \[\frac{d y}{d t}=1-y, \quad y(0)=y_{0} . \label{12.1}\]

    a) Show that the function \(y(t)=y_{0} e^{-t}\) is not a solution to this differential equation.

    b) Show that the function \(y(t)=1-\left(1-y_{0}\right) e^{-t}\) is a solution.

    Solution

    a) To check whether \(y(t)=y_{0} e^{-t}\) is a solution to the differential Equation \ref{12.1}, we substitute the function into each side ("left hand side", LHS; "right hand side". RHS) of the equation. We show the results in the columns of Table 12.1. After some steps in the simplification, we see that the two sides do not match, and conclude that the function is not a solution, as it fails to satisfy the equation

    Table 12.1: The function \(y(t)=y_{0} e^{-t}\) is not a solution to the differential Equation \ref{12.1}.
    LHS RHS
    \(\frac{d y}{d t}\) \(1-y\)
    \(\frac{d\left[y_{0} e^{-t}\right]}{d t}\) \(1-y_{0} e^{-t}\)
    \(-y_{0} e^{-t}\) \(\because\)

    b) Similarly, we check the second function. The calculations are shown in columns of Table 12.2.

    Plugging the function into each side of the \(\mathrm{DE}\) and simplifying (down the rows) leads to expressions that do not match.

    Table \(12.2:(b)\) The function \(y(t)=1-\) \(\left(1-y_{0}\right) e^{-t}\) is a solution to the differential equation \((12.1)\). The expressions we get by evaluating each side of the differential equation do match.
    LHS RHS
    \(\frac{d y}{d t}\) \(1-y\)
    \(\frac{d}{d t}\left[1-\left(1-y_{0}\right) e^{-t}\right]\) \(1-\left[1-\left(1-y_{0}\right) e^{-t}\right]\)
    \(-\left(1-y_{0}\right) \frac{d e^{-t}}{d t}\) \(\left(1-y_{0}\right) e^{-t}\)
    \(\left(1-y_{0}\right) e^{-t}\) \(\checkmark\)
    Example 12.3 (Height of water draining out of a cylindrical container)

    A cylindrical container with cross-sectional area \(A\) has a small hole of area a at its base, through which water leaks out. It can be shown that height of water \(h(t)\) in the container satisfies the differential equation\[\frac{d h}{d t}=-k \sqrt{h} \](where \(k\) is a constant that depends on the size and shape of the cylinder and its hole: \(k=\frac{a}{A} \sqrt{2 g}>0\) and \(g\) is acceleration due to gravity.)

    Show that the function

    \[h(t)=\left(\sqrt{h_{0}}-k \frac{t}{2}\right)^{2} \]

    is a solution to the differential equation (12.1.2) and initial condition \(h(0)=h_{0}\).

    Solution

    We first easily verify that the initial condition is satisfied. Substitute \(t=0\) into the function (12.1.3). Then we find \(h(0)=h_{0}\), verifying the initial conditions.

    To show that the differential equation (12.2) is satisfied, we differentiate the function in Equation (12.3):

    \[\begin{aligned} \frac{d h(t)}{d t}=\frac{d}{d t}\left(\sqrt{h_{0}}-k \frac{t}{2}\right)^{2} & =2\left(\sqrt{h_{0}}-k \frac{t}{2}\right) \cdot\left(\frac{-k}{2}\right) \\ & =-k\left(\sqrt{h_{0}}-k \frac{t}{2}\right)=-k \sqrt{h(t)} . \end{aligned} \nonumber \]

    Here we have used the power law and the chain rule, remembering that \(h_{0}, k\) are constants. Now we notice that, using Equation (12.3), the expression for \(\sqrt{h(t)}\) exactly matches what we have computed for \(d h / d t\). Thus, we have shown that the function in Equation (12.3) satisfies both the initial condition and the differential equation.

    Mastered Material Check
    1. Draw a diagram of the system described in Example 12.3.
    2. What set of units would be reasonable for each of the parameters in Example 12.3.
    3. Create a table to organize the calculations for this example, similar to Tables \(12.1\) and 12.2.

    As shown in Examples 12.1- 12.3, if we are told that a function is a solution to a differential equation, we can check the assertion and verify that it is correct or incorrect. A much more difficult task is to find the solution of a new differential equation from first principles.

    In some cases, integration, learned in second semester calculus, can be used. In others, some transformation that changes the problem to a more familiar one is helpful - an example of this type is presented in Section 12.2. In many cases, particularly those of so-called non-linear differential equations, great expertise and familiarity with advanced mathematical methods are required to find the solution to such problems in an analytic form, i.e. as an explicit formula. In such cases, approximation and numerical methods are helpful.


    This page titled 12.1: Verifying that a Function is a Solution is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Leah Edelstein-Keshet via source content that was edited to the style and standards of the LibreTexts platform.