Need help integrating

1. Mar 6, 2008

coffeebean51

how do you integrate $$\frac{dy}{dx}=4x-2y$$.

I don't know if this is right, but this is where I'm going with this:

$$y'=4x-2y$$

$$y'+2y=4x$$

Solving homogeneous for complementary solution:
$$y'+2y=0$$

Solving auxiliary equation:
$$m+2=0$$
$$m=-2$$

Which gives
$$y=c_{1}e^{-2x}$$
$$y'=-2c_{1}e^{-2x}$$

Now solving original D.E.: $$y'+2y=4x$$

$$-2c_{1}e^{-2x}+2(c_{1}e^{-2x})=4x$$

I'm lost at this step.

Last edited: Mar 6, 2008
2. Mar 6, 2008

HallsofIvy

You should be! You found y= e-2x as a solution to the equation y'+ 2y= 0. It can't possibly give 4x!

I suspect you are thinking of a looking for a solution of the form y(x)= u(x)e-2x where u is an unknown function of x. Then y'= -2ue-2x+ u' e-2x so y'+ 2y= -2ue-2x+ 2u' e-2x+ 2ue2x= 2u' e-2x= 4x. The part not involving u' cancels precisely because e-2x satisfies the equation= 0. Now u'= 4xe2x. You can use integration by parts to find u and put it back into y= u e2x to find y.

Another method, simpler here, is the "method of undetermined coefficients": Since the derivative of 4x will give a constant that will have to be cancelled, try y= Ax+ B. Then y'= A so y'+ 2y= A+ (Ax+ B)= Ax+ (A+ B)= 4x+ 0. For that to be true for all x, you must have "corresponding coefficients" equal: A= 4 and A+ B= 0.

3. Mar 9, 2008

flebbyman

It is a linear inseparable diff. equation, so find the integrating factor, e^(2x), multiply by the integrating factor, and solve, and you get y=2x-1 +c*e^(-2x)