42.1.1 problem Example 3.1

Internal problem ID [8788]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.2 FIRST ORDER ODE. Page 114
Problem number : Example 3.1
Date solved : Tuesday, September 30, 2025 at 05:51:08 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=x^{2} \left (y^{2}+1\right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 12
ode:=diff(y(x),x) = x^2*(1+y(x)^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (\frac {x^{3}}{3}+c_1 \right ) \]
Mathematica. Time used: 0.152 (sec). Leaf size: 47
ode=D[y[x],x]==x^2*(y[x]^2+1); 
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]^2+1}dK[1]\&\right ]\left [\frac {x^3}{3}+c_1\right ]\\ y(x)&\to -i\\ y(x)&\to i \end{align*}
Sympy. Time used: 0.182 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*(y(x)**2 + 1) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \tan {\left (C_{1} + \frac {x^{3}}{3} \right )} \]