Title: Default for 19.3 Second Order Differential Equations
Course: HELM Workbooks 2023-2024

Constant coefficient second order linear ODEs

We now proceed to study those second order linear equations which have constant coefficients. The general form of such an equation is: \[ a{\mathrm{d}^2y\over \mathrm{d}x^2}+b{\mathrm{d}y\over \mathrm{d}x}+cy=f(x) \qquad (3)\]

where \(a,b,c\) are constants. The homogeneous form of (3) is the case when \(f(x)\equiv 0\): \[ a{\mathrm{d}^2y\over \mathrm{d}x^2}+b{\mathrm{d}y\over \mathrm{d}x}+cy=0 \qquad (4)\]

The inhomogeneous form of (3) is the case when \(f(x)\not\equiv 0\). To find the general solution of (3), it is first necessary to solve (4). The general solution of (4) is called the complementary function and will always contain two arbitrary constants. We will denote this solution by \(y_\text{cf}\). The technique for finding the complementary function is described in this Section.

Note: A complementary function is the general solution of a homogeneous, linear differential equation.

Exercise

State whether the following equations are constant coefficient or not constant coefficient and whether they are homogeneous or inhomogeneous.

1. The equation \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 4\dfrac{\mathrm{d}y}{\mathrm{d}x} + 3y = e^{-2x} \) is and is .
2. The equation \(x\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 2y = 0 \) is and is .
3. The equation \(\dfrac{\mathrm{d}^2x}{\mathrm{d}t^2} + 3\dfrac{\mathrm{d}x}{\mathrm{d}t} + 7x = 0 \) is and is .
4. The equation \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 4\dfrac{\mathrm{d}y}{\mathrm{d}x} + 4y = 0 \) is and is .
Feedback: 1. We are given the equation \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 4\dfrac{\mathrm{d}y}{\mathrm{d}x} + 3y = e^{-2x} \). The coefficients are all constants, therefore the equation is constant coefficient. The function on the right hand side is not equal to zero, therefore the equation is inhomogeneous. 2. We are given the equation \(x\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 2y = 0 \). The coefficient of \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2}\) is \(x\) which is a variable, therefore the equation is not constant coefficient. The function on the right hand side is equal to zero, therefore the equation is homogeneous. 3. We are given the equation \(\dfrac{\mathrm{d}^2x}{\mathrm{d}t^2} + 3\dfrac{\mathrm{d}x}{\mathrm{d}t} + 7x = 0 \). The coefficients are all constants, therefore the equation is constant coefficient. The function on the right hand side is equal to zero, therefore the equation is homogeneous. 4. We are given the equation \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 4\dfrac{\mathrm{d}y}{\mathrm{d}x} + 4y = 0 \). The coefficients are all constants, therefore the equation is constant coefficient. The function on the right hand side is equal to zero, therefore the equation is homogeneous.

Finding the complementary function

To find the complementary function we must make use of the following property. If \(y_1(x)\) and \(y_2(x)\) are any two (linearly independent) solutions of a linear, homogeneous second order differential equation then the general solution \(y_\text{cf}(x),\) is \[ y_\text{cf}(x)=Ay_1(x)+By_2(x)\] where \(A,\ B\) are constants. We see that the second order linear ordinary differential equation has two arbitrary constants in its general solution. The functions \(y_1(x)\) and \(y_2(x)\) are linearly independent if one is not a multiple of the other.

Example

Verify that \(y_1=\text{e}^{4x}\) and \(y_2=\text{e}^{2x}\) both satisfy the constant coefficient linear homogeneous equation: \[ {\mathrm{d}^2y\over \mathrm{d}x^2}-6{\mathrm{d}y\over \mathrm{d}x}+8y=0\] Write down the general solution of this equation.

Solution

When \(y_1=\text{e}^{4x}\), differentiation yields: \[ {\mathrm{d}y_1\over \mathrm{d}x}=4\text{e}^{4x} \qquad\text{ and}\qquad {\mathrm{d}^2y_1\over \mathrm{d}x^2}=16\text{e}^{4x}\] Substitution into the left-hand side of the ODE gives \(16\text{e}^{4x}-6(4\text{e}^{4x})+8\text{e}^{4x}\), which equals 0, so that \(y_1=\text{e}^{4x}\) is indeed a solution. Similarly if \(y_2=\text{e}^{2x},\) then \[ {\mathrm{d}y_2\over \mathrm{d}x}=2\text{e}^{2x} \qquad\text{and}\qquad {\mathrm{d}^2y_2\over \mathrm{d}x^2}=4\text{e}^{2x}.\] Substitution into the left-hand side of the ODE gives \(4\text{e}^{2x}-6(2\text{e}^{2x})+8\text{e}^{2x}\), which equals 0, so that \(y_2=\text{e}^{2x}\) is also a solution of equation the ODE. Now \(\text{e}^{2x}\) and \(\text{e}^{4x}\) are linearly independent functions, so, from the property stated above we have: \[ y_\text{cf}(x)=A\text{e}^{4x}+B\text{e}^{2x}\]is the general solution of the ODE.

Example

Find values of \(k\) so that \(y=\text{e}^{kx}\) is a solution of: \[ {\mathrm{d}^2y\over \mathrm{d}x^2}-{\mathrm{d}y\over \mathrm{d}x}-6y=0\] Hence state the general solution.

Solution

As suggested we try a solution of the form \(y=\text{e}^{kx}\). Differentiating we find \[ {\mathrm{d}y\over \mathrm{d}x}=k\text{e}^{kx} \qquad\text{and}\qquad {\mathrm{d}^2y\over \mathrm{d}x^2}=k^2\text{e}^{kx}.\] Substitution into the given equation yields: \[ k^2\text{e}^{kx}-k\text{e}^{kx}-6\text{e}^{kx}=0 \qquad\text{ that is}\qquad (k^2-k-6)\text{e}^{kx}=0\] The only way this equation can be satisfied for all values of \(x\) is if \[ k^2-k-6=0\] that is, \((k-3)(k+2)=0\) so that \(k=3\) or \(k=-2\). That is to say, if \(y=\text{e}^{kx}\) is to be a solution of the differential equation, \(k\) must be either \(3\) or \(-2\). We therefore have found two solutions: \[ y_1(x)=\text{e}^{3x}\qquad \text{and}\qquad y_2(x)=\text{e}^{-2x}\] These are linearly independent and therefore the general solution is \[ y_\text{cf}(x)=A\text{e}^{3x}+B\text{e}^{-2x}\] The equation \(k^2-k-6=0\) for determining \(k\) is called the auxiliary equation.

Exercise

