Solution (source code)

= Solution

Factor the right side as $(x-1)^2(x-3)$. On $-1<x<1$, division by $x^2-1$ gives a <first-order linear differential equation> with <integrating factor>
$$
\mu(x)=\frac{1+x}{1-x},\qquad \frac{\mu'}\mu=-\frac2{x^2-1}.
$$
Multiplication makes the equation $(\mu y)'=3-x$, so $\mu y=3x-x^2/2+C$. At zero, $\mu(0)y(0)=1$, hence $C=1$. Simplifying gives
$$
\boxed{y(x)=\frac{1-x}{1+x}\left(1+3x-\frac{x^2}{2}\right)=\frac{x^2}{2}-4x+6-\frac5{x+1}.}
$$
Its derivative is
$$
y'(x)=x-4+\frac5{(x+1)^2},\qquad\boxed{y'(0)=1.}
$$
The derivation solves the initial-value problem on $(-1,1)$. The simplified expression also extends smoothly through $x=1$ and satisfies the original undivided equation there, giving a solution on all $x>-1$; its pole prevents continuation through $x=-1$.