41.1.11 problem 11

Internal problem ID [8678]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.1 Separable equations problems. page 7
Problem number : 11
Date solved : Tuesday, September 30, 2025 at 05:40:51 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }-x y^{2}&=2 x y \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 19
ode:=diff(y(x),x)-x*y(x)^2 = 2*x*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {2}{-1+2 \,{\mathrm e}^{-x^{2}} c_1} \]
Mathematica. Time used: 0.13 (sec). Leaf size: 42
ode=D[y[x],x]-2*x*y[x]^2==2*x*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{K[1] (K[1]+1)}dK[1]\&\right ]\left [x^2+c_1\right ]\\ y(x)&\to -1\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.235 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x)**2 - 2*x*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {2 e^{2 C_{1} + x^{2}}}{1 - e^{2 C_{1} + x^{2}}} \]