By substituting \(y = e^{kx}\), find values of \(k\) so that \(y\) is a solution of \[ \frac{\mathrm{d}^2y}{\mathrm{d}x^2} -3\frac{\mathrm{d}y}{\mathrm{d}x} + 2y = 0.\] Hence, write down two solutions of the auxiliary equation, \(k_1\) and \(k_2\), and the general solution.

1. First, find the auxiliary equation:
\(= 0\).
2. Now solve the auxiliary equation and give its two solutions and write down the general solution.
The two solutions of the auxiliary equation are \(k_1 =\) and \(k_2 =\) .
The general solution is \(y =\) \(A\) \(+\) \(B\) .
Feedback: 1. We are given the equation \( \frac{\mathrm{d}^2y}{\mathrm{d}x^2} -3\frac{\mathrm{d}y}{\mathrm{d}x} + 2y = 0.\) Using the substitution \(y=e^{kx}\) we obtain \[k^2e^{kx} - [value]ke^{kx} + [value]e^{kx} = 0\] which implies \[k^2 - [value]k + [value] = 0.\] 2. The auxiliary equation can be factorised as \((k-[value])(k-[value]) = 0\) and so the required values of \(k\) are \(k_1=[value]\) and \(k_2=[value]\). Therefore the two solutions of the original equation are \(y_1 = [value]\) and \(y_2 = [value]\). Then the general solution is \[y = A[value] + B[value].\]

Example

Find the auxiliary equation of the differential equation: \[ a{\mathrm{d}^2y\over \mathrm{d}x^2}+b{\mathrm{d}y\over \mathrm{d}x}+cy=0\]

Solution

We try a solution of the form \(y=\text{e}^{kx}\) so that \[ {{\mathrm{d}y\over \mathrm{d}x}=k\text{e}^{kx}} \qquad\text{and}\qquad {{\mathrm{d}^2y\over \mathrm{d}x^2}=k^2\text{e}^{kx}}.\] Substitution into the given differential equation yields: \[ ak^2\text{e}^{kx}+bk\text{e}^{kx}+c\text{e}^{kx}=0\qquad\text{that is}\qquad (ak^2+bk+c)\text{e}^{kx}=0\] Since this equation is to be satisfied for all values of \(x\), then \[ ak^2+bk+c=0\] is the required auxiliary equation.

Key Point

The auxiliary equation of \[{a{\mathrm{d}^2y\over \mathrm{d}x^2}+b{\mathrm{d}y\over \mathrm{d}x}+cy=0 \qquad\text{is}\qquad ak^2+bk+c=0}\] where \(y=e^{kx}\)

Exercise

Write down, but do not solve nor simplify, the auxiliary equations of the following:

1. \( [value]\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + [value]\dfrac{\mathrm{d}y}{\mathrm{d}x} + [value]y = 0\).
The auxiliary equation is \(= 0\).
2. \( [value]\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + [value]\dfrac{\mathrm{d}y}{\mathrm{d}x} - [value]y = 0\).
The auxiliary equation is \(= 0\).
3. \( [value]\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + [value]y = 0\).
The auxiliary equation is \(= 0\).
4. \( [value]\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + [value]\dfrac{\mathrm{d}y}{\mathrm{d}x} = 0\).
The auxiliary equation is \(= 0\).
Feedback: For each part of the question we make use of the substitution \(y= e^{kx}\). With this substitution, \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = ke^{kx}\) and \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = k^2e^{kx}\). 1. We are given the equation \[\begin{aligned} [value]\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + [value]\dfrac{\mathrm{d}y}{\mathrm{d}x} + [value]y &= 0, \\ \implies [value]k^2e^{kx} + [value]ke^{kx} + [value]e^{kx} &= 0, \\ \implies [value] &= 0. \end{aligned}\] 2. We are given the equation \[\begin{aligned} [value]\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + [value]\dfrac{\mathrm{d}y}{\mathrm{d}x} - [value]y &= 0, \\ \implies [value]k^2e^{kx} + [value]ke^{kx} - [value]e^{kx} &= 0, \\ \implies [value] &= 0. \end{aligned}\] 3. We are given the equation \[\begin{aligned} [value]\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + [value]y &= 0, \\ \implies [value]k^2e^{kx} + [value]e^{kx} &= 0, \\ \implies [value] &= 0. \end{aligned}\] 4. We are given the equation \[\begin{aligned} [value]\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + [value]\dfrac{\mathrm{d}y}{\mathrm{d}x} &= 0, \\ \implies [value]k^2e^{kx} + [value]ke^{kx} &= 0, \\ \implies [value] &= 0. \end{aligned}\]

Solving the auxiliary equation gives the values of \(k\) which we need to find the complementary function. Clearly the nature of the roots will depend upon the values of \(a,\ b\) and \(c\).

Case 1 \(\quad\)If \(b^2>4ac\) the roots will be real and distinct. The two values of \(k\) thus obtained, \(k_1\) and \(k_2\), will allow us to write down two independent solutions: \( y_1(x)=\text{e}^{k_1x}\ \text{and}\ y_2(x)=\text{e}^{k_2x},\) and so the general solution of the differential equation will be: \[ y(x)=A\text{e}^{k_1x}+B\text{e}^{k_2x}\]

Key Point

If the auxiliary equation has real, distinct roots \(k_1\) and \(k_2\), the complementary function will be: \[y_\text{cf}(x)=A\text{e}^{k_1x}+B\text{e}^{k_2x}\]

Case 2 \(\quad\) On the other hand, if \(b^2=4ac\) the two roots of the auxiliary equation will be equal and this method will therefore only yield one independent solution. In this case, special treatment is required.

Case 3 \(\quad\) If \(b^2<4ac\) the two roots of the auxiliary equation will be complex, that is, \(k_1\) and \(k_2\) will be complex numbers. The procedure for dealing with such cases will become apparent in the following examples.

Example

Find the general solution of: \( \displaystyle{ {\mathrm{d}^2y\over \mathrm{d}x^2}+3{\mathrm{d}y\over \mathrm{d}x}-10y=0 }.\)

Solution

By letting \(y=\text{e}^{kx}\), so that \[ {\mathrm{d}y\over \mathrm{d}x}=k\text{e}^{kx}\qquad\text{and}\qquad {\mathrm{d}^2y\over \mathrm{d}x^2}=k^2\text{e}^{kx}\] the auxiliary equation is found to be: \[k^2+3k-10=0\qquad\text{and so}\qquad (k-2)(k+5)=0\] so that \(k=2\) and \(k=-5\). Thus there exist two solutions: \[y_1=\text{e}^{2x}\qquad\text{and}\qquad y_2=\text{e}^{-5x}.\] We can write the general solution as: \[\displaystyle{ y=A\text{e}^{2x}+B\text{e}^{-5x}}.\]

