How To Solve First Order Linear ODEs Using Integrating Factor
Multiplication by integrating factor is my favorite method of solving first order linear ordinary differential equations…
A generic first order linear ordinary differential equation has the form
<$$ y'(x) + P(x)y(x) + Q(x) = 0, $$>where <$ y'(x) = \frac{dy}{dx}(x) $> and <$P,Q \colon I \to \mathbb{R} $> are continuous functions defined on some open interval <$I.$>
Integrating Factor Method
We first define the integrating factor <$ \mu(x) := \exp\left(\int P(x)\,dx\right) $>. Note that by the chain rule and the fundamental theorem of calculus, we have
<$$ \displaylines{ \frac{d}{dx}\exp\left(\int P(x)\,dx\right) = \exp\left(\int P(x)\,dx\right) P(x), \text{or} \\ \frac{d}{dx}\mu(x) = \mu(x)P(x) } $$>We move <$Q(x)$> to the right hand side of the differential equation and multiply both sides by <$ \mu(x) $> to obtain
<$$ y'(x)\mu(x) + P(x)y(x)\mu(x) = -Q(x)\mu(x). $$>When we look carefully at the equation, we see that on the left side we have
<$$ \frac{d}{dx}y(x)\mu(x) + y(x) \frac{d}{dx} \mu(x), $$>which is a result of the product rule for derivations:
<$$ \frac{d}{dx}\left( y(x) \cdot \mu(x) \right) = \frac{d}{dx}y(x)\mu(x) + y(x) \frac{d}{dx} \mu(x). $$>Substituting this for the left hand side, our equation becomes
<$$ \frac{d}{dx}\left( y(x) \cdot \mu(x) \right) = -Q(x)\mu(x). $$>Now we integrate both sides with respect to <$x$> and use the fundamental theorem of calculus again on the left side:
<$$ y(x) \cdot \mu(x) - K = -\int Q(x)\mu(x)\, dx, \quad K \in \mathbb{R}. $$>Finally, we move <$K$> to the right hand side and divide both sides by <$ \mu(x) $> to arrive at <$ y(x) $>:
<$$ y(x) = \frac{1}{\mu(x)} \left( K - \int Q(x)\mu(x)\, dx \right). $$> <$$ y(x) = \exp\left(-\int P(x)dx\right) \left( K - \int Q(x)\exp\left(\int P(x)dx\right) dx \right). $$>Example
Let us solve the equation <$ y' + 2xy = 2xe^{-x^2} $>, where <$y$> denotes <$y(x)$> for brevity. We see that in this case <$ P(x) = 2x, \, Q(x) = -2xe^{-x^2} $>. First, we calculate the integrating factor:
<$$ \mu(x) = \exp\left(\int P(x)dx\right) = \exp\left(\int 2xdx\right) = \exp\left(x^2\right). $$>We multiply the equation by this factor and get
<$$ y'e^{x^2} + 2xe^{x^2}y = 2xe^{-x^2}e^{x^2}. $$>Simplification and the “reverse product rule” yield
<$$ \frac{d}{dx}\left(ye^{x^2}\right) = 2x. $$>We integrate both sides by with respect to <$ x $> and divide to get to <$ y $>, the final result:
<$$ ye^{x^2} = x^2 + C, $$> <$$ y = e^{-x^2} \left( x^2 + C \right),\quad x,C \in \mathbb{R}. $$>
Speak your mind
Allowed HTML tags are a, blockquote, em, code, li, ol, p, pre, strong, ul. Links to other comments in the form “[IV]” or “[4]” are detected automatically.