12.7.15 problem 15

Internal problem ID [1725]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Integrating factors. Section 2.6 Page 91
Problem number : 15
Date solved : Saturday, March 29, 2025 at 11:37:29 PM
CAS classification : [_rational]

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

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