4.6.22 problem 22

Internal problem ID [1239]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Miscellaneous problems, end of chapter 2. Page 133
Problem number : 22
Date solved : Tuesday, September 30, 2025 at 04:31:14 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\frac {x^{2}-1}{1+y^{2}} \end{align*}

With initial conditions

\begin{align*} y \left (-1\right )&=1 \\ \end{align*}
Maple. Time used: 0.181 (sec). Leaf size: 86
ode:=diff(y(x),x) = (x^2-1)/(1+y(x)^2); 
ic:=[y(-1) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {\left (8+4 x^{3}-12 x +4 \sqrt {x^{6}-6 x^{4}+4 x^{3}+9 x^{2}-12 x +8}\right )^{{2}/{3}}-4}{2 \left (8+4 x^{3}-12 x +4 \sqrt {x^{6}-6 x^{4}+4 x^{3}+9 x^{2}-12 x +8}\right )^{{1}/{3}}} \]
Mathematica. Time used: 2.174 (sec). Leaf size: 97
ode=D[y[x],x]== (x^2-1)/(1+y[x]^2); 
ic=y[-1]==1; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\sqrt [3]{2} \left (x^3+\sqrt {x^6-6 x^4+4 x^3+9 x^2-12 x+8}-3 x+2\right )^{2/3}-2}{2^{2/3} \sqrt [3]{x^3+\sqrt {x^6-6 x^4+4 x^3+9 x^2-12 x+8}-3 x+2}} \end{align*}
Sympy. Time used: 107.121 (sec). Leaf size: 94
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 - x**2)/(y(x)**2 + 1) + Derivative(y(x), x),0) 
ics = {y(-1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \sqrt [3]{2} \left (- \frac {\sqrt [3]{2} \sqrt [3]{- x^{3} + 3 x + \sqrt {x^{6} - 6 x^{4} + 4 x^{3} + 9 x^{2} - 12 x + 8} - 2}}{2} + \frac {1}{\sqrt [3]{- x^{3} + 3 x + \sqrt {x^{6} - 6 x^{4} + 4 x^{3} + 9 x^{2} - 12 x + 8} - 2}}\right ) \]