# Solving bernoulli differential equation leads to imaginary error function?

Hello there once again,

this one bothers me:

$$y'+\Big(x-\frac{1}{x}\Big)y + (xe-x^2)\cdot\frac{1}{y}=0.$$

1.) This looks like a bernoulli differential equation to me with $\alpha = -1$. Transformation with $z = y^{1-\alpha} = y^2$ leads me to

$$z' + 2\Big(x-\frac{1}{x}\Big)\cdot z = -2(xe-x^2).$$

2.) Trying to solve this inhomogene linear differential equation, I used the formular and got this:

$$y(x) = e^{- \int_{x_0}^{x} 2t - \frac{2}{t}\ dt} \cdot \Bigg[ \int (-2xe+2x^2)\cdot e^{\int_{x_0}^{x} 2t-\frac{2}{t}\ dt} dx + C\Bigg].$$

3.) For now please just take a look at the integral at the inside of the brackets:

$$\int (-2xe+2x^2)\cdot e^{\int_{x_0}^{x} 2t-\frac{2}{t}} dt \\ = \int (-2xe+2x^2)\cdot (-x^2\cdot e^{x^2})\ dx \\ = \int 2x^3\cdot e^{x^2+1}\ dx - \int 2x^4e^{x^2}\ dx.$$

The first integral can be done, but by trying to solve the last one, I always fail.

Do you have any hints/tips, maybe I should not use the "bernoulli way" in first place, or..?

• As $$\int 2x e^{x^2}dx=e^{x^2}$$on the last line$$\int 3x^2e^{x^2} dx$$ – neonpokharkar Nov 14 '17 at 6:58