Differential equations are an important idea in calculus because they can be used to describe how things change over time or space. For example, differential equations can be used to model:
They can also be used to model many other situations.
Differential equations are very good at describing these changes. However, they are generally difficult to use in their original form. For this reason, it is helpful to understand how to solve them. This page covers one technique for doing this.
In brief, it covers the following:
First, though, we look at what exactly differential equations are, and the different types.
A differential equation is an equation that involves one or more derivatives. For example, the following are all differential equations:
These are all examples of what are called ordinary differential equations. This is because each equation contains derivatives taken with respect to only one variable. In other words, each equation has derivatives with respect to \(x\) or \(t\), but not both.
If a differential equation contains derivatives with respect to more than one variable, these are called partial derivatives, and the equation is called a partial differential equation. Partial differential equations are not covered on this page.
Differential equations can also be described by their order and their degree.
The order of a differential equation is the highest derivative that appears in the equation. If the highest derivative is a first derivative, the equation is called a first order differential equation. If the highest derivative is a second derivative, the equation is called a second order differential equation, and so on. For example, the first three differential equations above are first order differential equations. The fourth one is a second order differential equation.
The degree of a differential equation is the exponent of the highest derivative in the equation. For example, the following differential equation is a second degree differential equation. It is actually a first order, second degree, ordinary differential equation:
\[(\frac{dy}{dx})^2 + 2y = 3x^3\]The differential equation below, on the other hand, is only a first degree differential equation as its highest derivative does not have an exponent (in fact it is a second order first degree ordinary differential equation).
\[\frac{d^2y}{dx^2} - (\frac{dy}{dx})^3 = 4x\]In this page we will look at a method of solving first order first degree differential equations only.
Finally, a special kind of first order differential equation is a linear differential equation, which is a first order differential equation in the following form (where \(p(x)\) and \(q(x)\) are functions of \(x\)):
\[\frac{dy}{dx} + p(x)y = q(x)\]Test your understanding of the different types of differential equations by working through the questions below:
This is a second order differential equation, as the highest derivative is a second derivative.
This is a second degree differential equation, as the highest derivative has an exponent of \(2.\)
This is a second order second degree ordinary differential equation.
No, because it contains a \(y^3\) instead of just \(y.\)
There are many different types of differential equations, and there are also many different ways to solve them. Some differential equations cannot be solved at all. Some of the methods for solving them are very complex, but one of the simplest is a technique called separation of variables. This technique can be used when a differential equation is separable. A differential equation is separable when it can be written in the form:
\[f(y)\,\frac{dy}{dx} = g(x)\]If it can be written in this form, then the differential equation can be rearranged as follows:
\[f(y)\,dy = g(x) dx\]We can then integrate both sides of the equation to solve for \(y\):
\[\int f(y)\,dy = \int g(x)\,dx\]Sometimes you are given an initial condition. This is the value of \(y\) when \(x\) is equal to a certain number. If you have an initial condition, you can substitute these values into the solution. This allows you to find the constant of integration. If you are not given an initial condition, you can leave the constant of integration as part of the solution.
Example 1:
Solve \(2y\,\frac{dy}{dx} = 4x - 5\)
Solution:
This equation is in the form \(f(y)\,\frac{dy}{dx} = g(x),\) so we can rearrange it and then integrate as follows:
\[\begin{aligned} 2y\,\frac{dy}{dx} &= 4x - 5 \\\ \therefore \int 2y\,dy &= \int (4x - 5)\,dx \\\ \therefore y^2 &= 2x^2 - 5x + C \\\ \therefore y &= \sqrt{2x^2 - 5x + C} \\\ \end{aligned}\]Example 2:
Solve \(\frac{dy}{dx} = \frac{3x^2(4x + 1)}{2y}\) given that when \(x = 1,\) \(y = 6\)
Solution:
This equation is in the form \(f(y)\,\frac{dy}{dx} = g(x),\) so we can rearrange it and then integrate as follows:
\[\begin{aligned} \frac{dy}{dx} &= \frac{3x^2(4x + 1)}{2y} \\\ \therefore \int 2y\,dy &= \int 3x^2(4x + 1)\,dx \\\ \therefore \int 2y\,dy &= \int (12x^3 + 3x^2)\,dx \\\ \therefore y^2 &= 3x^4 + x^3 + C\\\ \therefore y &= \sqrt{3x^4 + x^3 + C} \\\ \end{aligned}\]Given that when \(x = 1\) we have \(y = 6,\) it follows that:
\[\begin{aligned} 6 &= \sqrt{1 + 1 + C} \\\ \therefore 6 &= \sqrt{2 + C} \\\ \therefore 36 &= 2 + C \\\ \therefore C &= 34 \\\ \end{aligned}\]So the solution to the differential equation is \(y = \sqrt{3x^4 + x^3 + 34}\)
Test your knowledge of the separation of variables technique by using it to solve the differential equations below:
Note we can write this as \(y = Ce^{2x^2}\) as the exponent laws tell us we can rewrite \(e^{2x^2 + C}\) as \(e^{2x^2}.e^C,\) and \(e^C\) is just another constant.
Note we can write this as \(y = Ce^{x^2 + x}\) as the exponent laws tell us we can rewrite \(e^{x^2 + x + C}\) as \(e^{x^2 + x}.e^C,\) and \(e^C\) is just another constant.
Given that when \(x = 0\) we have \(y = 5,\) it follows that:
\[\begin{aligned} 5 &= ln\,C \\\ \therefore C &= e^5 \\\ \end{aligned}\]So the solution to the differential equation is \(y = ln(2x^4 + e^5)\)
We can integrate the left hand side of this equation using integration by substitution where we set \(u = y - 4.\) This gives:
\[\begin{aligned} \int \frac{1}{u}\,du &= ln\,|u|\,\\\ &= ln\,|y - 4|\,\\\ \end{aligned}\]And so, using the logarithm laws, we have:
\[\begin{aligned} \int \frac{1}{y-4}\,dy &= \int \frac{2}{x}\,dx\\\ \therefore ln\,|y - 4|\, &= 2\,ln\,|x|\, + ln\,C \\\ \therefore ln\,|y - 4|\, &= ln\,|x^2|\, + ln\,C \\\ \therefore ln\,|y - 4|\, &= ln\,|Cx^2|\, \\\ \therefore y - 4 &= Cx^2 \\\ \therefore y &= Cx^2 + 4\\\ \end{aligned}\]Finally, given that when \(x = 3\) we have \(y = 22,\) it follows that:
\[\begin{aligned} 22 &= 9C + 4 \\\ \therefore 9C &= 18 \\\ \therefore C &= 2 \\\ \end{aligned}\]So the solution to the differential equation is \(y = 2x^2 + 4\)