# Math Help - Integral help

1. ## Integral help

Hi.

This is a differential equation but im stuck at the integral.

dy/dx + 2xy = xy^2 + 2x

i moved everything to one side except y' and factored out x. I get:

dy/dx = x(y^2 - 2y +2)

then

dy/(y^2 - 2y +2) = x dx

how do i integrate the left side?

2. Originally Posted by Kuma
dy/(y^2 - 2y +2) = x dx
how do i integrate the left side?
$y^2-2y+1=(y-1)^2+1$

3. $y^2-2y+2 = (y^2-2y+1)+1 = (y-1)^2+1$,
so $\int\frac{1}{y^2-2y+1}\;{dy} = \int\frac{1}{(y-1)^2+1}\;{dy}$. Now, let $t = (y-1)$.