# `y' + 3x^2y = x^2y^3` Solve the Bernoulli differential equation.

`y'+3x^2y=x^2y^3`

Multiply the above equation by `y^(-3)`

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

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

Taking the transformation  `v=y^(-2)`

`(dv)/dx=d/dy(y^(-2))*dy/dx`

`(dv)/dx=-2y^(-3)dy/dx`

`-1/2(dv)/dx=y^(-3)dy/dx`

Now the Bernoulli equation is transformed as ,

`-1/2(dv)/dx+3x^2v=x^2`

`(dv)/dx-6x^2v=-2x^2`

Now the above is a linear equation in the dependent variable v and independent variable y.

The integrating factor is n(x)=`e^(int(-6x^2dx))`

`=e^(-6x^3/3)`

`=e^(-2x^3)`

Then,

`e^(-2x^3)*(dv)/dx-6e^(-2x^3)*x^2v=-2e^(-2x^3)*x^2`

`d/dx(e^(-2x^3)*v)=e^(-2x^3)(dv)/dx+ve^(-2x^3)(-6x^2)`

`=e^(-2x^3)(dv)/dx-6e^(-2x^3)*x^2v`

`=-2e^(-2x^3)*x^2`

`intd/dx(e^(-2x^3)*v)dx=int-2e^(-2x^3)x^2dx`

`e^(-2x^3)*v=-2inte^(-2x^3)*x^2dx`

Let `t=x^3`

`dt=3x^2dx`

`e^(-2x^3)*v=-2inte^(-2t)*dt/3`

`=-2/3(e^(-2t)/(-2))+C`

`=e^(-2t)/3+C`

Substitute back `t=x^3`

`e^(-2x^3)*v=1/3e^(-2x^3)+C`

Substitute back `v=y^(-2)`

`e^(-2x^3)*y^(-2)=1/3e^(-2x^3)+C`

`y^-2=1/3+C/e^(-2x^3)`

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

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

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