Solving initial value problem Im solving initial value problem
$$ \frac {dy}{dx} + xy = xy^2; y(0)=3$$
After applying Bernoulli's equation method i obtained
$$ \frac {dv}{dx} -xv = -x$$
So, $$ p(x) = -x, q(x) = -x $$
For finding integrating factor 
$$u(x)=e^ {-\int xdx}=e^ {-\frac {x^2}{2}}$$
$$ y= \frac {\int u(x)q(x)dx+C}{u(x)}={\int u(x)q(x)dx}$$
So,
$$-\int xe^ {-\frac {x^2}{2}}dx $$
Please help further or guide me if i did something wrong.

Why don't you try separation of variables? This leads to a closed form solution that exists for all $x < \sqrt{2 \log \frac{3}{2}}$.
