# 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..?

\begin{align} \int 2x^4e^{x^2}\,\mathrm{d}x &= \int (x^3) (2xe^{x^2})\,\mathrm{d}x \\ &= x^3 \int (2x) (e^{x^2})\,\mathrm{d}x-\int 3x^2 \left(\int 2xe^{x^2}\,\mathrm{d}x\right)\,\mathrm{d}x \\ &= x^3e^{x^2}-\frac{3}{2}\int (x)(2xe^{x^2})\,\mathrm{d}x \end{align}

• 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
• I mean you haven't answered the question. See there's still an integral left to evaluate. – samjoe Nov 14 '17 at 12:56