4.6.44 \(\left (1-x^2\right ) y'(x)+\cos (x)=2 x y(x)\)

ODE
\[ \left (1-x^2\right ) y'(x)+\cos (x)=2 x y(x) \] ODE Classification

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.0115811 (sec), leaf count = 18

\[\left \{\left \{y(x)\to \frac {c_1+\sin (x)}{x^2-1}\right \}\right \}\]

Maple
cpu = 0.009 (sec), leaf count = 16

\[ \left \{ y \left ( x \right ) ={\frac {\sin \left ( x \right ) +{\it \_C1}}{{x}^{2}-1}} \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> (C[1] + Sin[x])/(-1 + x^2)}}

Maple raw input

dsolve((-x^2+1)*diff(y(x),x)+cos(x) = 2*x*y(x), y(x),'implicit')

Maple raw output

y(x) = (sin(x)+_C1)/(x^2-1)