Skip to main content
Mathematics LibreTexts

7.1: Examples of Analytical Solutions

  • Page ID
    96064
  • \( \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}}\)

    7.1.1. Initial value problem

    One classic initial value problem is the \(R C\) circuit. With \(R\) the resistor and \(C\) the capacitor, the differential equation for the charge \(q\) on the capacitor is given by

    \[R \frac{d q}{d t}+\frac{q}{C}=0 . \nonumber \]

    If we consider the physical problem of a charged capacitor connected in a closed circuit to a resistor, then the initial condition is \(q(0)=q_{0}\), where \(q_{0}\) is the initial charge on the capacitor.

    The differential equation (7.1) is separable, and separating and integrating from time \(t=0\) to \(t\) yields

    \[\int_{q_{0}}^{q} \frac{d q}{q}=-\frac{1}{R C} \int_{0}^{t} d t \nonumber \]

    which can be integrated and solved for \(q=q(t)\) :

    \[q(t)=q_{0} e^{-t / R C} . \nonumber \]

    The classic second-order initial value problem is the \(R L C\) circuit, with differential equation

    \[L \frac{d^{2} q}{d t^{2}}+R \frac{d q}{d t}+\frac{q}{C}=0 . \nonumber \]

    Here, a charged capacitor is connected to a closed circuit, and the initial conditions satisfy

    \[q(0)=q_{0}, \quad \frac{d q}{d t}(0)=0 \nonumber \]

    The solution is obtained for the second-order equation by the ansatz

    \[q(t)=e^{r t} \nonumber \]

    which results in the following so-called characteristic equation for \(r\) :

    \[L r^{2}+R r+\frac{1}{C}=0 \nonumber \]

    If the two solutions for \(r\) are distinct and real, then the two found exponential solutions can be multiplied by constants and added to form a general solution. The constants can then be determined by requiring the general solution to satisfy the two initial conditions. If the roots of the characteristic equation are complex or degenerate, a general solution to the differential equation can also be found.

    7.1.2. Boundary value problems

    The dimensionless equation for the temperature \(y=y(x)\) along a linear heatconducting rod of length unity, and with an applied external heat source \(f(x)\), is given by the differential equation

    \[-\frac{d^{2} y}{d x^{2}}=f(x) \nonumber \]

    with \(0 \leq x \leq 1\). Boundary conditions are usually prescribed at the end points of the rod, and here we assume that the temperature at both ends are maintained at zero so that

    \[y(0)=0, \quad y(1)=0 \nonumber \]

    The assignment of boundary conditions at two separate points is called a twopoint boundary value problem, in contrast to the initial value problem where the boundary conditions are prescribed at only a single point. Two-point boundary value problems typically require a more sophisticated algorithm for a numerical solution than initial value problems.

    Here, the solution of (7.2) can proceed by integration once \(f(x)\) is specified. We assume that

    \[f(x)=x(1-x) \nonumber \]

    so that the maximum of the heat source occurs in the center of the rod, and goes to zero at the ends.

    The differential equation can then be written as

    \[\frac{d^{2} y}{d x^{2}}=-x(1-x) \nonumber \]

    The first integration results in

    \[\begin{aligned} \frac{d y}{d x} &=\int\left(x^{2}-x\right) d x \\ &=\frac{x^{3}}{3}-\frac{x^{2}}{2}+c_{1} \end{aligned} \nonumber \]

    where \(c_{1}\) is the first integration constant. Integrating again,

    \[\begin{aligned} y(x) &=\int\left(\frac{x^{3}}{3}-\frac{x^{2}}{2}+c_{1}\right) d x \\ &=\frac{x^{4}}{12}-\frac{x^{3}}{6}+c_{1} x+c_{2} \end{aligned} \nonumber \]

    where \(c_{2}\) is the second integration constant. The two integration constants are determined by the boundary conditions. At \(x=0\), we have

    \[0=c_{2} \nonumber \]

    and at \(x=1\), we have

    \[0=\frac{1}{12}-\frac{1}{6}+c_{1} \nonumber \]

    so that \(c_{1}=1 / 12\). Our solution is therefore

    \[\begin{aligned} y(x) &=\frac{x^{4}}{12}-\frac{x^{3}}{6}+\frac{x}{12} \\ &=\frac{1}{12} x(1-x)\left(1+x-x^{2}\right) \end{aligned} \nonumber \]

    The temperature of the rod is maximum at \(x=1 / 2\) and goes smoothly to zero at the ends.

    7.1.3. Eigenvalue problem

    The classic eigenvalue problem obtained by solving the wave equation by separation of variables is given by

    \[\frac{d^{2} y}{d x^{2}}+\lambda^{2} y=0 \nonumber \]

    with the two-point boundary conditions \(y(0)=0\) and \(y(1)=0\). Notice that \(y(x)=0\) satisfies both the differential equation and the boundary conditions. Other nonzero solutions for \(y=y(x)\) are possible only for certain discrete values of \(\lambda\). These values of \(\lambda\) are called the eigenvalues of the differential equation.

    We proceed by first finding the general solution to the differential equation. It is easy to see that this solution is

    \[y(x)=A \cos \lambda x+B \sin \lambda x \nonumber \]

    Imposing the first boundary condition at \(x=0\), we obtain

    \[A=0 \nonumber \]

    The second boundary condition at \(x=1\) results in

    \[B \sin \lambda=0 \nonumber \]

    Since we are searching for a solution where \(y=y(x)\) is not identically zero, we must have

    \[\lambda=\pi, 2 \pi, 3 \pi, \ldots \nonumber \]

    The corresponding negative values of \(\lambda\) are also solutions, but their inclusion only changes the corresponding values of the unknown \(B\) constant. A linear superposition of all the solutions results in the general solution

    \[y(x)=\sum_{n=1}^{\infty} B_{n} \sin n \pi x . \nonumber \]

    For each eigenvalue \(n \pi\), we say there is a corresponding eigenfunction \(\sin n \pi x\). When the differential equation can not be solved analytically, a numerical method should be able to solve for both the eigenvalues and eigenfunctions.


    This page titled 7.1: Examples of Analytical Solutions is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Jeffrey R. Chasnov via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.