polynomial remainder problem If a polynomial $f(x)$, of degree at least four, is such that
$$f(x) \equiv 3x+1 \mod (x^{2}-1)$$
and
$$f(x) \equiv 2x-3\mod (x^{2}+1),$$
find the remainder $g(x)$ such that
$$f(x) \equiv g(x) \mod (x^{2}-1)(x^{2}+1).$$

The main steps are:


*

*We note that $\frac{1}{2} (x^2 + 1) - \frac{1}{2} (x^2 - 1)  = 1$. 

*Thus the inverse of $x^2 + 1  \mod x^2 -1$ is $1/2$ and the inverse of  $x^2 - 1  \mod x^2 +1$ is $-1/2$. 

*Thus a solution is $(3x+ 1) \frac{x^2 + 1}{2} + (2x-3) (-\frac{x^2 - 1}{2}) $. 
The first step can be done in a more systematic way using the extended Euclidean algorithm. The general method is the Chinese Remainder Theorem for polynomials.  
