Prove that if $k^2+pk+q=0$ and $l^2-pl-q=0$ then between $k$ and $l$ there is a solution to $x^2-2px-2q=0$. Real number $k$ satisfies $x^2+px+q=0$ and $l$ satisfies $x^2-px-q=0$. Prove that between $k$ and $l$ there is a solution to the equation $x^2-2px-2q=0$.
I started the solution this way:
$$ k = \frac{-p\pm\sqrt{p^2-4q}}{2} $$
$$ l = \frac{p\pm\sqrt{p^2+4q}}{2} $$
$$ x = p\pm\sqrt{p^2+2q} $$
But I failed to compare these solutions. What should be done next?
 A: Let $k^2+pk+q=0$, $l^2-pl-q=0$ and $h(x)=x^2-2px-2q$.
Then
$$ h(k)=k^2-2pk-2q =-pk-q-2pk-2q=-3pk-3q=-3(pk+q)=3k^2 $$
and
$$ h(l)=l^2-2pl-2q=pl+q-2pl-2q=-pl-q=-l^2 $$
So we have $h(k)>0$ and $h(l)<0.$ So by IVT $h(x)=0$ has one root between $k$ and $l$.
A: HINT
Let $f_1 = x^2 + px + q$, $f_2 = x^2 -px-q$, $f = x^2-2px-2q$
$$f_1(-q/p) = \frac{q^2}{p^2} > 0 $$
$$f_2(-q/p) = \frac{q^2}{p^2} > 0$$
$$f(-q/p) = \frac{q^2}{p^2} > 0$$
Since all of these quadratics have positive leading coefficient, that means that all of them are upward facing
Now if you examine the given function in the neighbourhood of this point, can you make any useful observations?
A: The comparison argument you mentioned might run something like this.  As Dhanvi Sreenivasan notes, all three parabolas for the quadratic equations have a mutual intersection at $ \ x = -\frac{q}{p} \ \ . $  If we inspect a graph, the zeroes
$$ k  \ =  \ \frac{-p}{2} \ + \ \frac{\sqrt{p^2 \ - \ 4q}}{2} \ \ ,  \ \  l \ =  \ \frac{p}{2} \ - \ \frac{\sqrt{p^2 \ + \ 4q}}{2} \ \ ,  \ \ \text{and} \ \ r \ = \ p \ - \ \sqrt{p^2 \ + \ 2q} $$
appear to lie in the order $ \ k < r < l \ $ , so we will attempt to prove that $ \ r \ $ always lies in the interval $ \ [k \ , \ l] \ \ . $    The condition for the proposition to be meaningful is that for $ \ q > 0 \ \ , $ we must have $ \ p^2 > 4q \ \ , $ and for $ \ q < 0 \ \ , \ \ p^2 > -4q \ \ . $  This can be summarized as $ \ p^2 > 4·|q| \ \ ; $ however, since the situation of the parabolas is symmetrical about the $ \ y-$axis for these two cases, we only need to consider $ \ q > 0 \ \ . $  It is also clear that it will suffice to investigate $ \ p > 0 \ \ , $ as taking $ \ p < 0 \ $ produces a mirror-image arrangement of the geometrical situation.
The $ \ q = 0 \ $ case is not mentioned above, as it is "trivial": the zeroes cited become $ \ k =  l =  r = -\frac{q}{p} = 0 \ \ . $
For $ \ p^2 = 4q \ \ , $ we have $ \ k  \ =  \ \frac{-p}{2} \ , \ l \ =  \ \frac{p}{2} \ - \ \frac{\sqrt{8q}}{2} \ , \ $ and $ r \ = \ p \ - \ \sqrt{6q} \ \ . $  A test of the requisite inequalities yields
$$ \frac{-p}{2} \ < \ p \ - \ \sqrt{6q} \ \ [?] \ \ \Rightarrow \ \ \sqrt{6q} \ < \ \frac{3p}{2} \ \ \Rightarrow \ \ 6q \ < \ \frac{9p^2}{4} \  \ \Rightarrow \ \ \frac{24}{9}·q \ < \ p^2 \ = \ 4q \ \ [!] $$
and
$$ p \ - \ \sqrt{6q} \ < \ \frac{p}{2} \ - \ \frac{\sqrt{8q}}{2} \ \ [?] \ \ \Rightarrow \ \ \frac{p}{2} \ < \ \sqrt{6q} \ - \ \sqrt{2q} $$ $$ \Rightarrow \ \ p^2 \ = \ 4q \ = \ 16 · \frac14 · q $$ $$ < \ \ 4 · (\sqrt{6} \ - \ \sqrt{2})^2 · q \ = \ 4 · 2 · (\sqrt{3} \ - \ 1)^2 · q \ = \ 16 · (2 - \sqrt3) · q \ \ [!] \ \ . $$
Thus, $ \ r \ $ lies in $ \ [k \ , \ l] \ $ for this case.
In the general case, we will write $ \ p^2 = \alpha·q \ \Rightarrow \ q = \frac{p^2}{\alpha} \ \ , \ \ \alpha > 4 \ \ , $  making the zeroes under discussion
$$ k  \ =  \ \frac{-p}{2} \ + \ \frac{p·\sqrt{1 \ - \ \frac{4}{\alpha}}}{2} \ , \ l \ =  \ \frac{p}{2} \ - \ \frac{p·\sqrt{1 \ + \ \frac{4}{\alpha}}}{2} \ , \   r \ = \ p \ - \  p·\sqrt{1 \ + \ \frac{2}{\alpha}}  \ \ . $$
Again, checking the inequalities, we find
$$ \frac{p}{2} · \left( -1 \ + \ \sqrt{1 \ - \ \frac{4}{\alpha}} \right) \ < \ p · \left( 1 \ - \ \sqrt{1 \ + \ \frac{2}{\alpha}} \right) \ \ [?] $$
$$  \Rightarrow \ \ -1 \ + \ \sqrt{1 \ - \ \frac{4}{\alpha}} \ < \ 2 \ - \ 2 · \sqrt{1 \ + \ \frac{2}{\alpha}} \ \ \Rightarrow \ \ 2 · \sqrt{1 \ + \ \frac{2}{\alpha}} \ + \ \sqrt{1 \ - \ \frac{4}{\alpha}} \ < \ 3   $$
$$  \Rightarrow \ \ 4 \ + \ \frac{8}{\alpha} \ + \ 1 \ - \ \frac{4}{\alpha} \ + \ 4 · \sqrt{1 \ + \ \frac{2}{\alpha}} · \sqrt{1 \ - \ \frac{4}{\alpha}} \ < \ 9 $$ $$  \Rightarrow \ \ \frac{1}{\alpha} \ + \ \sqrt{1 \ + \ \frac{2}{\alpha}} · \sqrt{1 \ - \ \frac{4}{\alpha}} \ < \ 1  \ \ \Rightarrow \ \   \sqrt{1 \ + \ \frac{2}{\alpha}} · \sqrt{1 \ - \ \frac{4}{\alpha}} \ < \ 1 \ - \ \frac{1}{\alpha} $$
$$ \Rightarrow \  \   1 \ - \ \frac{2}{\alpha}  \ - \  \frac{8}{\alpha^2}  \ < \ 1 \ - \ \frac{2}{\alpha} \ + \ \frac{1}{\alpha^2} \ \ \Rightarrow \ \ - \frac{8}{\alpha^2}  \ < \  \frac{1}{\alpha^2}  $$
and
$$ p · \left( 1 \ - \ \sqrt{1 \ + \ \frac{2}{\alpha}} \right) \ < \ \frac{p}{2} · \left( 1 \ - \ \sqrt{1 \ + \ \frac{4}{\alpha}} \right) \ \ [?] $$
$$  \Rightarrow \ \ 2 \ - \ 2 · \sqrt{1 \ + \ \frac{2}{\alpha}} \ < \ 1 \ - \ \sqrt{1 \ + \ \frac{4}{\alpha}} \ \ \Rightarrow \ \ 1 \ < \ 2 · \sqrt{1 \ + \ \frac{2}{\alpha}} \ - \ \sqrt{1 \ + \ \frac{4}{\alpha}}   $$
$$  \Rightarrow \ \ 1 \ < \ 4 \ + \ \frac{8}{\alpha} \ + \ 1 \ + \ \frac{4}{\alpha} \ - \ 4 · \sqrt{1 \ + \ \frac{2}{\alpha}} · \sqrt{1 \ + \ \frac{4}{\alpha}}  $$
$$ \Rightarrow \ \ \sqrt{1 \ + \ \frac{2}{\alpha}} · \sqrt{1 \ + \ \frac{4}{\alpha}} \ < \ 1 \ + \ \frac{3}{\alpha}   $$
$$ \Rightarrow \  \   1 \ + \ \frac{6}{\alpha}  \ + \  \frac{8}{\alpha^2}  \ < \ 1 \ + \ \frac{6}{\alpha} \ + \ \frac{9}{\alpha^2} \ \ \Rightarrow \ \  \frac{8}{\alpha^2}  \ < \  \frac{9}{\alpha^2}  $$
So these inequalities are certainly true for $ \ \alpha > 4 \ \ . $
We may therefore conclude that $ \ k \ < \ r \ < \ l \ \ . $  [It can also be shown by corresponding arguments that this also applies for the other (more widely-separated) roots
$$  k'  \ =  \ \frac{-p}{2} \ - \ \frac{\sqrt{p^2 \ - \ 4q}}{2} \ < \ r \ < \ l' \ =  \ \frac{p}{2} \ + \ \frac{\sqrt{p^2 \ + \ 4q}}{2} \ \ . ] $$