Example

Find the general solution of: \(\displaystyle{ {\mathrm{d}^2y\over \mathrm{d}x^2}+4y=0}\)

Solution

As before, let \(y=\text{e}^{kx}\) so that \[ {{\mathrm{d}y\over \mathrm{d}x}=k\text{e}^{kx}}\qquad\text{and}\qquad {{\mathrm{d}^2y\over \mathrm{d}x^2}=k^2\text{e}^{kx}}.\] The auxiliary equation is easily found to be: \(k^2+4=0\) that is, \(k^2=-4\) so that \(k=\pm 2\text{i}\), that is, we have complex roots. The two independent solutions of the equation are thus \[ y_1(x)=\text{e}^{2\text{i}x}\qquad\qquad y_2(x)=\text{e}^{-2\text{i}x}\] so that the general solution can be written in the form \( y(x)=A\text{e}^{2\text{i}x}+B\text{e}^{-2\text{i}x}\). However, in cases such as this, it is usual to rewrite the solution in the following way. Recall that Euler’s relations give: \[\text{e}^{2\text{i}x}=\cos2x+\text{i}\sin 2x\qquad\text{and} \qquad \text{e}^{-2\text{i}x}=\cos 2x-\text{i}\sin 2x\] so that \[ y(x)=A(\cos 2x+\text{i}\sin 2x)+B(\cos 2x-\text{i}\sin 2x)\] If we now relabel the constants such that \(A+B=C\) and \(A\text{i}-B\text{i}=D\) we can write the general solution in the form: \[ y(x)=C\cos 2x+D\sin 2x.\]

Note: For the equation two examples ago we have expressed the solution as \(y=\dots\) whereas in the example above we have expressed it as \(y(x)=\dots\). Either will do.

Example

