ODE No. 1229

\[ \left (x^2+1\right ) y''(x)+4 x y'(x)+2 y(x)+2 x-2 \cos (x)=0 \] Mathematica : cpu = 0.0284726 (sec), leaf count = 48

DSolve[2*x - 2*Cos[x] + 2*y[x] + 4*x*Derivative[1][y][x] + (1 + x^2)*Derivative[2][y][x] == 0,y[x],x]
 

\[\left \{\left \{y(x)\to \frac {c_1}{x^2+1}+\frac {c_2 x}{x^2+1}+\frac {-x^3-6 \cos (x)}{3 \left (x^2+1\right )}\right \}\right \}\] Maple : cpu = 0.016 (sec), leaf count = 31

dsolve((x^2+1)*diff(diff(y(x),x),x)+4*x*diff(y(x),x)+2*y(x)-2*cos(x)+2*x=0,y(x))
 

\[y \left (x \right ) = \frac {-x^{3}+3 c_{1} x -6 \cos \left (x \right )+3 c_{2}}{3 x^{2}+3}\]