26.5.19 problem 24

Internal problem ID [4293]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, End of chapter, page 61
Problem number : 24
Date solved : Tuesday, March 04, 2025 at 06:08:33 PM
CAS classification : [_exact]

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

Maple. Time used: 0.007 (sec). Leaf size: 28
ode:=(x*exp(y(x))+y(x)-x^2)*diff(y(x),x) = 2*x*y(x)-exp(y(x))-x; 
dsolve(ode,y(x), singsol=all);
 
\[ -x^{2} y \left (x \right )+x \,{\mathrm e}^{y \left (x \right )}+\frac {x^{2}}{2}+\frac {y \left (x \right )^{2}}{2}+c_{1} = 0 \]
Mathematica. Time used: 0.344 (sec). Leaf size: 35
ode=(x*Exp[y[x]]+y[x]-x^2)*D[y[x],x]==(2*x*y[x] -Exp[y[x]]-x); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x^2 (-y(x))+\frac {x^2}{2}+x e^{y(x)}+\frac {y(x)^2}{2}=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*y(x) + x + (-x**2 + x*exp(y(x)) + y(x))*Derivative(y(x), x) + exp(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out