Given \(ay''+by'+cy=0,\) write down the auxiliary equation. If the roots of the auxiliary equation are complex (one root will always be the complex conjugate of the other) and are denoted by \(k_1=\alpha+\beta \text{i}\) and \(k_2=\alpha-\beta \text{i}\) show that the general solution is: \[ y(x)=\text{e}^{\alpha x}(A\cos \beta x+B\sin\beta x)\]

Solution

Substitution of \(y=\text{e}^{kx}\) into the differential equation yields \((ak^2+bk+c)\text{e}^{kx}=0\) and so the auxiliary equation is: \[ ak^2+bk+c=0\] If \(k_1=\alpha+\beta \text{i},\ k_2=\alpha-\beta \text{i}\) then the general solution is \[ y=C\text{e}^{(\alpha+\beta \text{i})x}+D\text{e}^{(\alpha-\beta \text{i})x}\] where \(C\) and \(D\) are arbitrary constants. Using the laws of indices this is rewritten as: \[ y=C\text{e}^{\alpha x}\text{e}^{\beta \text{i}x}+D\text{e}^{\alpha x}\text{e}^{-\beta \text{i}x}=\text{e}^{\alpha x}(C\text{e}^{\beta \text{i}x}+D\text{e}^{-\beta \text{i}x})\] Then, using Euler’s relations, we obtain: \[\begin{aligned} y &=\text{e}^{\alpha x}(C\cos \beta x+C\text{i}\sin\beta x+D\cos \beta x-D\text{i}\sin \beta x) \\ &= \text{e}^{\alpha x}\{(C+D)\cos\beta x+(C\text{i}-D\text{i})\sin \beta x\}\end{aligned}\] Writing \(A=C+D\) and \(B=C\text{i}-D\text{i},\) we find the required solution: \[ y=\text{e}^{\alpha x}(A\cos\beta x+B\sin \beta x)\]

Key Point

If the auxiliary equation has complex roots, \(\alpha+\beta \text{i}\) and \(\alpha-\beta \text{i}\), then the complementary function is: \[y_\text{cf}=\text{e}^{\alpha x}(A\cos \beta x+B\sin \beta x)\]

Exercise

Find the general solution of \(y'' + [value]y' + [value]y = 0\).

1. First write down the auxiliary equation
\(= 0\).
2. Find the complex roots of the auxiliary equation
\(k =\) \(\pm\)
3. Using the previous Key Point, write down the general solution, factoring out the term \(e^{\alpha x}\)
\(y =\) \(\times\) \(\bigg( A\) \(+ B\) \(\bigg)\).
Feedback: 1. We are given the equation \(y'' + [value]y' + [value]y = 0\). We use the substitution \(y = e^{kx}\) to yield the auxiliary equation: \[k^2 + [value]k + [value] = 0.\] 2. We can use the quadratic formula to find the roots of the auxiliary equation. So we have \[\begin{aligned} k &= \dfrac{-b\pm \sqrt{b^2-4ac}}{2a}, \\ &= \dfrac{-[value] \pm \sqrt{[value]^2 - 4(1)([value])}}{2}, \\ &= [value] \pm [value]. \end{aligned}\] 3. Using the previous Key Point, if the complex roots of the auxiliary function are \(\alpha \pm \beta \mathrm{i}\), then the complementary function is given by \[y_{\text{cf}} = e^{\alpha x}\left(A\cos(\beta x) + B\sin(\beta x)\right).\] Using this we then have the general solution: \[y = [value]\left(A[value] + B[value] \right).\]

Finding a particular integral

In the previous subsection we explained what is meant by a particular integral. Now we look at a simple method to find a particular integral. In fact our method is rather crude. It involves trial and error and educated guesswork. We try solutions which are of the same general form as the \(f(x)\) on the right-hand side.

Example

Find a particular integral of the equation

\[\frac{\mathrm{d}^2y}{\mathrm{d}x^2} - \frac{\mathrm{d}y}{\mathrm{d}x} - 6y = e^{2x}.\]

Solution

We shall attempt to find a solution of the inhomogeneous problem by trying a function of the same form as that on the right-hand side of the ODE. In particular, let us try \(y(x) = Ae^{2x}\), where A is a constant that we shall now determine. If \(y(x) = Ae^{2x}\) then

\[\frac{\mathrm{d}y}{\mathrm{d}x} = 2Ae^{2x} \qquad \text{and} \qquad \frac{\mathrm{d}^2y}{\mathrm{d}x^2} = 4Ae^{2x}.\]

Subsitution in the ODE gives:

\[4Ae^{2x} - 2Ae^{2x} - 6Ae^{2x} = e^{2x},\]

that is,

\[-4Ae^{2x} = e^{2x}.\]

To ensure that \(y\) is a solution, we require \(-4A = 1\), that is, \(\displaystyle A = -\frac{1}{4}\).

Therefore, the particular integral is \(\displaystyle y_\text{p} = -\frac{1}{4}e^{2x}\).

In the previous example we chose a trial solution \(Ae^{2x}\) of the same form as the ODE's right-hand side. The following table provides a summary of the trial solutions which should be tried for various forms of the right-hand side.

\(f(x)\) | Trial solution
constant term: \(c\) | constant term: \(k\)
linear: \(ax + b\) | linear: \(Ax + B\)
polynomial in \(x\) of degree \(r\): \(ax^r + \cdots + bx + c\) | polynomial in \(x\) of degree \(r\): \(Ax^r + \cdots + Bx + C\)
\(a \cos kx\) | \(A \cos kx + B \sin kx\)
\(a \sin kx\) | \(A \cos kx + B \sin kx\)
\(ae^{kx}\) | \(Ae^{kx}\)
\(ae^{-kx}\) | \(Ae^{-kx}\)

Example

Obtain a particular integral of the equation

\[\frac{\mathrm{d}^2y}{\mathrm{d}x^2} - 6\frac{\mathrm{d}y}{\mathrm{d}x} + 8y = x.\]

Solution

In the example before and the last question, we found that a fruitful approach for a first order ODE was to assume a solution in the same form as that on the right-hand side. Suppose we assume a solution \(y(x) = \alpha x\) and proceed to determine \(\alpha\). This appreach will actually fail, but let us see why.If \(y(x) = \alpha x\) then

\[\frac{\mathrm{d}y}{\mathrm{d}x} = \alpha \qquad \text{and} \qquad \frac{\mathrm{d}^2y}{\mathrm{d}x^2} = 0.\]

Substitution into the differential equation yields

\[0 - 6\alpha + 8\alpha x = \alpha.\]

Comparing coefficients of \(x\):

\[8\alpha x = x \qquad \text{so} \qquad \alpha = \frac{1}{8}\]

Comparing constants:

\[-6\alpha = 0 \qquad \text{so} \qquad \alpha = 0\]

We have a contradiction! Clearly a particular integral of the form \(\alpha x\) is not possible. The problem arises because differentiation of the term \(\alpha x\) produces constant terms which are unbalanced on the right-hand side. So, we try a solution of the form \(y(x) = \alpha x + \beta\) with \(\alpha\), \(\beta\) constants. This is consistent with the recommendation in the table shown before. Proceeding as before

\[\frac{\mathrm{d}y}{\mathrm{d}x} = \alpha \qquad \text{and} \qquad \frac{\mathrm{d}^2y}{\mathrm{d}x^2} = 0.\]

Substitution in the differential equation now gives

\[0 - 6\alpha + 8(\alpha x + \beta) = x.\]

Equating coefficients of \(x\) and then equating constant terms we find:

\[8\alpha = 1 \qquad \text{and} \qquad -6\alpha + 8\beta = 0\]

From which we get \(\displaystyle \alpha = \frac{1}{8}\) and then \(\displaystyle \beta = \frac{3}{32}\).

The required particular integral is \(\displaystyle y_\text{p}(x) = \frac{1}{8}x + \frac{3}{32}\).

Key Point

If the auxiliary equation has two equal roots, \(k\), the complementary function is: \[y_\text{cf}=(A+Bx)\text{e}^{kx}\]

Example

The auxiliary equation of \(ay''+by'+cy=0\) is \(ak^2+bk+c=0.\) Suppose this equation has equal roots \(k=k_1\) and \(k=k_1\). Verify that \(y=x\text{e}^{k_1x}\) is a solution of the differential equation.

Solution

We have: \[ y=x\text{e}^{k_1x}\qquad\quad y'=\text{e}^{k_1x}(1+k_1x)\qquad\quad y''=\text{e}^{k_1x}(k_1^2x+2k_1)\] Substitution into the left-hand side of the differential equation yields: \[ \text{e}^{k_1x}\{a(k^2_1x+2k_1)+b(1+k_1x)+cx\}=\text{e}^{k_1x}\{(ak_1^2+bk_1+c)x+2ak_1+b\}\] But \(ak_1^2+bk_1+c=0\) since \(k_1\) satisfies the auxiliary equation. Also, \[ k_1={-b\pm\sqrt{b^2-4ac}\over 2a}\] but since the roots are equal, then \(b^2-4ac=0\) hence \(k_1=-b/2a\). So \(2ak_1+b=0\). Hence \[\text{e}^{k_1x}\{(ak_1^2+bk_1+c)x+2ak_1+b\}=\text{e}^{k_1x}\{(0)x+0\}=0\] We conclude that \(y=x\text{e}^{k_1x}\) is a solution of \(ay''+by'+cy=0\) when the roots of the auxiliary equation are equal. This illustrates the previous Key Point.

Example

Obtain the general solution of the equation: \[ {d^2y\over dx^2}+8{dy\over dx}+16y=0.\]

Solution

As before, a trial solution of the form \(y=\text{e}^{kx}\) yields an auxiliary equation \(k^2+8k+16=0\). This equation factorizes so that \((k+4)(k+4)=0\) and we obtain equal roots, that is, \(k=-4\) (twice). If we proceed as before, writing \(y_1(x)=\text{e}^{-4x}\) \(y_2(x)=\text{e}^{-4x},\) it is clear that the two solutions are not independent. We need to find a second independent solution. Using the result summarised in the previous Key Point, we conclude that the second independent solution is \(y_2=x\text{e}^{-4x}\). The general solution is then: \[ y(x)=(A+Bx)\text{e}^{-4x}\]

Finding the general solution of a second order linear inhomogeneous ODE

The general solution of a second order linear inhomogeneous equation is the sum of its particular integral and the complementary function. In previous subsections you learned how to find a complementary function, and just before you learnt how to find a particular integral. We now put these together to find the general solution.

Example

Find the general solutions of

\[\frac{\mathrm{d}^2y}{\mathrm{d}x^2} + 3 \frac{\mathrm{d}y}{\mathrm{d}x} - 10y = 3x^2.\]

Solution

The complementary function was found in a previous example to be

\[y_\text{cf} = Ae^{2x} + Be^{-5x}.\]

The particular integral is found by trying a solution of the form \(y = ax^2 + bx + c\), so that

\[\frac{\mathrm{d}y}{\mathrm{d}x} = 2ax + b \qquad \text{and} \qquad \frac{\mathrm{d}^2y}{\mathrm{d}x^2} 2a.\]

Substituting into the differential equation gives:

\[2a + 3(2ax + b) - 10(ax^2 + bx + c) = 3x^2.\]

Comparing constants:   \(2a + 3b - 10c = 0\)

Comparing \(x\) terms:   \(6a - 10b = 0\)

Comparing \(x^2\) terms:   \(-10a = 3\)

So

\[a = - \frac{3}{10}, \quad b = -\frac{9}{50}, \quad c = -\frac{57}{500},\]

and

\[y_\text{p}(x) = -\frac{3}{10}x^2 - \frac{9}{50}x - \frac{57}{500}.\]

Thus, the general solution is

\[y = y_\text{p}(x) + y_\text{cf}(x) = -\frac{3}{10}x^2 - \frac{9}{50}x - \frac{57}{500} + Ae^{2x} + Be^{-5x}.\]

Key Point

The general solution of a second order constant coefficient ordinary differential equation

\[a\frac{\mathrm{d}^2y}{\mathrm{d}x^2} + b \frac{\mathrm{d}y}{\mathrm{d}x} + cy = f(x)\]

is

\[y = y_\text{p} + y_\text{cf},\]

being the sum of the particular integral and the complementary function.

\(y_\text{p}\) contains no arbitrary contants; \(y_\text{cf}\) contains two arbitrary constants.

Example

An LC circuit with sinusoidal input

The differential equation governing the flow of current in a series LC circuit when subject to an applied voltage \(v(t) = V_0 \sin \omega t\) is

\[L\frac{\mathrm{d}^2i}{\mathrm{d}t^2} + \frac{1}{C} i = \omega V_0 \cos \omega t.\]

[Image: A series LC circuit]

Obtain its general solution.

Solution

The homogeneous equation is

\[L\frac{\mathrm{d}^2i_\text{cf}}{\mathrm{d}t^2} + \frac{1}{C} i_\text{cf} = 0.\]

Letting \(i_\text{cf} = e^{kt}\), we find that the auxiliary equation is

\[Lk^2 + \frac{1}{C} = 0,\]

so that \(k = \pm i / \sqrt{LC}\). Therefore, the complementary function is:

\[i_\text{cf} = A \cos \frac{t}{\sqrt{LC}} + B \sin \frac{t}{\sqrt{LC}},\]

where \(A\) and \(B\) are arbitrary constants.

To find a particular integral try \(i_\text{p} = E \cos \omega t + F \sin \omega t\), where \(E\) and \(F\) are constants. We find:

\[\begin{aligned} \frac{\mathrm{d}i_\text{p}}{\mathrm{d}t} &= -\omega E \sin \omega t + \omega F \cos \omega t\\ \frac{\mathrm{d}^2i_\text{p}}{\mathrm{d}t^2} &= -\omega^2 E \cos \omega t - \omega^2 F \sin \omega t \end{aligned}\]

Substitution into the inhomogeneous equation yields:

\[L(-\omega^2 E \cos \omega t - \omega^2 F \sin \omega t) + \frac{1}{C}(E \cos \omega t + F \sin \omega t) = \omega V_0 \cos \omega t\]

Equating coefficients of \(\sin \omega t\) gives:   \(-\omega^2 LF + (F/C) = 0\)

Equating coefficients of \(\cos \omega t\) gives:   \(-\omega^2 LE + (E/C) = \omega V_0\)

Therefore, \(F = 0\) and \(E = CV_0 \omega / (1 - \omega^2 L C)\). Hence, the particular integral is

\[i_\text{p} = \frac{CV_0 \omega}{1 - \omega^2 LC} \cos \omega t.\]

Finally, the general solution is:

\[i = i_\text{cf} + i_\text{p} = A \cos \frac{t}{\sqrt{LC}} + B \sin \frac{t}{\sqrt{LC}} + \frac{CV_0 \omega}{1 - \omega^2 LC} \cos \omega t\]

Inhomogeneous term in the complementary function

Occasionally, you will come accross a differential equation \(\displaystyle a\frac{\mathrm{d}^2y}{\mathrm{d}x^2} + b \frac{\mathrm{d}y}{\mathrm{d}x} + cy = f(x)\) for which the inhomogeneous term, \(f(x)\), forms part of the complementary function. One such example is the equation

\[\frac{\mathrm{d}^2y}{\mathrm{d}x^2} - \frac{\mathrm{d}y}{\mathrm{d}x} - 6y = e^{3x}.\]

It is straightforward to check that the complementary function is \(y_\text{cf} = Ae^{3x} + Be^{-2x}\). Note that the first of these terms has the same form as the inhomogeneous term, \(e^{3x}\), on the right-hand side of the differential equation.

You should verify for yourself that trying a particular integral of the form \(y_p(x) = \alpha e^{3x}\) will not work in a case like this. Can you see why?

Instead, try a particular integral of the form \(y_\text{p}(x) = \alpha x e^{3x}\). Verify that

\[\frac{\mathrm{d}y_\text{p}}{\mathrm{d}x} = \alpha e^{3x}(3x + 1) \qquad \text{and} \qquad \frac{\mathrm{d}^2y_\text{p}}{\mathrm{d}x^2} = \alpha e^{3x}(9x + 6).\]

Substitute these expressions into the differential equation to find \(\displaystyle\alpha = \frac{1}{5}\).

Finally, the particular integral is \(\displaystyle y_\text{p}(x) = \frac{1}{5}xe^{3x}\), and so the general solution to the differential equation is:

\[y = Ae^{3x} + Be^{-2x} + \frac{1}{5}xe^{3x}\]

This shows a generally effective method – where the inhomogeneous term \(f(x)\) appears in the complementary function use as a trial particular integral \(x\) times what would otherwise be used.

Key Point

When solving

\[a\frac{\mathrm{d}^2y}{\mathrm{d}x^2} + b \frac{\mathrm{d}y}{\mathrm{d}x} + cy = f(x),\]

if the inhomogeneous \(f(x)\) appears in the complementary function use as a trial particular integral \(x\) times what would otherwise be used.

Exercise

Obtain the general solutions, that is, the complementary functions, of the following equations:

1. \(\displaystyle [value]\).
\([value]_{\text{cf}} =\) \(A\) \(+\) \(B\) .
2. \(\displaystyle [value]\).
\([value]_{\text{cf}} =\) \(A\) \(+\) \(B\) .
3. \(\displaystyle [value]\). In your final answer, factor out the term \(e^{\alpha [value]}\).
\([value]_{\text{cf}} =\) \(\times\) \(\bigg( A\) \(+ B\) \(\bigg)\).
4. \(\displaystyle [value]\). In your final answer, factor out the term \(e^{\alpha [value]}\).
\([value]_{\text{cf}} =\) \(\times\) \(\bigg( A\) \(+ B\) \(\bigg)\).
5. \(\displaystyle [value]\).
\([value]_{\text{cf}} =\) \(A\) \(+\) \(B\) .
Feedback: 1. We are given the equation \(\displaystyle [value]\). Using the substitution \([value] = e^{k[value]}\) we obtain the auxiliary equation \(k^2 - [value]k + [value] = 0\). Solving the auxiliary equation we obtain \(k = [value]\) and \(k = [value]\). Therefore, since we have two distinct real roots, we have two solutions \([value] = e^{[value]}\) and \([value] = e^{[value]}\). Therefore the general solution is \[[value]_{\text{cf}} = A[value] + B[value].\] 2. We are given the equation \(\displaystyle [value]\). Using the substitution \([value] = e^{k[value]}\) we obtain the auxiliary equation \(k^2 + [value]k + [value] = 0\). Solving the auxiliary equation we obtain \(k = [value]\) with multiplicity \(2\). Recall that if the auxiliary equation has two equal roots, \(k\), then the complementary function is \([value]_{\text{cf}} = (A + B)e^{k[value]}\). Therefore the general solution is \[[value]_{\text{cf}} = A[value] + B[value].\] 3. We are given the equation \(\displaystyle [value]\). Using the substitution \([value] = e^{k[value]}\) we obtain the auxiliary equation \(k^2 + [value]k + [value] = 0\). Solving this using the quadratic formula yields \[k = [value] \pm [value].\] Recall that if the auxiliary equation has complex roots \(\alpha + \beta \mathrm{i}\) and \(\alpha - \beta \mathrm{i}\), then the complementary function is \[[value]_{\text{cf}} = e^{\alpha [value]}\left( A\cos\beta[value] + B\sin\beta[value] \right).\] Therefore the general solution is \[[value]_{\text{cf}} = [value]\left(A[value] + B[value]\right).\] 4. We are given the equation \(\displaystyle [value]\). Using the substitution \([value] = e^{k[value]}\) we obtain the auxiliary equation \(k^2 + [value] = 0\). Solving the auxiliary equation yields the two solutions \(k = [value]\mathrm{i}\) and \(k = -[value]\mathrm{i}\). Again, recall that if the auxiliary equation has complex roots \(\alpha + \beta \mathrm{i}\) and \(\alpha - \beta \mathrm{i}\), then the complementary function is \[[value]_{\text{cf}} = e^{\alpha [value]}\left( A\cos\beta[value] + B\sin\beta[value] \right).\] Therefore the general solution is \[ [value]_{\text{cf}} = [value](A[value] + B[value]).\] 5. We are given the equation \(\displaystyle [value]\). Using the substitution \([value] = e^{k[value]}\) we obtain the auxiliary equation \(k^2 - [value] = 0\). Solving the auxiliary equation yields the two solutions \(k = [value]\) and \(k = -[value]\). These are two distinct real roots, therefore the general solution is \[[value]_{\text{cf}} = A[value] + B[value].\]

Exercise

By trying a solution of the form \(y = \alpha e^{-x}\), find a particular integral of the equation

\[\frac{\mathrm{d}^2y}{\mathrm{d}x^2}\ [value]\ [value]\frac{\mathrm{d}y}{\mathrm{d}x}\ [value]\ [value]y = [value]e^{-x}.\]

Substitute \(y = \alpha e^{-x}\) into the given equation to find \(\alpha\), and hence find the particular integral.

\(\alpha = \)

\(y_\text{p}(x) = \)
Feedback: We are asked to find a particular integral for the differential equation \[\frac{\mathrm{d}^2y}{\mathrm{d}x^2}\ [value]\ [value]\frac{\mathrm{d}y}{\mathrm{d}x}\ [value]\ [value]y = [value]e^{-x}.\] We try a solution of the form \(y = \alpha e^{-x}\). This gives: \[\frac{\mathrm{d}y}{\mathrm{d}x} = - \alpha e^{-x} \qquad \text{and} \qquad \frac{\mathrm{d}^2y}{\mathrm{d}x^2} = \alpha e^{-x}.\] Substituting this into the equation gives: \[\alpha e^{-x}\ [value]\ [value] \alpha e^{-x}\ [value]\ [value] \alpha e^{-x} = [value] e^{-x}\] Solving for \(\alpha\) gives \(\displaystyle \alpha = [value]\). The particular integral is then \[y_\text{p}(x) = [value].\]

Exercise

Find a particular integral for the equation:

\[\frac{\mathrm{d}^2y}{\mathrm{d}x^2}\ [value]\ [value]\frac{\mathrm{d}y}{\mathrm{d}x}\ [value]\ [value]y = [value]\]

First decide on an appropriate form for the trial solution, referring to the table if necessary. Make sure you use the same arbitrary constants as in the table, i.e., \(A\) and \(B\).

\(y_\text{p}(x) = \)

Now find \(\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}\) and \(\displaystyle \frac{\mathrm{d}^2y}{\mathrm{d}x^2}\). Once again, make sure to use the same arbitrary constants as in the table.

\(\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x} = \)

\(\displaystyle \frac{\mathrm{d}^2y}{\mathrm{d}x^2} = \)

Now substitute these values into the differential equation and equate the coefficients of the different terms.

First equate the coefficients of \(\cos(x)\).

\( = \)

Then equate the coefficients of \(\sin(x)\).

\( = \)

Solve these two equations in \(A\) and \(B\) simultaneously to find values for \(A\) and \(B\), and hence obtain the particular integral.

\(A = \)

\(B = \)

\(y_\text{p}(x) = \)
Feedback: We are asked to find a particular integral for the differential equation \[\frac{\mathrm{d}^2y}{\mathrm{d}x^2}\ [value]\ [value]\frac{\mathrm{d}y}{\mathrm{d}x}\ [value]\ [value]y = [value].\] We try a solution of the form \(y = A \cos x + B \sin x\). This gives: \[\begin{aligned} \frac{\mathrm{d}y}{\mathrm{d}x} &= [value]\\ \frac{\mathrm{d}^2y}{\mathrm{d}x^2} &= \alpha e^{-x} \end{aligned}\] Substituting this into the equation gives: \[[value] = [value]\] Equating the coefficients of \(\cos x\) gives the equation \[[value] = [value],\] and equating the coefficients of \(\sin x\) gives the equation \[[value] = [value].\] Solving these two equations simultaneously gives \[A = [value] \qquad \text{and} \qquad B = [value].\] Therefore, a particular integral for the original differential equation is \[y_\text{p}(x) = [value].\]

Exercise

Find the general solution of the following equations.

1. \(\displaystyle [value]\)
\([value] = A\ \) \(\ +\ B\ \) \(\ +\ \)
2. \(\displaystyle [value]\)
\([value] = A\ \) \(\ +\ B\ \) \(\ +\ \)
3. \(\displaystyle [value]\)
Make sure to factor out the \(e^{\alpha x}\) term.
\([value] =\ \) \(\ \times\ \bigg(A\ \) \(\ +\ B\ \) \(\ \bigg)\ +\ \)
4. \(\displaystyle [value]\)
\([value] = A\ \) \(\ +\ B\ \) \(\ +\ \)
5. \(\displaystyle [value]\)
\([value] = A\ \) \(\ +\ B\ \) \(\ +\ \)
Feedback: 1. We are asked to find the general solution of the second order, constant coefficients, inhomogeneous differental equation \[[value].\] First, we find the complementary function. Suppose \([value] = e^{k[value]}\) is a solution to the corresponding homogeneous equation. This gives the auxiliary equation \([value]\), which has roots \(k = [value]\) and \(k = [value]\). The complementary function therefore has the form \[[value]_\text{cp}([value]) = [value].\] Next, we find a particular integral. Since the function on the right-hand side of the equation is a constant, we try \([value]_\text{p}([value]) = \alpha\). Its derivatives are zero, so we get the equation: \[[value]\alpha = [value],\] which gives \(\alpha = [value]\). Therefore, the general solution is \[[value]([value]) = [value].\] 2. We are asked to find the general solution of the second order, constant coefficients, inhomogeneous differental equation \[[value].\] First, we find the complementary function. Suppose \([value] = e^{k[value]}\) is a solution to the corresponding homogeneous equation. This gives the auxiliary equation \([value]\), which has roots \(k = [value]\) and \(k = [value]\). The complementary function therefore has the form \[[value]_\text{cp}([value]) = [value].\] Next, we find a particular integral. Since the function on the right-hand side of the equation is a linear term, we try \([value]_\text{p}([value]) = [value]\). Its derivatives are: \[\begin{aligned} \frac{\mathrm{d}[value]}{\mathrm{d}[value]} &= [value] \\ \frac{\mathrm{d}^2[value]}{\mathrm{d}[value]^2} &= [value] \end{aligned}\] We substitute these in the inhomogeneous differential equation to get: \[[value],\] which gives \(a = [value]\) and \(b = [value]\). Therefore, the general solution is \[[value]([value]) = [value].\] 3. We are asked to find the general solution of the second order, constant coefficients, inhomogeneous differental equation \[[value].\] First, we find the complementary function. Suppose \([value] = e^{k[value]}\) is a solution to the corresponding homogeneous equation. This gives the auxiliary equation \([value]\), which has roots \(k = [value]\) and \(k = [value]\). The complementary function therefore has the form \[[value]_\text{cp}([value]) = [value].\] Next, we find a particular integral. Since the function on the right-hand side of the equation is a basic trigonometric function, we try \([value]_\text{p}([value]) = [value]\). Its derivatives are: \[\begin{aligned} \frac{\mathrm{d}[value]}{\mathrm{d}[value]} &= [value] \\ \frac{\mathrm{d}^2[value]}{\mathrm{d}[value]^2} &= [value] \end{aligned}\] We substitute these in the inhomogeneous differential equation to get: \[[value],\] which, equating coefficients, gives the simultaneous equations \[\begin{cases} [value] &= [value] \\ [value] &= [value] \end{cases}\] Solving these gives \(a = [value]\) and \(b = [value]\). Therefore, the general solution is \[[value]([value]) = [value].\] 4. We are asked to find the general solution of the second order, constant coefficients, inhomogeneous differental equation \[[value].\] First, we find the complementary function. Suppose \([value] = e^{k[value]}\) is a solution to the corresponding homogeneous equation. This gives the auxiliary equation \([value]\), which has roots \(k = [value]\) and \(k = [value]\). The complementary function therefore has the form \[[value]_\text{cp}([value]) = [value].\] Next, we find a particular integral. Since the function on the right-hand side of the equation is a exponential, we try \([value]_\text{p}([value]) = [value]\). Its derivatives are: \[\begin{aligned} \frac{\mathrm{d}[value]}{\mathrm{d}[value]} &= [value] \\ \frac{\mathrm{d}^2[value]}{\mathrm{d}[value]^2} &= [value] \end{aligned}\] We substitute these in the inhomogeneous differential equation to get: \[[value],\] which, equating coefficients, gives the equation: \[[value]\] Solving this gives \(a = [value]\). Therefore, the general solution is \[[value]([value]) = [value].\] 5. We are asked to find the general solution of the second order, constant coefficients, inhomogeneous differental equation \[[value].\] First, we find the complementary function. Suppose \([value] = e^{k[value]}\) is a solution to the corresponding homogeneous equation. This gives the auxiliary equation \([value]\), which has roots \(k = [value]\) and \(k = [value]\). The complementary function therefore has the form \[[value]_\text{cp}([value]) = [value].\] Next, we find a particular integral. Since the function on the right-hand side of the equation is a exponential, we try \([value]_\text{p}([value]) = [value]\). Its derivatives are: \[\begin{aligned} \frac{\mathrm{d}[value]}{\mathrm{d}[value]} &= [value] \\ \frac{\mathrm{d}^2[value]}{\mathrm{d}[value]^2} &= [value] \end{aligned}\] We substitute these in the inhomogeneous differential equation to get: \[[value],\] which, equating coefficients, gives the equation: \[[value]\] Solving this gives \(a = [value]\). Therefore, the general solution is \[[value]([value]) = [value].\]

Exercise

Find the auxiliary equation, using the variable \(k\), for the differential equation \[L\frac{\mathrm{d}^2i}{\mathrm{d}t^2} + R\frac{\mathrm{d}i}{\mathrm{d}t} + \frac{1}{C}i = 0.\]

Auxiliary equation: \(= 0\).

Given that the complementary function is \(i(t) = Ae^{k_1t} + Be^{k_2t}\), give algebraic solutions for \(k_1\) and \(k_2\).

\(k_1 =\)

\(k_2 =\)
Feedback: We are given the equation \(L\frac{\mathrm{d}^2i}{\mathrm{d}t^2} + R\frac{\mathrm{d}i}{\mathrm{d}t} + \frac{1}{C}i = 0.\) Using the substitution \(i = e^{kt}\) we obtain the auxiliary equation \[[value] = 0.\] We can use the quadratic formula to obtain \[\frac{1}{2L}\left( -R \pm \sqrt{R^2 - \frac{4L}{C}} \right).\] We can then combine the fractions inside the surd to simplify this equation to \[k = \frac{1}{2L}\left( -R \pm \sqrt{\frac{R^2C - 4L}{C}} \right).\]

Exercise

Find the complementary function of the equation \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + [value]\dfrac{\mathrm{d}y}{\mathrm{d}x} + [value]y = 0\). In your final answer, factor out the term \(e^{\alpha x}\).

\(y_{\text{cf}} =\) \(\times\) \(\bigg( A\) \(+ B\) \(\bigg)\).
Feedback: We are given the equation \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + [value]\dfrac{\mathrm{d}y}{\mathrm{d}x} + [value]y = 0\). Using the substitution \(y = e^{kx}\) we obtain the auxiliary equation \(k^2 + [value]k + [value] = 0\). Using the quadratic formula we can solve the auxiliary equation to obtain \(k = [value] + [value]\) and \(k = [value] - [value]\). Recall that if the auxiliary equation has complex roots \(\alpha + \beta \mathrm{i}\) and \(\alpha - \beta \mathrm{i}\), then the complementary function is \[y_{\text{cf}} = e^{\alpha x}\left( A\cos\beta x + B\sin\beta x \right).\] Therefore the general solution is \[y_{\text{cf}} = [value] \left( A[value] + B[value]\right).\]

