The nature of the root(s) of the auxiliary equation tells us the form of the general solution (if homogeneous) or complementary function (if non-homogeneous).
This is a simple example of a first-order, separable differential equation. We can move all the \(\raise 0.3pt{y}\) terms to one side and all the \(\raise 0.2pt{x}\) terms to the other. Then we simply integrate both sides with respect to their respective variables.
By making use of partial fractions, express \(y\) in terms of \(x\small.\)
Although this looks quite similar to the previous example and is also a first-order, separable differential equation, it is significantly more difficult.
It is known that \(\raise 0.3pt{y\!=\!\large\frac{\pi}{2}}\) when \(\raise 0.3pt{x\!=\!\large\frac{\pi}{4}\small.}\)
Find the particular solution, in implicit form.
This is also a first-order, separable ODE, so we start by separating \(x\) and \(y\):
$$
\begin{gather}
\small\frac{dy}{dx}\normalsize = \small\frac{\text{sec}\,y}{y}\normalsize \\[8pt]
y\ dy = \text{sec}\,y\ dx \\[8pt]
y\,\text{cos}\,y\ dy = 1\ dx \\[8pt]
\int y\,\text{cos}\,y\ dy = \int 1\ dx \\[8pt]
\end{gather}
$$
The left hand side is a product of two functions of \(y\small,\) so it needs integration by parts.
The wording of the question allows us to leave this general solution in implicit form (which is fortunate, as it isn't separable using any algebraic method!)
Now we substitute the initial conditions \(\raise 0.3pt{x\!=\!\large\frac{\pi}{4}\small,\,}\) \(\raise 0.3pt{y\!=\!\large\frac{\pi}{2}}\) to work towards the particular solution:
$$
\begin{gather}
\small\frac{\pi}{2}\normalsize\,\text{sin}\,\small\frac{\pi}{2}\normalsize+\text{cos}\,\small\frac{\pi}{2}\normalsize = \small\frac{\pi}{4}\normalsize+c \\[6pt]
\small\frac{\pi}{2}\normalsize\left(1\right)+0 = \small\frac{\pi}{4}\normalsize+c \\[6pt]
c = \small\frac{\pi}{2}\normalsize-\small\frac{\pi}{4}\normalsize \\[6pt]
c = \small\frac{\pi}{4}\normalsize \\[6pt]
\end{gather}
$$
The first method is totally logical but a bit laborious. There is a shortcut that can be proven to be an equivalent method, but when first seen it often induces a "Huh?! Where did that come from?" reaction. Anyway, here it is:
This is another first-order linear differential equation. However, to put it into the standard form we first need to divide through by \(\raise 0.2pt{x}\small.\)
Like the previous example, we will show you both methods of obtaining the general solution. You may decide which suits you better. But first, we need the integrating factor:
This isn't much shorter. Its only slight advantage is that you don't have to think about the product rule. We prefer the first method, but you make up your own mind.
Find the particular solution of the following differential equation, given that \(\raise 0.3pt{y\!=\!2}\) and \(\large\frac{dy}{dx}\normalsize\!=\!-11\) when \(\raise 0.2pt{x\!=\!0}\small.\)
Note that we have two distinct, real roots of the auxiliary equation. That's important. When we have real and distinct roots \(\raise 0.2pt{p}\) and \(\raise 0.2pt{q}\small,\) the general solution of the differential equation is always of the form:
Now we turn our attention to using the initial conditions \(\raise 0.2pt{x\!=\!0}\small,\) \(\raise 0.3pt{y\!=\!2\small,}\) \(\large\frac{dy}{dx}\normalsize\!=\!-11\) to find the particular solution.
First we need to differentiate the general solution to obtain an expression for \(\large\frac{dy}{dx}\small.\)
Note that we have real and equal roots of the auxiliary equation. That's important. When we have a repeated real root, \(\raise 0.2pt{p}\) say, the general solution of the differential equation is always of the form:
Note that we have complex conjugate roots of the auxiliary equation. That's important. When we have complex conjugate roots \(\raise 0.2pt{p\pm qi\small,}\) the general solution of the differential equation is always of the form:
Like the previous three examples, this is a second-order linear differential equation, but this time the right hand side is not zero, so it is non-homogeneous.
We start by solving the related homogeneous equation. Its general solution is known as the complementary function, and it forms part of the general solution of the original non-homogeneous equation.
The AE has distinct, real roots so the complementary function (CF) is:
$$ y=Ae^{x}+Be^{4x} $$
where \(A\) and \(B\) are constants.
Now we focus on the right hand side of the original ODE: \(\raise 0.2pt{4x-1\small.}\) This is a linear expression so a particular solution of the original equation will be in the form \(y=Cx+D\) where \(\raise 0.1pt{C}\) and \(D\) are constants which we can determine. We start by differentiating twice:
Like the previous example, this is a non-homogeneous second-order linear differential equation, although this example is going to have an added complication, as you will see below. Deep breath...
We start by solving the related homogeneous equation:
Because the AE has a repeated real root, the complementary function (CF) is:
$$ y=Ae^{2x}+Bxe^{2x} $$
where \(A\) and \(B\) are constants.
Now we consider the right hand side of the original equation: \(\raise 0.2pt{6e^{2x}\small.}\) Because it is an exponential expression we would usually try \(\raise 0.2pt{y=Ce^{2x}}\) (where \(\raise 0.2pt{C}\) is a constant) as the particular integral (PI).
But here is where the complication arises: there is already a term of that form in the CF: the \(\raise 0.2pt{Ae^{2x}\small.}\) When that happens, we multiply by \(\raise 0.2pt{x}\small,\) giving \(y=Cxe^{2x}\small.\) But that's no good either, because there is also a term of that form in the CF: the \(\raise 0.2pt{Bxe^{2x}\small.}\) When this happens, we need to multiply by \(\raise 0.2pt{x}\) again, so now we have \(\raise 0.2pt{y=Cx^{2}e^{2x}\small.}\)
Now we use the product rule to find the first and second derivatives. Check these for yourself; they're fiddly!
Thankfully we don't need to go any further with this beastly equation! Its sole purpose was to let us find \(\raise 0.2pt{C\small.}\)
So, equating the coefficients of \(\raise 0.2pt{e^{2x}\small,}\) we obtain\(\raise 0.2pt{2C=6\small,}\) so \(\raise 0.2pt{C=3}\) and the particular integral (PI) is \(\raise 0.2pt{3x^{2}e^{2x}\small.}\)
Finally, the general solution of the original equation is just the complementary function plus the particular integral:
$$ y=Ae^{2x}+Bxe^{2x}+3x^{2}e^{2x} $$
Note: A modified PI has only been required in one recent exam paper: 2021 P1 Q8. See example 13 below.
given that \(y\!=\!7\) and \(\large\frac{dy}{dx}\normalsize\!=\!\large\frac12\normalsize\) when \(x\!=\!0\small.\)
Like the previous two examples, this is a non-homogeneous second-order linear differential equation, although in this example we need to go further and provide a particular solution, not just the general solution.
Questions of this type, usually worth 9 or 10 marks, appear quite often on Advanced Higher exam papers.
Because the AE has a repeated real root, the complementary function (CF) is:
$$ y=Ae^{3x}+Bxe^{3x} $$
where \(A\) and \(B\) are constants.
Now we consider the right hand side of the original equation: \(8\,\text{sin}\,x+19\,\text{cos}\,x\small.\)
Because it is a trigonometic expression we will use \(C\,\text{sin}\,x+D\,\text{cos}\,x\) (where \(\raise 0.2pt{C}\) and \(\raise 0.2pt{D}\) are constants) as the particular integral.
To find \(\raise 0.2pt{B,}\) we need to differentiate and then substitute \(\large\frac{dy}{dx}\normalsize\!=\!\large\frac12\normalsize\) and \(x\!=\!0\):
An electronic device contains a timer circuit that switches off when the voltage, \(V\small,\) reaches a set value. The rate of change of the voltage is given by
where \(k\) is a constant, \(t\) is the time in seconds, and \(0\leqslant V\lt 12\small.\)
Given that \(V=2\) when \(t=0\small,\) express \(V\) in terms of \(k\) and \(t\small.\)
This is first-order, separable, so we separate the variables and integrate:
given \(y\!=\!5\) and \(\large\frac{dy}{dx}\normalsize\!=\!12\) when \(x\!=\!0\small.\)
This 9-mark question is about as tough as this topic can get! Note that, like example 10 above, this solution needs a modified PI to ensure that it is linearly independent of the CF.
The AE has distinct, real roots so the complementary function (CF) is:
$$ y=Ae^{2x}+Be^{-3x} $$
where \(A\) and \(B\) are constants.
Now we consider the right hand side of the original equation: \(35e^{2x}\small.\) Because it is an exponential expression we would normally use \(\raise 0.2pt{y=Ce^{2x}}\) (where \(\raise 0.2pt{C}\) is a constant) as the particular integral (PI).
However, we already have a term of that form in the CF: the \(\raise 0.2pt{Ae^{2x}\small.}\) So we modify it by multiplying by \(\raise 0.2pt{x\small,}\) using \(y=Cxe^{2x}\) as the PI.
Now we use the product rule to find the first and second derivatives of the PI.
Finally, \(A=5\!-\!B=5\!-\!1=4\small,\) and we obtain our particular solution:
$$ y=4e^{2x}+e^{-3x}+7xe^{2x} $$
Example 14 (calculator)
SQA Advanced Higher Maths 2022 Paper 2 Q8 Subtopic: First-order linear ODEs
(a) Differentiate \(x\,\text{ln}\,x\!-\!x\) with respect to \(x\small.\) (b) Hence find the general solution of the differential equation
$$ \begin{flalign*} & \small\frac{dy}{dx}\normalsize+y\,\text{ln}\,x=x^{-x}\small. & \end{flalign*} $$
Like example 4 and example 5 above, we can either use the reverse product rule or the shortcut method, both of which make use of the integrating factor (IF):