Topic 13 Differential Equations
A differential equation is an equation which involves one or more functions and their derivatives.
E.g.
\[\frac{dy}{dx} = y(x+1)\]
\[ \frac{dy}{dx} + y = x\]
\[\frac{d^2y}{dx^2} + \frac{dy}{dx} + y = x^2 + 2\]
are all examples of differential equations.
At A level you only study ones like the first example, which are called first order, separable, ordinary differential equations.
13.1 First order separable
First order means they only contain first derivatives.
Separable means they can be written (possibly after manipulation) in the form
\[\frac{dy}{dx} = \mathrm{f}(x) \mathrm{g}(y)\]
I.e. the derivative on the left, and the right as a product of functions of x and y.
E.g. Suppose we had
\[\frac{dy}{dx} = \frac{(x+1)}{y}\]
The right hand side is a function of x \(x+1\) times a function of y \(\frac{1}{y}\).
Rearranging, gives
\[y \frac{dy}{dx} = (x+1)\]
We can now integrate each side:
\[\int y \frac{dy}{dx}\, dx = \int x+1\, dx\]
This simplifies, remembering integration by subsitution, to
\[\int y \, dy = \int x+1\, dx\]
Which gives
\[ \frac{y^2}{2} = \frac{x^2}{2} + x + c\]
So
\[ y^2 = x^2 + 2x + 2c\]
We could leave it there, but as c is a constant to be determined, we can rename it as \(d = 2c\) to give
\[ y^2 = x^2 + 2x + d\]
Let’s take the example from the introduction:
\[\frac{dy}{dx} = y(x+1)\]
We could rewrite this as
\[\frac{1}{y}\frac{dy}{dx} = x+1\]
and then integrate both sides
\[\int \frac{1}{y} \frac{dy}{dx} dx = \int x+1 dx\]
which simplifies into (remembering integration by substitution)
\[\int \frac{1}{y} dy = \int x+1\, dx\]
We can now do the integrals on both sides, to give:
\[\ln y = \frac{x^2}{2} + x + c\] Which can be simplified to
\[y = e^{\frac{1}{2}x^2 + x + c}\]
We could leave it there, but a bit more manipulation gives
\[\begin{align} y &= e^{\frac{x^2}{2} + x + c}\\ &= e^{\frac{x^2}{2} + x}e^c\\ &= e^ce^{\frac{x^2}{2} + x} &= Ae^{\frac{x^2}{2} + x} \end{align}\]
Where we’ve made use of the fact that as c is an constant to be determined, \(e^c\) is too, so it can be simplified making the substitution \(A=e^c\).
In practice, most people shortcut a couple of steps using a slightly dodgy, but effective, notation to simplify the writing. E.g.
\[\frac{dy}{dx} = y\sin x\]
would be rewritten as
\[ \frac{1}{y}\, dy = \sin x \, dx\]
I.e. treating the derivative as if it were a fraction and rearranging. It’s not a fraction, but just as with integration by substitution, treating it that way gives us the correct results in this case. We can then put in the integration signs \[ \int \frac{1}{y}\, dy = \int \sin x \, dx\] and integrate
\[ \ln y = -\cos x + c\] Giving \[ y = Ae^{-\cos x}\]
So, the procedure is:
- Write the equation as \[\frac{dy}{dx} = \mathrm{f}(x) \mathrm{g}(y)\]
- Rearrange to \[\frac{1}{\mathrm{g}(y)} \, dy = \mathrm{f}(x) \, dx\]
- Integrate both sides, remembering the constant of integration, and then tidy up.
This gives the general solution. You get the particular solution by determining the unknown constant from extra information.
E.g. earlier we solved a differential equation and got the general solution
\[y = Ae^{\frac{1}{2}x^2 + x}\]
Suppose when \(x=0\) we had \(y=2\), then we would have
\[2 = Ae^{\frac{1}{2}0 + 0}\] which gives \(A=2\), so the particular solution is \[y = 2e^{\frac{1}{2}x^2 + x}\]