NARROW DISPLAY WARNING
You are most likely using a tablet or mobile device in portrait orientation. This website is best viewed using a typical computer screen with the browser window maximized.
Viewing this website in portrait orientation can cause problems with equations being longer than the screen width (you can scroll to the right), images being poorly sized, and the font size of maths text being much smaller than regular text. If your only option is a tablet or mobile device, your viewing experience will be better if you view this website in landscape orientation. You might need to refresh the page to fix any problems after rotating.
This method can be used to solve differential equations of the form $y' + f(x) y = g(x)$ and is a clever trick. The idea is to multiply the entire equation by something to make the differential equation integrable. The thing multiplying the entire differential equation is called the integrating factor and is usually called $\mu(x)$. This is one of those things that is easy to do once you know how to do it, but would be very difficult to come up with yourself.
To get an idea of what to do, let's start with a few examples to get some intuition.
Find the general solution to the following differential equation.
\begin{equation} y' + 2y = 0 \end{equation}The first idea anyone thinks of is to just try to integrate the whole thing.
\begin{equation} \int y' \text{ d}x + \int 2y \text{ d}x = \int 0 \text{ d}x \end{equation} \begin{equation} y + 2\int y \text{ d}x = C \end{equation}The first and third integrals were possible because the antiderivative of $y'$ is just $y$ and the RHS is just the constant of integration $C$. The problem is the intergal of regular $y$ is left over, and we don't know what $y$ is, so we can't integrate. We've just traded one differential equation we can't solve for something worse we can't solve.
There's a clever trick though. If the entire equation is multiplied by $e^{2x}$ then the integration becomes simpler.
\begin{equation} e^{2x} y' + 2e^{2x} y = 0 e^{2x} = 0 \end{equation} \begin{equation} \int e^{2x} y' + 2e^{2x} y \text{ d}x = \int 0 \text{ d}x \end{equation}The LHS can be simplified by using the product rule in reverse.
\begin{equation} (e^{2x} y)' = e^{2x} y' + (e^{2x})' y = e^{2x} y' + 2e^{2x} y \end{equation}The integrand on the LHS can be replaced with $(e^{2x} y)'$ which makes the integration easier because it's the integral of a derivative. The integral and derivative just cancel each other out.
\begin{equation} \int e^{2x} y' + 2e^{2x} y \text{ d}x = \int (e^{2x} y)' \text{ d}x = e^{2x} y \end{equation}The only thing left to do is solve for $y$.
\begin{equation} \int e^{2x} y' + 2e^{2x} y \text{ d}x = \int 0e^{2x} \text{ d}x \end{equation} \begin{equation} e^{2x} y = C \qquad\qquad y = Ce^{-2x} \end{equation}The above differential equation became much easier to solve after multiplying the entire differential equation by the integrating factor $e^{2x}$, but that leaves the question of how to come up with the integrating factor.
The integrating factor for $y' + f(x)y = g(x)$ is $\displaystyle e^{\int f(x) \text{ d}x} = \exp\left( \int f(x) \text{ d}x \right)$.
Try to solve these other differential equations and use the videos as a guide if you get stuck.
Find the general solution to the following differential equation.
\begin{equation} y' + \frac{1}{x}y = 0 \end{equation}Find the general solution to the following differential equation.
\begin{equation} y' - \tan(x)y = 0 \end{equation}Find the general solution to the following differential equation.
\begin{equation} xy' + 3y = 7 \end{equation}Find the general solution to the following differential equation.
\begin{equation} 3y' + xy = x \end{equation}Find the general solution to the following differential equation.
\begin{equation} y' + y = x^{3} \end{equation}Solve the following differential equation using Integrating Factor.
\begin{equation} y' + f(x)y = g(x) \end{equation}The integrating factor to use is $e^{\int f(x) \text{ d}x} = \text{exp}\big( \int f(x) \text{ d}x \big)$ which will allow for the $y'$ and $y$ to both turn into just $y$.
\begin{equation} \text{exp}\left( \int f(x) \text{ d}x \right) y' + f(x) \text{exp}\left( \int f(x) \text{ d}x \right) y = g(x) \text{exp}\left( \int f(x) \text{ d}x \right) \end{equation}It's very difficult to see here, but the LHS can be simplified by using the product rule in reverse.
\begin{equation} \left(\text{exp}\left( \int f(x) \text{ d}x \right) y \right)' = \text{exp}\left( \int f(x) \text{ d}x \right) y' + \left(\text{exp}\left( \int f(x) \text{ d}x \right)\right)' y \end{equation}There's still the derivative of the exponential to do though.
The derivative of the exponential uses the chain rule. The derivative of the exponent cancels out the integral in the exponent.
\begin{equation} \left(\text{exp}\left( \int f(x) \text{ d}x \right)\right)' = \left( \int f(x) \text{ d}x \right)' \text{exp}\left( \int f(x) \text{ d}x \right) = f(x) \text{exp}\left( \int f(x) \text{ d}x \right) \end{equation}Multiplying by the integrating factor $e^{\int f(x) \text{ d}x}$ actually made integrating the LHS easier.
\begin{equation} \text{exp}\left( \int f(x) \text{ d}x \right) y' + f(x) \text{exp}\left( \int f(x) \text{ d}x \right) y = g(x) \text{exp}\left( \int f(x) \text{ d}x \right) \end{equation} \begin{equation} \left(\text{exp}\left( \int f(x) \text{ d}x \right) y \right)' = g(x) \text{exp}\left( \int f(x) \text{ d}x \right) \end{equation} \begin{equation} \int \left(\text{exp}\left( \int f(x) \text{ d}x \right) y \right)' \text{ d}x = \int g(x) \text{exp}\left( \int f(x) \text{ d}x \right) \text{d}x \end{equation} \begin{equation} \text{exp}\left( \int f(x) \text{ d}x \right) y = \int g(x) \text{exp}\left( \int f(x) \text{ d}x \right) \text{d}x \end{equation}The LHS no longer has any $y'$ terms, just $y$. The only integrals left, even though they look like a headache, are only integrals of $x$, which are at least possible to do.
\begin{equation} y = \frac{\int g(x) \text{exp}\left( \int f(x) \text{ d}x \right) \text{d}x}{\text{exp}\left( \int f(x) \text{ d}x \right)} \end{equation}This formula will solve the problem, but it's often easier to do everything one step at a time, like in the example solutions, rather than all at once.