The Particular Integral

Given a second order ODE \[ a{\mathrm{d}^2y\over \mathrm{d}x^2}+b{\mathrm{d}y\over \mathrm{d}x}+c\ y=f(x),\]

a particular integral is any function, \(y_\text{p}(x)\), which satisfies the ODE. That is, any function which when substituted into the left-hand side, results in the expression on the right-hand side.

Example

Show that \( y = -\dfrac{1}{4}e^{2x}\) is a particular integral of \[ \dfrac{d^2y}{dx^2} - \dfrac{dy}{dx} - 6y = e^{2x} \]

Solution

Starting with \( y = -\dfrac{1}{4}e^{2x}\) we find \[ \dfrac{dy}{dx} = - \dfrac{1}{2}e^{2x}, \qquad \dfrac{d^2y}{dx^2} =-e^{2x} \]

Substitution into the ODE yields \[ - e^{2x} - (- \dfrac{1}{2}e^{2x}) - 6 (- \dfrac{1}{2}e^{2x})\]

which simplifies to \(e^{2x},\) the same as the right-hand side.

Therefore \( y = -\dfrac{1}{4}e^{2x}\) is a particular integral and we write (attaching a subscript p):

\( y_{p}(x) = -\dfrac{1}{4}e^{2x}.\)

A particular integral is any solution of a differential equation.

