# Solve (dy/dx)-2xy=x

### 1 Answer | Add Yours

Solve `(dy)/(dx)-2xy=x` :

`(dy)/(dx)-2xy=x`

`(dy)/(dx)=x+2xy`

`(dy)/(dx)=x(1+2y)`

`(dy)/(1+2y)=xdx` Integrate both sides:

Let u=1+2y so du=2dy

`1/2intu^(-1)du=intxdx`

`1/2ln|u|=x^2/2`

`ln|1+2y|=x^2+C_1`

`e^(ln|1+2y|)=e^(x^2+C_1)` but `e^(x^2+C_1)=e^(x^2)e^C_1=Ce^(x^2)`

`1+2y=Ce^(x^2)`

`y=1/2(Ce^(x^2)-1)`

--------------------------------------------------------------

`y=Ce^(x^2)-1/2`

-------------------------------------------------------------

Check: `y=Ce^(x^2)-1/2` ==> `y'=2xCe^(x^2)`

Then `y'-2xy=2xCe^(x^2)-2x(Ce^(x^2)-1/2)`

`=2xCe^(x^2)-2xCe^(x^2)-2x(-1/2)`

`=x` as required.