# prove a polynomial has at least 2n-1 distinct real roots

If $$P(x)$$ is a real polynomial has $$n$$ distinct real roots in $$(1,+\infty)$$. Set: $$Q(x)=(x^2+1)P(x)P'(x)+x(P^2(x)+P'^2(x))$$ How to prove $$Q(x)=0$$ has at least $$2n-1$$ distinct real roots?

I think the idea is finding closed intervals that the boundary points have different signs. I think the only special points are the roots of $$P(x)$$ or $$P'(x)$$. But if $$a$$ is such a point, we have $$Q(a)>0$$. So i'm not sure this can work out... Can anyone show me some hints? Thanks!

Dividing by $$P(x)^2$$, we get that assuming $$P(x)\neq 0$$, $$Q(x)=0$$ is equivalent to $$xR^2+(x^2+1)R+x=0$$ where $$R=P'(x)/P(x)$$. Considering this as a quadratic in $$R$$, the roots are $$R=-x$$ and $$R=-1/x$$. So, $$Q(x)=0$$ iff $$P'(x)=-xP(x)\text{ or }P(x)=-xP'(x)$$ (note that these conditions also include the possibility that $$P(x)=0$$, in which case we easily see that $$Q(x)=0$$ is equivalent to $$P'(x)=0$$ or $$x=0$$). Note that it is impossible for both $$P'(x)=-xP(x)$$ and $$P(x)=-xP'(x)$$ to hold at once for $$x>1$$ if $$P(x)\neq 0$$, since together they imply $$x=1/x$$ (this is where the assumption that the roots of $$P$$ are greater than $$1$$ will come in).
Now you can try and use this characterization to find roots of $$Q$$ between the roots of $$P$$, by considering how the signs of $$P'(x)+xP(x)$$ and $$P(x)+xP'(x)$$ change. The details are hidden below.
Consider a pair of consecutive roots $$a of $$P$$ in $$(1,\infty)$$. Let me first assume that $$a$$ and $$b$$ are both simple roots. Then $$P(a)=P(b)=0$$ but $$P'(a)$$ and $$P'(b)$$ are nonzero with opposite sign. It follows that there must be some $$c\in(a,b)$$ such that $$P'(c)=-cP(c)$$. Note that $$P(c)\neq 0$$ since $$a$$ and $$b$$ are consecutive roots. Similarly, there must exist $$d\in (a,b)$$ such that $$P(d)=-dP'(d)$$ and $$P(d)\neq 0$$.
If $$a$$ or $$b$$ is a multiple root of $$P$$, the story is more complicated but the conclusion is the same. Let us assume without loss of generality that $$P$$ is positive on $$(a,b)$$. If $$k$$ is the multiplicity of the zero of $$P$$ at $$b$$, this means $$P^{(j)}(b)=0$$ for $$j and $$P^{(k)}(b)$$ has the same sign as $$(-1)^k$$. Now observe that the first nonzero derivative of $$P(x)+xP'(x)$$ at $$b$$ is the $$(k-1)$$st derivative which is $$bP^{(k)}(b)$$ (all the other terms involve lower derivatives of $$P$$ at $$b$$ which all vanish). Thus for $$x$$ slightly less than $$b$$, $$P(x)+xP'(x)$$ has the same sign as $$(-1)^{k-1}bP^{(k)}(b)$$ which is negative. But we can do a similar analysis at $$a$$ to conclude that $$P(x)+xP'(x)$$ is positive for $$x$$ slightly greater than $$a$$. Thus $$P(x)+xP'(x)$$ must have a root in $$(a,b)$$. We can again do a similar analysis for $$P'(x)+xP(x)$$ to show that it also has a root in $$(a,b)$$.
So, the upshot is that $$Q$$ must have at least two distinct roots between each pair of roots of $$P$$ in $$(1,\infty)$$. This gives $$2n-2$$ distinct roots of $$Q$$. To find one more, let $$a$$ be the least root of $$P$$ in $$(1,\infty)$$ (if $$n=0$$ there is nothing to prove). Note that $$Q(a)\geq 0$$. Note also that if the leading term of $$P$$ is $$bx^k$$, then the leading term of $$Q$$ is $$x^2\cdot bx^k\cdot kbx^{k-1}+x\cdot b^2x^{2k}=(k+1)b^2x^{2k+1}.$$ In particular, $$Q$$ has odd degree and positive leading coefficient. Thus $$Q(x)\to-\infty$$ as $$x\to-\infty$$. It follows that $$Q$$ must have a root which is less than or equal to $$a$$. Thus in total we find that $$Q$$ has at least $$2n-1$$ real roots, as desired.