2.1177   ODE No. 1177

\[ x^2 y''(x)+\left (x^2+2\right ) y'(x)+x^2 (-\sec (x))-2 x y'(x)=0 \] Mathematica : cpu = 0.46791 (sec), leaf count = 141

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

\[\left \{\left \{y(x)\to \int _1^xe^{\frac {2}{K[1]}-K[1]} K[1]^2dK[1] \int _1^x\frac {e^{K[3]-\frac {2}{K[3]}} \sec (K[3])}{K[3]^2}dK[3]+\int _1^x-\frac {e^{K[2]-\frac {2}{K[2]}} \sec (K[2]) \int _1^{K[2]}e^{\frac {2}{K[1]}-K[1]} K[1]^2dK[1]}{K[2]^2}dK[2]+c_2 \int _1^xe^{\frac {2}{K[1]}-K[1]} K[1]^2dK[1]+c_1\right \}\right \}\] Maple : cpu = 0.358 (sec), leaf count = 30

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

\[y \left (x \right ) = \left (-\left (\int \frac {\tan \left (x \right )}{x}d x \right ) \cos \left (x \right )+\cos \left (x \right ) c_{1}+\sin \left (x \right ) \left (c_{2}+\ln \left (x \right )\right )\right ) x\]