Exercise

Obtain the general solution of the equation

\[[value].\]

\(y = A\ \) \(\ +\ B\ \) \(\ +\ \)

Find the particular solution satisfying \(y(0) = [value]\) and \(\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}(0) = [value]\).
Feedback: We are asked to find the general solution of the second order, constant coefficients, inhomogeneous differential equation \[[value].\] First we find the complementary function. Suppose \(y = e^{kx}\) is a solution of the corresponding homogeneous equation. This gives the auxiliary equation \([value]\), which has roots \(k = [value]\) and \(k = [value]\). Therefore, the complementary function is given by \[y_\text{cf}(x) = [value].\] Next, we find a particular integral. Since the righ-hand side of the differential equation involves a cosine, we try a particular integral of the form \(y_\text{p}(x) = [value]\). This gives the derivatives \[\begin{aligned} \frac{\mathrm{d}y_\text{p}}{\mathrm{d}x} &= [value], \\ \frac{\mathrm{d}^2y_\text{p}}{\mathrm{d}x^2} &= [value]. \end{aligned}\] Substituting these into the original equation gives \[[value].\] Equating the coefficients of \(\cos ([value] x)\) and \(\sin ([value] x)\) gives the simultaneous equations \[\begin{cases} [value] &= [value] \\ [value] &= [value] \end{cases}\] These give the values \(a = [value]\) and \(b = [value]\). Hence, a particular integral for the differential equation is \[y_\text{p}(x) = [value].\] Therefore, the general solution is given by \[y(x) = [value].\] We are now asked to find the particular solution that satisfies \(y(0) = [value]\) and \(\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}(0) = [value]\). First, we find the first derivative of the general solution: \[\frac{\mathrm{d}y}{\mathrm{d}x} = [value].\] We now evaluate the function and the derivative at zero to give the following simultaneous equations: \[\begin{cases} [value] &= [value] \\ [value] &= [value] \end{cases}\] These give the values \(A = [value]\) and \(B = [value]\). Therefore, the particular solution we seek is \[y(x) = [value].\]

