Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

A linear second-order ODE has the form:

y+p(x)y+q(x)y=r(x)y'' + p(x) y' + q(x) y = r(x)

It is nonhomogeneous if r(x)0r(x) \ne 0 and homogeneous if r(x)=0r(x) = 0. A second-order ODE requires two additional pieces of information to fully specify the problem.

If y(x0)y(x_0) and y(x0)y'(x_0) are prescribed at the same point x0x_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)p(x) and q(x)q(x) are continuous, the IVP has a unique solution!

However, we may also have information about the function at two different points x0x_0 and x1x_1, which we call a boundary value problem (BVP). For example, y(x0)y(x_0) and y(x1)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.

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

y+y=0y(0)=3,y(0)=1/2y' + y = 0 \quad y(0) = 3, \quad y'(0) = -1/2

You can guess and verify that y1=cosxy_1 = \cos x and y2=sinxy_2 = \sin x are both solutions since y1=cosxy_1'' = -\cos x and y2=sinxy_2'' = -\sin x. So, the general solution is

y=c1cosx+c2sinxy = c_1 \cos x + c_2 \sin x

To apply the initial condition, we will also need its first derivative

y=c1sinx+c2cosxy' = -c_1 \sin x + c_2 \cos x

Using the initial conditions gives:

y(0)=c1=3y(0)=c2=12\begin{align} y(0) = c_1 = 3 \\ y'(0) = c_2 = -\frac{1}{2} \end{align}

so

y=3cosx12sinxy = 3\cos x - \frac{1}{2} \sin x

We will learn techniques for finding the basis of solution next.

Nonhomogeneous linear second-order ODEs

The coefficients in yhy_{\rm h} are used to “correct” the initial/boundary values of ypy_{\rm p} to satisfy the initial/boundary value problem. We will learn how to find particular solutions later.