29.21.19 problem 595

Internal problem ID [5189]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 21
Problem number : 595
Date solved : Tuesday, March 04, 2025 at 08:25:16 PM
CAS classification : [_separable]

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

Maple. Time used: 0.026 (sec). Leaf size: 22
ode:=y(x)^2*diff(y(x),x) = x*(1+y(x)^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = -\tan \left (\operatorname {RootOf}\left (x^{2}+2 \tan \left (\textit {\_Z} \right )+2 c_{1} -2 \textit {\_Z} \right )\right ) \]
Mathematica. Time used: 0.255 (sec). Leaf size: 39
ode=y[x]^2*D[y[x],x]==x*(1+y[x]^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}[\text {$\#$1}-\arctan (\text {$\#$1})\&]\left [\frac {x^2}{2}+c_1\right ] \\ y(x)\to -i \\ y(x)\to i \\ \end{align*}
Sympy. Time used: 0.259 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*(y(x)**2 + 1) + y(x)**2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \frac {x^{2}}{2} + y{\left (x \right )} - \operatorname {atan}{\left (y{\left (x \right )} \right )} = C_{1} \]