# Why is my approach to solving $\frac{dy}{dx}=1+xy$ not working?

I am trying to solve the differential equation $$\frac{dy}{dx}=1+xy$$

I used the substitution $$y=v+x$$ so we get $$\frac{dy}{dx}=\frac{dv}{dx}+1$$ So the equations turns out to $$\frac{dv}{dx}+1=1+x(v+x)$$ $$\implies$$ $$\frac{dv}{dx}+(-x)v=x^2$$ whose Integrating factor is $$e^{\frac{-x^2}{2}}$$

So the solution is $$v \times e^{\frac{-x^2}{2}}=\int x^2e^{\frac{-x^2}{2}}dx+C$$

But i am unable to integrate the above integrand in terms of elementary functions.

• The integral does not have an analytical solution, do you know what an error function is? Commented Jun 10, 2022 at 11:49
• Yes i know thank you i got it now Commented Jun 10, 2022 at 11:51
• Well the first equation itself was in the linear form where you could use the integrating factor method. Commented Jun 10, 2022 at 13:12
• @AmanKushwaha ya i know, but just tried in a different way Commented Jun 10, 2022 at 13:32

You can integrate the integrand if integrating over $$]-\infty, \infty[$$.
This is a classic Gaussian integral, which solves to $$\int_{-\infty}^{\infty}x^2 e^{-x^2/2}dx = 2\int_{0}^{\infty}x^2 e^{-x^2/2}dx = \sqrt{2 \pi}.$$