Exercise

Find a particular integral for the equation

\[[value].\]

\(y_\text{p}(x) = \)
Feedback: We are asked to find a particular integral for the second order, constant coefficients, inhomogeneous differential equation \[[value].\] Since the right-hand side is a linear term, we try a particular integral of the for \(y_\text{p}(x) = [value]\). We first find the derivatives: \[\begin{aligned} \frac{\mathrm{d}y_\text{p}}{\mathrm{d}x} &= [value], \\ \frac{\mathrm{d}^2y_\text{p}}{\mathrm{d}x^2} &= [value]. \end{aligned}\] Substituting these into the original equation gives \[[value].\] Equating the constant terms and the coefficients of \(x\) gives the simultaneous equations \[\begin{cases} [value] &= [value] \\ [value] &= [value] \end{cases}\] These give the values \(a = [value]\) and \(b = [value]\). Hence, a particular integral for the differential equation is \[y_\text{p}(x) = [value].\]

Exercise

Obtain the general solution of the equation

\[[value].\]

\(y = A\ \) \(\ +\ B\ \) \(\ +\ \)
Feedback: We are asked to find the general solution of the second order, constant coefficients, inhomogeneous differential equation \[[value].\] First we find the complementary function. Suppose \(y = e^{kx}\) is a solution of the corresponding homogeneous equation. This gives the auxiliary equation \([value]\), which has the double root \(k = [value]\). Therefore, the complementary function is given by \[y_\text{cf}(x) = [value].\] Next, we find a particular integral. Since the righ-hand side is the same form as the complementary function, we must try a particular integral of the form \(y_\text{p}(x) = [value]\). This gives the derivatives \[\begin{aligned} \frac{\mathrm{d}y_\text{p}}{\mathrm{d}x} &= [value], \\ \frac{\mathrm{d}^2y_\text{p}}{\mathrm{d}x^2} &= [value]. \end{aligned}\] Substituting these into the original equation gives \[[value].\] This gives the value \(a = [value]\). Hence, a particular integral for the differential equation is \[y_\text{p}(x) = [value].\] Therefore, the general solution is given by \[y(x) = [value].\]