Mastering Mathematics Smartly
by Wee Wen Shih

A unique self-help website that provides comprehensive coverage of mathematics at A-level & beyond, written in a student-friendly style.

Section 1

We shall consider second-order differential equations of the form a \frac{\text{d}^2 y}{\text{d}x^2} + b \frac{\text{d}y}{\text{d}x} + cy = 0, where a, b and c are constant coefficients.

The first step is to state the auxiliary equation which is of the form am^2 + bm + c = 0.

The second step is to determine the roots to the auxiliary equation. Three cases need to be considered:
1. Real and different roots (i.e. m = m_1 or m = m_2),

2. Real and equal roots (i.e. m = m_1 repeated),

3. Complex roots (i.e. m = \alpha \pm \text{i}\beta).

The final step is to write down the general solution, corresponding to the three cases above:
1. y = A\text{e}^{m_1x} + B\text{e}^{m_2x},

2. y = \text{e}^{m_1x}(A + Bx),

3. y = \text{e}^{\alpha x}(Acos \beta x + Bsin \beta x).

Worked example 1: Solve \frac{\text{d}^2 y}{\text{d}x^2} + 4\frac{\text{d}y}{\text{d}x} - 5y = 0.

By step 1, the auxiliary equation is m^2 + 4m - 5 = 0.

Factorising, we obtain (m+5)(m-1) = 0, so that we have real and different roots m = -5 or m = 1.

In the final step, we arrive at the general solution y = A\text{e}^{-5x} + B\text{e}^{x}.

Section 2

Next, we shall consider second-order differential equations of the forms:
1. \frac{\text{d}^2 y}{\text{d}x^2} + n^2y = 0,

2. \frac{\text{d}^2 y}{\text{d}x^2} - n^2y = 0.

Their general solutions are correspondingly given by:
1. y = Acos\:nx + Bsin\:nx,

2. y = Acosh\:nx + Bsinh\:nx.

Section 3

Now, we are ready to face differential equations of the form a \frac{\text{d}^2 y}{\text{d}x^2} + b \frac{\text{d}y}{\text{d}x} + cy = \text{f}(x) -- (*).

The general solution is given by y = complementary function (CF) + particular integral (PI).

The first step is to find CF, by solving a \frac{\text{d}^2 y}{\text{d}x^2} + b \frac{\text{d}y}{\text{d}x} + cy = 0. Essentially, we follow the details described in Section 1.

The second step is to find PI, by assuming the general form of \text{f}(x). For a start, the following list is useful:
1. \text{f}(x) = k, assume y = C;

2. \text{f}(x) = kx, assume y = Cx + D;

3. \text{f}(x) = kx^2, assume y = Cx^2 + Dx + E;

4. \text{f}(x) = ksin\:x or kcos\:x, assume y = Ccos\:x + Dsin\:x;

5. \text{f}(x) = ksinh\:x or kcosh\:x, assume y = Ccosh\:x + Dsinh\:x;

6. \text{f}(x) = \text{e}^{kx}, assume y = C\text{e}^{kx}.

We will have to take a special measure when PI is already included in CF, by multiplying PI by x.

The third step upon assuming an appropriate PI, is to:
(i) find \frac{\text{d}y}{\text{d}x} and \frac{\text{d}^2 y}{\text{d}x^2},

(ii) substitute y, \frac{\text{d}y}{\text{d}x} and \frac{\text{d}^2 y}{\text{d}x^2} into LHS of (*),

(iii) compare LHS expression with RHS expression of (*) to find the constant(s) in PI.

Worked example 2: Solve \frac{\text{d}^2y}{\text{d}x^2} + 4\frac{\text{d}y}{\text{d}x} - 5y = 4\text{e}^x, given that at x = 0, y = -\frac{2}{3} and \frac{\text{d}y}{\text{d}x} = -\frac{4}{3}.

By step 1, CF is y = A\text{e}^{-5x} + B\text{e}^{x} (refer to Worked example 1).

By step 2, we take the special measure and assume that PI is y = Cx\text{e}^x.

By step 3(i), \frac{\text{d}y}{\text{d}x}= C\text{e}^x(x + 1) and \frac{\text{d}^2y}{\text{d}x^2}= C\text{e}^x(x + 2).

By steps 3(ii) and 3(iii), we obtain C\text{e}^x(x + 2) + 4C\text{e}^x(x + 1) - 5Cx\text{e}^x = 4\text{e}^x
\Rightarrow 6C\text{e}^x = 4\text{e}^x
\Rightarrow C = \frac{2}{3}.

The general solution is y = A\text{e}^{-5x} + B\text{e}^x + \frac{2}{3}x\text{e}^x.

We are not done until we have found the particular solution. We need to determine the values of A and B from the given conditions.
At x = 0, y = -\frac{2}{3}, so A + B = -\frac{2}{3} ----- (1)

\frac{\text{d}y}{\text{d}x} = -5A\text{e}^{-5x} + B\text{e}^x + \frac{2}{3}(\text{e}^x + x\text{e}^x)
At x = 0, \frac{\text{d}y}{\text{d}x} = -\frac{4}{3}, so
-5A + B + \frac{2}{3} = -\frac{4}{3} \Rightarrow -5A + B = -2  ----- (2)

Solving the simultaneous linear equations (1) and (2), we obtain A = \frac{2}{9} and B = -\frac{8}{9}.

Finally, our particular solution is y = \frac{2}{9}\text{e}^{-5x} - \frac{8}{9}\text{e}^x + \frac{2}{3}x\text{e}^x.