Last modified on February 14th, 2025

chapter outline

 

Second-Order Linear Differential Equation

A second-order linear differential equation is an equation of the form:

a(x)y′′ + b(x)y′ + c(x)y = f(x)

Here

  • y” represents the second derivative of y with respect to x
  • y’ is the first derivative
  • y is the unknown function
  • a(x), b(x), and c(x) are coefficient functions with a(x) ≠ 0
  • f(x) is a given function (also called the forcing function)

This equation is classified as second-order because it involves the second derivative of an unknown function. It is termed linear as the function y, and its derivatives appear in a linear form (without being multiplied). 

Example

A common example is the equation that models the motion of a mass mmm attached to a spring with spring constant k and damping coefficient c:

${m\dfrac{d^{2}x}{dt^{2}}+c\dfrac{dx}{dt}+kx=0}$

This represents simple harmonic motion in a mass-spring system.

Types 

Second-order linear differential equations can be classified into two types: homogeneous and non-homogeneous.

Homogeneous

A second-order differential equation is homogeneous if:

a(x)y′′ + b(x)y′ + c(x)y = 0

Here,

  • f(x) = 0

This means there is no forcing function.

${\dfrac{d^{2}y}{dx^{2}}+4y=0}$ represents a second-order linear differential homogenous equation.

Non-Homogeneous

A second-order differential equation is non-homogeneous if:

a(x)y′′ + b(x)y′ + c(x)y = f(x)

Here

  • f(x) is a forcing function 

${\dfrac{d^{2}y}{dx^{2}}+2\dfrac{dy}{dx}-y=x}$ represents a second-order linear differential non-homogenous equation.

To solve these equations, we use different methods depending on the type of the equation.

Solving Homogeneous Equations

The solution to a homogeneous second-order linear differential equation is obtained using the characteristic equation method.

By Characteristic Equation

For a homogeneous equation, we assume a solution of the form: y = erx 

Substituting y into the equation gives the characteristic equation:

ar2 + br + c = 0

Solving for r, we obtain the roots that determine the general solution:

  • Real and Distinct Roots (r1, r2):
    ${y=C_{1}e^{r_{1}x}+C_{2}e^{r_{2}x}}$ 
  • Real and Repeated Roots (r):
    ${y=\left( C_{1}+C_{2}x\right) e^{rx}}$
  • Complex Conjugate Roots (α ± iβ):
    y = eαx(C1 cos βx + C2 sin βx)
    This form arises from Euler’s formula, expressing exponentials in terms of sine and cosine functions.

Problem: SOLVING a second-order linear differential equation by the CHARACTERISTIC EQUATION METHOD

Solve: y′′ – 7y′ + 12y = 0

Solution:

Given, y′′ – 7y′ + 12y = 0
Step 1: Forming the Characteristic Equation
r2 – 7r + 12 = 0
Step 2: Solve for r
Factoring the quadratic equation, we get
⇒ r2 – 4r – 3r + 12 = 0
⇒ r(r – 4) – 3(r – 4) = 0
⇒ (r – 3)(r – 4) = 0
⇒ r = 3 and 4
Step 3: Finding the Solution 
Since both roots are real and distinct, the solution is:
y = C1 e3x + C2​ e4x 
Here, C1 and C2 are arbitrary constants.

Solving Non-Homogeneous Equations

The solution to a non-homogeneous second-order linear differential equation can be found by the methods of undetermined coefficients or variations of parameters.

By Undetermined Coefficients

If the non-homogeneous term f(x) is a simple function (e.g., polynomial, exponential, sine, or cosine), we assume a trial solution and then determine the coefficients.

In this method, the solution takes the form: 

y = yc + yp

Here,

  • yc is the solution to the homogeneous equation (called complementary function)
  • yp is a particular solution that depends on f(x)

Problem: SOLVING a second-order linear differential equation by the UNDETERMINED COEFFICIENTS METHOD

Solve: y′′ – y = ex

Solution:

Given, y′′ – y = ex 
Step 1: Solving the Homogeneous Equation
y′′ – y = 0
The characteristic equation is:
r2 – 1 = 0
⇒ r = ±1
Thus, the homogeneous solution is:
yc = C1​ex + C2e-x  
Step 2: Finding a Particular Solution
Since f(x) = ex, we try with:
yp = Axex 
Step 3: Differentiating
⇒ ${y_{p}’}$ = Aex + Axex 
⇒ ${y_{p}”}$ = Aex + Aex + Axex = 2Aex + Axex 
Step 4: Substituting into the Equation
⇒ (2Aex + Axex) – (Axex) = ex 
⇒ 2Aex = ex 
Step 5: Solving for A
⇒ A = ${\dfrac{1}{2}}$
Thus, the particular solution is: 
yp = ${\dfrac{xe^{x}}{2}}$
Step 6: Writing the Final Solution 
Thus, the general solution is:
y = ${C_{1}e^{x}+C_{2}e^{-x}+\dfrac{xe^{x}}{2}}$
Here, C1 and C2 are arbitrary constants.

By Variation of Parameters

This method is used when g(x) is logarithmic or more complex, and the undetermined coefficients method does not work.

In this method, for the equation: y′′ + ay′ + by = f(x),

The general solution takes the form: y = yc + yp

Here,

  • yc is the solution to the homogeneous equation (called complementary function)
  • yp is a particular solution that depends on f(x)

For a particular solution of the form yp, we get:

