25.1.18 problem 6.5

Internal problem ID [6851]
Book : Differential Equations, By George Boole F.R.S. 1865
Section : Chapter 2
Problem number : 6.5
Date solved : Tuesday, September 30, 2025 at 03:55:48 PM
CAS classification : [_linear]

\begin{align*} \left (x^{2}+1\right ) y^{\prime }+y&=\arctan \left (x \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=(x^2+1)*diff(y(x),x)+y(x) = arctan(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arctan \left (x \right )-1+{\mathrm e}^{-\arctan \left (x \right )} c_1 \]
Mathematica. Time used: 0.115 (sec). Leaf size: 69
ode=(1+x^2)*D[y[x],x]+y[x]==ArcTan[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \exp \left (\int _1^x-\frac {1}{K[1]^2+1}dK[1]\right ) \left (\int _1^x\frac {\exp \left (-\int _1^{K[2]}-\frac {1}{K[1]^2+1}dK[1]\right ) \arctan (K[2])}{K[2]^2+1}dK[2]+c_1\right ) \end{align*}
Sympy. Time used: 0.737 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x**2 + 1)*Derivative(y(x), x) + y(x) - atan(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \operatorname {atan}{\left (x \right )}} + \operatorname {atan}{\left (x \right )} - 1 \]