7.2. Linearity#
A linear second-order ODE has the form:
It is nonhomogeneous if \(r(x) \ne 0\) and homogeneous if \(r(x) = 0\). A second-order ODE requires two additional pieces of information to fully specify the problem.
If \(y(x_0)\) and \(y'(x_0)\) are prescribed at the same point \(x_0\), we have an initial value problem (IVP). This IVP is analogous to the one we had for first-order ODEs, and often occurs when the independent variable is time. Note that if \(p(x)\) and \(q(x)\) are continuous, the IVP has a unique solution!
However, we may also have information about the function at two different points \(x_0\) and \(x_1\), which we call a boundary value problem (BVP). For example, \(y(x_0)\) and \(y(x_1)\), their derivatives, or combinations of the two may be prescribed at different points. BVPs are often associated with problems where the independent variable represents a spatial coordinate. Note that, unlike an IVP, a unique solution is not guaranteed for a BVP.
7.2.1. Homogenous linear second-order ODEs#
This is an application of the principle of superposition. Importantly, this form of solution contains all general solutions for the homogeneous ODE. For example, to solve
You can guess and verify that \(y_1 = \cos x\) and \(y_2 = \sin x\) are both solutions since \(y_1'' = -\cos x\) and \(y_2'' = -\sin x\). So, the general solution is
To apply the initial condition, we will also need its first derivative
Using the initial conditions gives:
so
We will learn techniques for finding the basis of solution next.
Warning
Superposition does not work for nonhomogeneous ODES! Consider the modification:
This ODE is solved by \(y_1 = 1 + \cos x\) and \(y_2 = 1 + \sin x\). However, a multiple like \(2y_1\) or a combination like \(y_1 + y_2\) do not solve the ODE.
7.2.2. Nonhomogeneous linear second-order ODEs#
The coefficients in \(y_{\rm h}\) are used to “correct” the initial/boundary values of \(y_{\rm p}\) to satisfy the initial/boundary value problem. We will learn how to find particular solutions later.