75.3.4 problem 4

Internal problem ID [19908]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter III. Ordinary differential equations of the first order and first degree. Exercises at page 33
Problem number : 4
Date solved : Thursday, October 02, 2025 at 05:00:48 PM
CAS classification : [_linear]

\begin{align*} \left (x^{2}+1\right ) y^{\prime }+x^{2} y&=x^{3}-x^{2} \arctan \left (x \right ) \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 55
ode:=(x^2+1)*diff(y(x),x)+x^2*y(x) = x^3-x^2*arctan(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{\arctan \left (x \right )-x} \left (\left (i \ln \left (-i x +1\right )-i \ln \left (i x +1\right )-2 x +2\right ) \left (-i x +1\right )^{-\frac {i}{2}} \left (i x +1\right )^{\frac {i}{2}} {\mathrm e}^{x}-2 c_1 \right )}{2} \]
Mathematica. Time used: 0.086 (sec). Leaf size: 23
ode=(1+x^2)*D[y[x],x]+x^2*y[x]==x^3-x^2*ArcTan[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\arctan (x)+c_1 e^{\arctan (x)-x}+x-1 \end{align*}
Sympy. Time used: 18.156 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 + x**2*y(x) + x**2*atan(x) + (x**2 + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x + \operatorname {atan}{\left (x \right )}} + x - \operatorname {atan}{\left (x \right )} - 1 \]