yp​ = u1y1 + u2y2  ​

⇒ yp = ${-y_{1}\int \dfrac{y_{2}f\left( x\right) }{W}+y_{2}\int \dfrac{y_{1}f\left( x\right) }{W}}$

Here,

  • W is the Wronskian determinant of y1 and y2 
  • ${u_{1}’=-\dfrac{y_{2}f\left( x\right) }{W}}$
  • ${u_{2}’=\dfrac{y_{1}f\left( x\right) }{W}}$

Since y1 and y2 are linearly independent, the Wronskian value cannot be equal to zero. ${u_{1}’}$ and ${u_{2}’}$ are derived using the determinant method. 

Problem: SOLVING a second-order linear differential equation by the VARIATION OF PARAMETERS METHOD

Solve: ${y”-y=\dfrac{e^{x}}{x}}$

Solution:

Given, ${y”-y=\dfrac{e^{x}}{x}}$
Step 1: Solving the Homogeneous Equation
The associated homogeneous equation is: y” – y = 0
The characteristic equation is: r2 – 1 = 0 ⇒ r = ±1
Thus, the roots are r1 = 1 and r2​ = -1, giving the homogeneous solution:
yc = C1ex + C2e-x 
Thus, we have
y1 = ex and y2 = e-x  
Step 2: Assuming a Particular Solution 
Let us assume yp = u1ex + u2e-x 
Differentiating with respect to x,
⇒ ${y_{p}’}$ = ${u_{1}’e^{x}+u_{1}e^{x}+u_{2}’e^{-x}+u_{2}e^{-x}}$
Imposing the simplification condition,
⇒ ${u_{1}’e^{x}+u_{2}’e^{-x}=0}$
Differentiating again, we get
⇒ ${y_{p}”}$ = ${u_{1}’e^{x}+u_{1}e^{x}+u_{2}’e^{-x}+u_{2}e^{-x}}$
Since y′′ – y cancels homogeneous terms, we substitute:
${u_{1}’e^{x}+u_{2}’e^{-x}=0}$ …..(i)
​${u_{1}’e^{x}-u_{2}’e^{-x}=\dfrac{e^{x}}{x}}$ …..(ii)
Step 3: Solving for ${u_{1}’}$ and ${u_{2}’}$
Adding equations (i) and (ii),
${2u_{1}’e^{x}=\dfrac{e^{x}}{x}}$
⇒ ${u_{1}’=\dfrac{1}{2x}}$
Subtracting the equations (i) and (ii),
${2u_{2}’e^{-x}=-\dfrac{e^{x}}{x}}$
⇒ ${u_{2}’=-\dfrac{e^{2x}}{2x}}$
Step 4: Integrating to Find u1 and u2 
u1 = ${\int \dfrac{1}{2x}dx}$ = ${\dfrac{1}{2}\ln \left| x\right|}$
u2 = ${\int \dfrac{e^{2x}}{2x}dx}$ 
The second integral is complex and typically solved using integration by parts.
Step 5: Writing the Particular Solution
Thus,
yp = ${\dfrac{1}{2}\left( \ln \left| x\right| \right) e^{x}+\left( \int -\dfrac{e^{2x}}{2x}dx\right) e^{-x}}$
Step 6: Writing the Final Solution 
Thus, the general solution is:
y = C1ex + C2e-x + ${\dfrac{1}{2}\left( \ln \left| x\right| \right) e^{x}+\left( \int -\dfrac{e^{2x}}{2x}dx\right) e^{-x}}$ 
Here, C1 and C2 are arbitrary constants.

Note: Second-order linear differential equations are a specific type of nth-order differential equations, which involve higher-order derivatives. Various solution methods, such as the characteristic equation, undetermined coefficients, and variation of parameters, can be applied to higher-order cases as well. In many instances, these equations can be converted into a system of first-order equations and solved efficiently using matrix methods.

Initial Value Problem (IVP)

When solving a second-order linear differential equation, the general solution contains two arbitrary constants (denoted as C1​ and C2​). To obtain a unique solution, we apply initial conditions or boundary conditions that specify particular values for the function and its derivatives at a given point.

Let us now solve a second-order linear differential equation with an initial condition and determine the unique solution.

Solve y′′ – y = 0 with y(0) = 2 and y′(0) = 3.

Solution:

Given, y” – y’ = 0
Step 1: Solving the Homogeneous Equation
The characteristic equation is: 
r2 – 1 = 0 ⇒ r = ±1
Thus, the general solution is: y = C1ex + C2e-x 
Step 2: Applying Initial Conditions
y(0) = 2 ⇒ C1e0 + C2e-0 = 2 ⇒ C1 + C2 = 2 …..(i)
y’(x) = C1ex – C2e-x 
y’(0) = 3 ⇒ C1e0 – C2e-0 = 3 ⇒ C1 – C2 = 3 …..(ii)
Adding equations (i) and (ii),
(C1 + C2) + (C1 – C2) = 2 + 3
⇒ 2C1 = 5
⇒ C1 = ${\dfrac{5}{2}}$
Subtracting equation (ii) from (i),
(C1 + C2) – (C1 – C2) = 2 – 3
⇒ 2C2 = -1
⇒ C2 = ${-\dfrac{1}{2}}$
Thus, the unique solution is: y = ${\dfrac{5}{2}e^{x}-\dfrac{1}{2}e^{-x}}$

Last modified on February 14th, 2025