23.1.318 problem 306

Internal problem ID [4925]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 306
Date solved : Tuesday, September 30, 2025 at 09:00:26 AM
CAS classification : [_linear]

\begin{align*} \left (x^{2}+1\right ) y^{\prime }&=1+x^{2}-y \,\operatorname {arccot}\left (x \right ) \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 23
ode:=(x^2+1)*diff(y(x),x) = 1+x^2-y(x)*arccot(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\int {\mathrm e}^{-\frac {\operatorname {arccot}\left (x \right )^{2}}{2}}d x +c_1 \right ) {\mathrm e}^{\frac {\operatorname {arccot}\left (x \right )^{2}}{2}} \]
Mathematica. Time used: 2.13 (sec). Leaf size: 37
ode=(1+x^2)*D[y[x],x]==(1+x^2)-y[x]*ArcCot[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{\frac {1}{2} \cot ^{-1}(x)^2} \left (\int _1^xe^{-\frac {1}{2} \cot ^{-1}(K[1])^2}dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 20.815 (sec). Leaf size: 58
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + (x**2 + 1)*Derivative(y(x), x) + y(x)*acot(x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \int \frac {e^{- \frac {\operatorname {acot}^{2}{\left (x \right )}}{2}}}{x^{2} + 1}\, dx - \int \frac {x^{2} e^{- \frac {\operatorname {acot}^{2}{\left (x \right )}}{2}}}{x^{2} + 1}\, dx + \int \frac {y{\left (x \right )} e^{- \frac {\operatorname {acot}^{2}{\left (x \right )}}{2}} \operatorname {acot}{\left (x \right )}}{x^{2} + 1}\, dx = C_{1} \]