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!

  • $\begingroup$ Use mathematica DSolve method: DSolve[y'[x] == -2 xy[x] + Ey[x]^2, y[x], x] $\endgroup$ – William Sep 24 '18 at 16:53

$$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)}}$$

  • 1
    $\begingroup$ Thanks Isham for your answer. So, using the error function i obtain $ y=\frac{1}{e^{x^{2}}(c-e\frac{\sqrt{\pi }}{2}erf(x)))} $. However, my question was: how can i use definite integrals to solve the integral? WolframAlpha says that the solution is $ y(x)=\frac{2}{e^{c+x^{2}}+e}$, so i think it's possible to solve it without error function. $\endgroup$ – Marco Pittella Sep 24 '18 at 17:31
  • $\begingroup$ @MarcoPittella Are you sure for WA answer ? I don't think you can solve this differential equation without error function $\endgroup$ – Isham Sep 24 '18 at 17:36
  • $\begingroup$ y're welcome @MarcoPittella $\endgroup$ – Isham Sep 24 '18 at 17:47
  • $\begingroup$ You're right: i've added an $x$ to the text. Thanks again! $\endgroup$ – Marco Pittella Sep 24 '18 at 17:47
  • $\begingroup$ Do you think it's possible to solve it with definit integrals? $\endgroup$ – Marco Pittella Sep 24 '18 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.