# 1st order linear differential equation

• Nov 20th 2010, 03:35 AM
Slos
1st order linear differential equation
can anyone explain me the principle to solve:

$y' + 2y = x^2$
• Nov 20th 2010, 03:40 AM
Ackbeet
This equation is first-order linear. There's a procedure called variation of parameters, or the integrating factor method, that you can use to solve this equation. Take a look here for detailed instructions on solving these equations, along with some examples.
• Nov 20th 2010, 04:42 AM
Prove It
Consider a DE of the form

$\displaystyle \frac{dy}{dx} + P\,y = Q$ where $\displaystyle y, P, Q$ are all functions of $\displaystyle x$ and you hope to solve the DE for $\displaystyle y$. We call this type of DE First-Order Linear.

What we aim to do is to find a function of $\displaystyle x$, which we will call $\displaystyle I$ (I use $\displaystyle I$ because it's called the Integrating Factor) which will enable us to write the LHS as a single derivative.

Let's say we had multiplied both sides by $\displaystyle I$. That would give

$\displaystyle I\,\frac{dy}{dx} + I\,P\,y = I\,Q$.

Now let's take a closer look at the product rule.

If you wished to find the derivative of $\displaystyle f\,y$, where $\displaystyle f$ and $\displaystyle y$ are functions of $\displaystyle x$. Using the product rule this would give

$\displaystyle \frac{d}{dx}(f\,y) = f\,\frac{dy}{dx} + \frac{df}{dx}\,y$.

The LHS of your DE (after multiplying by $\displaystyle I$) looks suspiciously similar. In fact, if $\displaystyle I = f$ and $\displaystyle I\,P = \frac{df}{dx}$, then it IS in fact a product rule expansion. Note that if $\displaystyle I=f$ then $\displaystyle \frac{dI}{dx} = \frac{df}{dx}$.

Substituting gives $\displaystyle I\,P = \frac{dI}{dx}$, which is separable, and solving for $\displaystyle I$ gives

$\displaystyle P = \frac{1}{I}\,\frac{dI}{dx}$

$\displaystyle \int{P\,dx} = \int{\frac{1}{I}\,\frac{dI}{dx}\,dx}$

$\displaystyle \int{P\,dx} = \int{\frac{1}{I}\,dI}$

$\displaystyle \int{P\,dx} + C = \ln{|I|}$

$\displaystyle Ae^{\int{P\,dx}} = I$ where $\displaystyle A = \pm e^C$.

Any value of $\displaystyle A$ will work when we multiply the DE by the integrating factor, so we choose $\displaystyle A = 1$ for simplicity.

So you will need to multiply through by your integrating factor, which is of the form $\displaystyle e^{\int{P\,dx}}$, and that will reduce your LHS into a product rule expansion, which will then make the function integrable.

$\displaystyle \frac{dy}{dx} + 2y = x^2$.

Notice that your $\displaystyle P = 2$, thus your integrating factor is $\displaystyle e^{\int{2\,dx}} = e^{2x}$.

Multiplying through by your integrating factor gives

$\displaystyle e^{2x}\,\frac{dy}{dx} + 2e^{2x}y = x^2e^{2x}$

$\displaystyle \frac{d}{dx}(e^{2x}y) = x^2e^{2x}$ (check using the product rule...)

$\displaystyle e^{2x}y = \int{x^2e^{2x}\,dx}$

$\displaystyle e^{2x}y = \frac{1}{2}x^2e^{2x} - \int{x\,e^{2x}\,dx}$

$\displaystyle e^{2x}y = \frac{1}{2}x^2e^{2x} - \left(\frac{1}{2}x\,e^{2x} - \int{\frac{1}{2}e^{2x}\,dx}\right) + C$

$\displaystyle e^{2x}y = \frac{1}{2}x^2e^{2x} - \frac{1}{2}x\,e^{2x} + \frac{1}{4}e^{2x} + C$

$\displaystyle y = \frac{1}{2}x^2 - \frac{1}{2}x + \frac{1}{4} + Ce^{-2x}$.
• Nov 20th 2010, 10:43 AM
Slos
thanks a lot for your explanation