15.5.21 problem 25

Internal problem ID [2957]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 9, page 38
Problem number : 25
Date solved : Sunday, March 30, 2025 at 01:01:58 AM
CAS classification : [[_homogeneous, `class G`], _rational]

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

With initial conditions

\begin{align*} y \left (2\right )&=2 \end{align*}

Maple. Time used: 0.568 (sec). Leaf size: 40
ode:=y(x)*(x+y(x)^2)+x*(x-y(x)^2)*diff(y(x),x) = 0; 
ic:=y(2) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \operatorname {RootOf}\left (-3 \ln \left (x \right )+4 \ln \left (2\right )-4 \ln \left (5\right )-2 \ln \left (\frac {\textit {\_Z}}{\sqrt {x}}\right )+4 \ln \left (\frac {\textit {\_Z}^{2}+3 x}{x}\right )\right ) \]
Mathematica
ode=y[x]*(x+y[x]^2)+x*(x-y[x]^2)*D[y[x],x]==0; 
ic={y[2]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

{}

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(x - y(x)**2)*Derivative(y(x), x) + (x + y(x)**2)*y(x),0) 
ics = {y(2): 2} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out