23.1.27 problem 2(q)

Internal problem ID [4117]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 2. First order equations. Exercises at page 14
Problem number : 2(q)
Date solved : Sunday, March 30, 2025 at 02:40:13 AM
CAS classification : [_exact, _rational]

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

With initial conditions

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

Maple. Time used: 0.231 (sec). Leaf size: 56
ode:=(x+y(x)^2)*diff(y(x),x)+y(x)-x^2 = 0; 
ic:=y(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {\left (12+4 x^{3}+4 \sqrt {x^{6}+10 x^{3}+9}\right )^{{2}/{3}}-4 x}{2 \left (12+4 x^{3}+4 \sqrt {x^{6}+10 x^{3}+9}\right )^{{1}/{3}}} \]
Mathematica. Time used: 3.974 (sec). Leaf size: 66
ode=(x+y[x]^2)*D[y[x],x]+(y[x]-x^2)==0; 
ic=y[1]==1; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {\sqrt [3]{x^3+\sqrt {x^6+10 x^3+9}+3}}{\sqrt [3]{2}}-\frac {\sqrt [3]{2} x}{\sqrt [3]{x^3+\sqrt {x^6+10 x^3+9}+3}} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + (x + y(x)**2)*Derivative(y(x), x) + y(x),0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out