75.6.12 problem 136

Internal problem ID [16689]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 6. Linear equations of the first order. The Bernoulli equation. Exercises page 54
Problem number : 136
Date solved : Thursday, March 13, 2025 at 08:31:49 AM
CAS classification : [[_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

\begin{align*} \left (\frac {{\mathrm e}^{-y^{2}}}{2}-x y\right ) y^{\prime }-1&=0 \end{align*}

Maple. Time used: 0.421 (sec). Leaf size: 34
ode:=(1/2*exp(-y(x)^2)-x*y(x))*diff(y(x),x)-1 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {\left (-\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, y}{2}\right )-4 c_{1} \right ) {\mathrm e}^{-\frac {y^{2}}{2}}}{4}+x = 0 \]
Mathematica. Time used: 0.228 (sec). Leaf size: 32
ode=(Exp[-(y[x]^2)/2]-x*y[x])*D[y[x],x]-1==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=e^{-\frac {1}{2} y(x)^2} y(x)+c_1 e^{-\frac {1}{2} y(x)^2},y(x)\right ] \]
Sympy. Time used: 7.108 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x*y(x) + exp(-y(x)**2)/2)*Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {\log {\left (\frac {C_{1}}{x^{2}} \right )}}, \ y{\left (x \right )} = \sqrt {\log {\left (\frac {C_{1}}{x^{2}} \right )}}\right ] \]