Two polynomials with the same root I have come across this problem many times. And quite often this has no proof attached with it. Is this an elementary concept I am missing and is there a way this can be visualised in Desmos?
$P(x) = x^4 + ax^3 + bx^2 + cx + d $
$Q(x) = x^2 + px + q$
both have real coefficients.
If r and s are two roots of the these equations. Why does my book say that $P(x) - Q(x)$ also has roots r and s.
Moreover, the book also says that since P(x) - Q(x) is non-negative, r & s are double roots i.e.
$P(x) - Q(x) = (x-s)^2(x-r)^2$
Just out of curiosity, is there a way to find out P(x) with this information?
 A: Just to tell you
If some $P(x)$ has roots $ \alpha,\beta,\gamma,\delta$
And some $G(x)$ has roots $\alpha,\beta,\theta,\phi$
Then for some $k_1,k_2$ $ \epsilon$ $ R$ such that $k_1.k_2\neq0$
The roots of $k_1.P(x)\pm k_2.G(x)$ are $\alpha,\beta$
Your second claim appears to have some ambiguity as indicated in comments
As an reply to your comment, we have
$P(x)=a_1(x-\alpha)(x-\beta)(x-\alpha)(x-\beta)$
$G(x)=a_2(x-\alpha)(x-\beta)(x-\theta)(x-\phi)$
For a simple case consider $k_1=k_2=1$, hence
$P(x)\pm G(x)=(x-\alpha)(x-\beta)(a_1(x-\gamma)(x-\delta)-a_2(x-\theta)(x-\phi))$
Clearly Two roots( from first two brackets) will be $\alpha, \beta$ and the other two (from third bracket) will be different and will never be equal to either of $\gamma,\delta,\theta,\phi$

A: If r and s are two roots of the these equations.
That means P(s) = P(r) = 0 and Q(s) = Q(r) = 0

*

*Why does my book say that P(x)−Q(x) also has roots r and s.

Let's say K(x) = P(x) - Q(x)
K(s) = P(s) - Q(s) = 0
K(r) = P(r) - Q(r) = 0
So, r and s are roots of K(x)


*is there a way to find out P(x) with this information?

P(x) - Q(x) = (x-s)²(x-r)² = (x²-2xs+s²)(x²-2xr+r²)
= x⁴ - 2x³r + x²r² - 2x³s + 4x²rs -2xsr² + x²s²  -2xrs² + r²s²
P(x) =  x⁴ - 2x³r + x²r² - 2x³s + 4x²rs -2xsr² + x²s²  -2xrs² + r²s² - Q(x)
P(x) =   x⁴ - 2x³r + x²r² - 2x³s + 4x²rs -2xsr² + x²s²  -2xrs² + r²s² - x² - px -q
= x⁴ + x³(-2r-2s) + x²(4rs + r² + s² -1) +x(-2sr² -2rs² - p) + r²s² - q
a = -2r-2s
b=4rs + r² + s² - 1
c = -2sr² - 2rs² -p
d = r²s² - q
you can't find p(x) without the value of p,q,r,s being told
