A cubic polynomial gives remainders $(13x-2)$ and $(-1-7x)$ when divide by $x^2-x-3$ and $x^2-2x+5$ respectively. Find the polynomial.
I have written this as:
$P(x)=(x^2-x-3)Q(x)+(13x-2)$
$P(x)=(x^2-2x+5)G(x)+(-1-7x)$
and
$P(x)=ax^3+bx^2+cx+d$
The first method I thought about is factoring $(x^2-x-3)$ and $(x^2-2x+5)$ so that I could find roots and thereby $P(root)$ would equal the reminder for the given value of root. As the two quadratic equations would give four roots i.e. four values I can substitute, I would be able to calculate all the four constant $a$, $b$, $c$ and $d$. However, the first polynomial has very ugly roots and the second one has no real roots so I guess I should find another way. What do you suggest?
Since your $P(x)$ is cubic, $Q(x)$ and $G(x)$ are linear. So $$(x^2 - x - 3) (q_1 x + q_0) + (13 x - 2) = (x^2 - 2 x + 5)(g_1 x + g_0) + (-1 - 7 x)$$ Expanding and equating coefficients of like powers, you get four equations in the four unknowns $q_0, q_1, g_0, g_1$.
Alternatively, find the remainder (in terms of $q_1$ and $q_0$) on dividing $(x^2-x-3)(q_1 x + q_0) + 13x-2$ by $x^2-2x+5$, set this equal to $-1-7x$, and solve two equations for $q_0$ and $q_1$.