First order non-linear ODE with error function

662 Views Asked by At

I have to solve $ y'(x)=-2xy(x)+ey^2(x) $.

Using $ z=y^{-1}$ and $-z^{'}=\frac{y^{'}}{y^{2}}$ i arrive to prove that $ z^{'}=-2xz+e $, but when i apply the variation of constants method i obtain $ z_0(x)=Ce^{A(x)}, A(x)=x^2\Rightarrow Ce^{x^2}$ and, unfortunately:

$ z_p(x)=e^{A(x)}B(x), B(x)=\int -e\cdot e^{-A(x)}=\int-e \cdot e^{-x^2}=\int-e^{1-x^2}$

How must i behave now? How can i arrive to the solution with Riemann's integral? How to use definite integrals to solve the EDO?

Thanks for any help!

1

There are 1 best solutions below

6
On

$$y'(x)=-2xy(x)+ey^2(x)$$ Substitute $z=\frac 1 y$ $$-z'=-2xz+e \implies z'-2xz=-e$$ Use integrating factor $\mu=e^{-x^2}$ $$(ze^{-x^2})'=-ee^{-x^2}$$ Integrate $$ze^{-x^2}=-e\int e^{-x^2}dx+C$$ $$ze^{-x^2}=-e \frac {\sqrt {\pi}}2\text{erf(x)}+C$$ $$\frac y {e^{-x^2}}=\frac 1 {-e\frac {\sqrt {\pi}}2\text{erf(x)}+C}$$ $$ y =\frac {2e^{-(x^2+1)}} {C- {\sqrt {\pi}}\text{erf(x)}}$$