A Complete Guide to Understanding Second Order Differential Equations
04.04.2022 • 7 min read
Rachel McLean
Subject Matter Expert
In this article, we’ll discuss the definition of second order differential equations, the difference between homogeneous and nonhomogeneous differential equations. Then, we’ll learn how to solve second order differential equations.
What is a second order differential equation? A differential equation is an equation that involves an unknown function and its derivatives.
The general equation for a linear second order differential equation is:
P(x)y’’+Q(x)y’+R(x)y=G(x)
y’’ indicates the second derivative of y with respect to x
y’ indicates the first derivative of y with respect to x
P(x), Q(x), and R(x) are each functions of x. We can call this equation linear because each of these functions is a function of x only. Each term on the left-hand side of the equation has one of these functions of x as its coefficient. Altogether, these terms are equal to G(x), another function of x.
It can be helpful to verbalize exactly what we’re solving for. When we solve the differential equation P(x)y’’+Q(x)y’+R(x)y=G(x), we’re solving for a function or set of functions y that satisfy the following condition: the product of some function P(x) and the second derivative y’’, plus the product of some function Q(x) and the first derivative y’, plus the product of some function R(x) and the function y, is equal to another function G(x).
You might also see the differential equation P(x)y’’+Q(x)y’+R(x)y=G(x) written using Leibniz’s notation, like this:
P(x)dx2d2y+Q(x)dxdy+R(x)y=G(x)
We will assume that the functions P(x), Q(x), and R(x) are constant coefficients. Then our equation looks like this, where a,b, and c are constants:
ay’’+by’+cy=G(t)
A differential equation is an equation that involves an unknown function and its derivatives.
What is the Difference Between the First Order and Second Order Differential Equations?
What is the order of a differential equation? The order of a differential equation is determined by the highest order derivative contained in the equation. For example:
In the equation dxdy+2xy=x, the highest derivative is dxdy. So, this equation is a first order differential equation.
In the equation y’’+5y’+6y=0, the highest derivative is y’’. So, this equation is a second order differential equation.
In the equation y(3)+3xy’−5y=ex, the highest derivative is y(3). So, this equation is a third order differential equation.
How to Solve Homogeneous Linear Second Order Differential Equations?
Next, we’ll learn how to find the general solution of homogeneous linear second order differential equations. To do this, we’ll first compare the difference between homogeneous and nonhomogeneous differential equations.
Nonhomogeneous Differential Equations
Take a look again at our general equation for a linear second order differential equation with constant coefficients:
ay’’+by’+cy=G(x)
If G(x)=0 for some x, then the equation is called nonhomogeneous. For example, y’’+y’−2y=sin(x) is a nonhomogeneous differential equation because sin(x)=0 for all x.
Homogeneous Differential Equations
Once more, here’s our general equation for a linear second order differential equation with constant coefficients:
ay’’+by’+cy=G(x)
If G(x)=0 for all x and a=0, then the equation is called homogeneous. Now, our equation looks like this:
ay’’+by’+cy=0
We want to find the function (or set of functions) y that satisfies this equation. To solve for this function, it might be helpful to ask yourself this question: for what function is the product of a constant and the function’s second derivative, plus the product of another constant and the function’s first derivative, plus the product of a third constant and the function, equal to 0?
For each equation of this type, we can write its corresponding characteristic equation. This equation is also known as the auxiliary equation of ay’’+by’+cy=0:
ar2+br+c=0
Finding the roots of this equation helps us to find the general solution of the differential equation. The roots of an equation are the x-intercepts or “zeros.”
We can often find the roots of an equation by factoring. When factoring doesn’t work, we can use the quadratic formula to find the roots r1 and r2:
r=2a−b±b2−4ac
The expression b2−4ac is called the discriminant. Finding the roots r1 and r2 of the auxiliary equation, and determining the sign of the discriminant, provides us with the general solution to the differential equation.
There are three possible cases:
Using the table above, here are 3 simple steps to finding the general solution for a homogeneous linear second order differential equation:
Step 1
Write the auxiliary equation ar2+br+c=0.
Step 2
Find the roots of the auxiliary equation by factoring or using the quadratic formula.
Step 3
Based on the sign of the discriminant, use the table above to plug the roots into the general solution formula.
Let’s try to understand why the exponential function plays a large role in determining the general solution. Consider the function f(x)=erx for some constant r. Its derivative f’(x)=rerx is simply a constant multiple of f(x) itself. Its second derivative is f’’(x)=r2erx, which is again a constant multiple of the function f(x).
To see how this plays out in finding the general solution, let’s take a simple example of a homogeneous linear differential equation, y’’−y=0. We can rewrite this equation as y’’=y. This equation is asking us, “what function is equal to its second derivative?”
The exponential function y=ex satisfies that question, as does Cex or Ce−x. We can verify this by finding the auxiliary equation using a=1,b=0, and c=−1 to get r2−1=0. By factoring this equation, we find that the roots are r=1 and r+1. Then, the general solution to y=ex is y=C1ex+C2e−x.
So, the exponential function plays a big role in answering the question, “what is the general solution of a second order differential equation”?
John Urschel, a doctoral candidate in applied mathematics at the Massachusetts Institute of Technology and a retired NFL guard, talks a bit more about exponential functions:
Example 1 - Distinct Real Roots
Find the general solution of y’’+3y’−10y=0.
The auxiliary equation for y’’+3y’−10y=0 is r2+3r−10=0. Now, we can factor this equation to find:
r2+3r−10=0
(r+5)(r−2)=0
r1=−5,r2=2
We have two real roots and our discriminant b2−4ac>0. Using the table, we can now plug our roots into the general solution formula y=c1er1x+c2er2x.
So, our general solution is:
y=c1e−5x+c2e2x
Example 2 - Repeated Roots
Find the general solution of y’’−6y’+9y=0.
The auxiliary equation for y’’−6y’+9y=0 is r2−6r+9=0.
Now, we can factor this equation to find:
r2−6r+9=0
(r−3)(r−3)=0
(r−3)2=0
r=3
This means that r=3 is a repeated root and our discriminant b2−4ac=0. Using the table, we can now plug our root into the general solution formula y=c1erx+c2xerx.
So, our general solution is:
y=c1e3x+c2xe3x
Example 3 - Complex Roots
Find the general solution of y’’−4y’+13y=0.
The auxiliary equation for y’’−4y’+13y=0 is r2−4r+13=0. Now, using the quadratic formula, let’s find the roots of this equation using a=1,b=−4, and c=13.
r=2a−b±b2−4ac
r=2(1)4±42−4(1)(13)
r=24±16−52
r=24±−36
At this point, notice that our discriminant b2−4ac=−36. This means that we will have two complex roots. As we continue, remember that i=−1.
r=24±36⋅−1
r=24±6i
r=2±3i
So, r1=2+3i and r2=2−3i. Now, using our table, this means that α=2 and B=3. We can now plug α=2 and B=3 into the general solution formula y=eαx(c1cos(Bx)+c2sin(Bx).
Outlier (from the co-founder of MasterClass) has brought together some of the world's best instructors, game designers, and filmmakers to create the future of online college.