Hi Drongoski
How did you get the first line (without long division)?
What I have done is
equivalent to long division. By inspection, I fiddled with the terms of the quartic polynomial like this: the 1st 3 terms x^4 + px^3 + qx^2 = x^2 (x^2 + px + q) = (x^2 + 2)(x^2 + px +q) - 2x^2 - 2px - 2q
Therefore Q(x) = the last expression - 5x + 1 = (x^2+2)(x^2+px+q) - 2x^2 - (2p+5)x - 2q + 1 = (x^2 +2)(x^2+px+q) -(x^2+2)(2) - (2p+5)x - 2q + 5
= (x^2+2)(x^2+px+q-2) - (2p+5)x - 2q + 5
Rather messy. You have to be very manipulative!