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.178198 (sec), leaf count = 18

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

Maple
cpu = 0.01 (sec), leaf count = 19

\[\left [y \left (x \right ) = \frac {\sin \left (x \right )+\textit {\_C1}}{\left (x -1\right ) \left (1+x \right )}\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))

Maple raw output

[y(x) = (sin(x)+_C1)/(x-1)/(1+x)]