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

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

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.0243267 (sec), leaf count = 52

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

Maple
cpu = 0.016 (sec), leaf count = 30

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

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

Mathematica raw output

{{y[x] -> (Sqrt[1 + x]*(Sqrt[1 - x^2] + 2*ArcSin[Sqrt[1 + x]/Sqrt[2]] + C[1]))/S
qrt[1 - x]}}

Maple raw input

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

Maple raw output

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