Basics Of Second Order Differential Equation

A second order differential equation is of the form $a \frac{d^{2}y}{dx^{2}} + b \frac{dy}{dx} + b \frac{dy}{dx} + cy = f(x)$.

$f(x)$ is called a source term or forcing function.

The differential equation is called

  • a homogeneous equation IF $f(x) = 0$
  • non-homogeneous IF $f(x)$ is not 0.

The steps involved in solving a homogeneous equation and non-homogeneous are quite similar, with the non-homogeneous one requiring more work. (More about this later)

Steps to solving a homogeneous equation:

  1. Rewrite the given differential equation $a \frac{d^{2}y}{dx^{2}} + b \frac{dy}{dx} + b \frac{dy}{dx} + cy = f(x)$ as $(aD^2 + bD + c)y = 0$.
  2. Substitute m for D and solve the auxiliary equation $am^2 + bm + c = 0$
    1. If the roots of the auxiliary equation are real and different, e.g. $m = \alpha$ and $m = \beta$, then the general solution is: $$y = A e^{\alpha x} + B e^{\beta x}$$
    2. If the roots are real and equal, e.g. $m = \alpha$, twice, then the general solution is $$y = (Ax + B)e^{\alpha x}$$.
    3. If the roots are complex, e.g. $m = \alpha \pm \beta i$, then the general solution is $$y = e^{\alpha x} ( C \cos \beta x + D \sin \beta x)$$
  3. If the particular solution of a differential equation is required then substitute the given boundary conditions to find the unknown constants.



The general solution for a non-homogeneous second order differential equation is given by y = complementary function + particular integral, which is y = u + v.

By following the four steps above, the complementary function for the non-homogeneous differential equation is found.

Note: Treat f(x) as 0 when solving for the complementary function.


Finding the particular integral

There are no hard and fast rule in finding the particular integral. (It involves some guessing) I will show you a few examples below.

Example 1: Solve $\frac{d^{2}y}{dx^2} – 4 \frac{dy}{dx} + 4y = 4x + 3cos 2x$

$$(D^{2} – 4D + 4)y = 0$$

The auxiliary equation is $m^{2} – 4m + 4 = 0$
$$(m – 2)(m-2) = 0$$ $$m = 2$$

The complementary function is $u = (Ax + B)e^{2x}$.

Make a guess! Let the particular integral be $ v = ax + b + C \cos 2x + D \sin 2x$

Note: Normally, you would try the most general form of the source term. E.g. The source term contains x, hence you make a guess that the final solution must contain the most general form of x, i.e. ax + b. The most general form of cos x is sin x and cos x.

$$(D^{2} – 4D + 4)v = 4x + 3 \cos 2x$$ $$D(v) = a – 2C \sin 2x + 2D \cos 2x$$ $$D^{2}(v) = -4C \cos 2x – 4D \sin 2x$$

Substitute D(v) and $D^{2}(v)$ into $(D^{2} – 4D + 4)v = 4x + 3 \cos 2x$

$$4ax – 4a + 4b + (-4C – 8D + 4C)\cos 2x + (-4D + 8C + 4D)\sin 2x = 4x + 3\cos 2x$$

By comparing the coefficients,
a = 1, b = 1, C = 0, $D = -\frac{3}{8}$

Hence, the particular integral is $v = x + 1 – \frac{3}{8} \sin 2x$

The general solution is:
$$y = (Ax + B)e^{2x} + x + 1 – \frac{3}{8} \sin 2x$$

The “guess” is called an Ansatz.

In physics and mathematics, an ansatz is an educated guess that is verified later by its results.

-From Wikipedia


This is the end of the basic walkthrough for Second Order Differential Equation.

Back To Second Order Differential Equation

Sharing is caring:
Mini Physics

Administrator of Mini Physics. If you spot any errors or want to suggest improvements, please contact us.

Leave a Comment