85.34.3 problem 3(a)

Internal problem ID [22711]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. B Exercises at page 67
Problem number : 3(a)
Date solved : Thursday, October 02, 2025 at 09:11:36 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.038 (sec). Leaf size: 11
ode:=(x^2+1)*diff(y(x),x)+1+y(x)^2 = 0; 
ic:=[y(0) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \cot \left (\arctan \left (x \right )+\frac {\pi }{4}\right ) \]
Mathematica
ode=(1+x^2)*D[y[x],x]+(1+y(x)^2)==0; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy. Time used: 0.177 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x**2 + 1)*Derivative(y(x), x) + y(x)**2 + 1,0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \cot {\left (\operatorname {atan}{\left (x \right )} + \frac {\pi }{4} \right )} \]