How to Solve 2nd Order Differential Equation

Differential equations are fundamental tools in mathematics and engineering, describing how quantities change in relation to each other. Among these, second-order differential equations are particularly prevalent, appearing in areas such as physics, engineering, and applied mathematics. Solving these equations allows us to model phenomena like mechanical vibrations, electrical circuits, and wave propagation. While some second-order differential equations are straightforward to solve, others require specific techniques and methods. In this guide, we will explore various methods to solve second-order differential equations, providing you with a comprehensive understanding to approach these problems confidently.

How to Solve 2nd Order Differential Equation


Understanding Second-Order Differential Equations

A second-order differential equation involves the second derivative of an unknown function, typically written as:

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

where y = y(x), y' = dy/dx, y'' = d²y/dx², and a(x), b(x), c(x), and f(x) are known functions. The main goal is to find the function y(x) that satisfies the equation.

Second-order differential equations can be categorized into:

  • Homogeneous equations: when f(x) = 0
  • Non-homogeneous equations: when f(x) ≠ 0

Additionally, they can be constant coefficient or variable coefficient equations, influencing the choice of solution method.


Solving Homogeneous Second-Order Differential Equations with Constant Coefficients

One of the most common types is the linear homogeneous second-order differential equation with constant coefficients:

a y'' + b y' + c y = 0

To solve this, follow these steps:

  1. Form the characteristic equation: Assume a solution y = e^{rx}, leading to:
a r^2 + b r + c = 0
  1. Find roots of the characteristic equation: Solve for r using quadratic formula:
r = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Depending on the discriminant (D = b^2 - 4ac), three cases arise:

  • Distinct real roots (D > 0): The general solution is:
y(x) = C_1 e^{r_1 x} + C_2 e^{r_2 x}
  • Repeated real roots (D = 0): The solution becomes:
y(x) = (A + B x) e^{r x}
  • Complex conjugate roots (D < 0): If roots are r = α ± β i, then the solution is:
y(x) = e^{\alpha x} (C_1 \cos \beta x + C_2 \sin \beta x)

where C_1 and C_2 are arbitrary constants determined by initial conditions.


Solving Non-Homogeneous Second-Order Differential Equations

When the right side of the differential equation is not zero, it is non-homogeneous:

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

To solve these, the usual approach involves two steps:

  1. Find the complementary solution (y_c): Solve the associated homogeneous equation as described above.
  2. Find a particular solution (y_p): Guess a specific form based on f(x) using method of undetermined coefficients or variation of parameters.

Method of Undetermined Coefficients

This method is effective when f(x) is a simple function such as polynomials, exponentials, sines, or cosines. The steps involve:

  • Guess a particular solution y_p with undetermined coefficients based on the form of f(x).
  • Substitute y_p into the differential equation.
  • Solve for the coefficients to satisfy the equation.

Variation of Parameters

This technique is more general and can be used when f(x) is complex. It involves:

  • Using the solutions of the homogeneous equation to construct a particular solution with variable coefficients.
  • Applying formulas derived from the method to find y_p.

Once y_c and y_p are obtained, the general solution is:

y(x) = y_c + y_p

Solving Variable Coefficient Second-Order Differential Equations

Equations where coefficients are functions of x are more complex. Common methods include:

  • Reduction of order: Useful if one solution is known, to find a second linearly independent solution.
  • Power series solutions: Expressing y as a power series and solving term-by-term, suitable for equations near regular points.
  • Special functions and transformations: Using substitution methods to convert the equation into a known form (e.g., Bessel, Legendre equations).

For example, the Cauchy-Euler equation:

x^2 y'' + a x y' + b y = 0

can be solved by assuming y = x^{m}, leading to an algebraic equation for m.


Example: Solving a Homogeneous Equation

Suppose we have:

y'' - 3 y' + 2 y = 0

Step 1: Form the characteristic equation:

r^2 - 3 r + 2 = 0

Step 2: Solve for r:

r = \frac{3 \pm \sqrt{9 - 8}}{2} = \frac{3 \pm 1}{2}

Roots: r = 2, r = 1

Step 3: Write the general solution:

y(x) = C_1 e^{2x} + C_2 e^{x}

Example: Solving a Non-Homogeneous Equation with Undetermined Coefficients

Consider:

y'' + y = \cos x

Step 1: Homogeneous solution:

y_c = C_1 \cos x + C_2 \sin x

Step 2: Guess particular solution y_p. Since RHS is cos x, and cos x is part of the homogeneous solution, multiply by x:

y_p = A x \sin x + B x \cos x

Step 3: Compute derivatives and substitute into the original equation to solve for A and B.


Key Takeaways for Solving Second-Order Differential Equations

To effectively solve second-order differential equations, keep these key points in mind:

  • Identify whether the equation is homogeneous or non-homogeneous.
  • Determine if coefficients are constant or variable, which influences the solution method.
  • Use characteristic equations for constant coefficient homogeneous equations.
  • Apply method of undetermined coefficients or variation of parameters for non-homogeneous equations.
  • Leverage reduction of order or power series methods for variable coefficient equations.
  • Always incorporate initial or boundary conditions to find specific solutions.

Mastering these techniques provides a solid foundation for tackling a wide array of second-order differential equations across various scientific and engineering disciplines.

Back to blog

Leave a comment