12.3.6 problem 7

Internal problem ID [1583]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. separable equations. Section 2.2 Page 52
Problem number : 7
Date solved : Saturday, March 29, 2025 at 11:00:33 PM
CAS classification : [_separable]

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

Maple. Time used: 0.004 (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.175 (sec). Leaf size: 30
ode=D[y[x],x]== x^2*(1+y[x]^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \tan \left (\frac {x^3}{3}+c_1\right ) \\ y(x)\to -i \\ y(x)\to i \\ \end{align*}
Sympy. Time used: 0.292 (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 )} \]