online advertising

Sunday, December 27, 2015

First order linear differential equation

Problem:

$ y' + 2xy = x $

Solution:

This is a first order linear differential equation, let's consider the derivative of the following form:

$ (p(x)e^{q(x)})' = p'(x)e^{q(x)} + p(x)q'(x)e^{q(x)} = e^{q(x)}(p'(x) + p(x)q'(x)) $

Now we set $ p(x) = y $, $ q'(x) = 2x $, we can multiply both side by $ e^{x^2} $ to get

$ \begin{eqnarray*} e^{x^2}(y' + 2xy) &=& xe^{x^2} \\ (e^{x^2}y)' &=& xe^{x^2} \\ (e^{x^2}y) &=& \int{xe^{x^2}dx} \\ &=& \frac{1}{2}\int{e^{x^2}d(x^2)} \\ &=& \frac{1}{2}e^{x^2} + C \\ y &=& \frac{1}{2} + Ce^{x^{-2}} \\ \end{eqnarray*} $

No comments:

Post a Comment