number of real roots of $p(x) +p'(x)$ This is problem of an exam I was unable to answer.
If $p(x)$ is a polynomial of degree 2019, all roots are real. How many real roots does $p(x)+p'(x)$ have?
I know that if the polynomial $p(x)$ has $n$ real roots, then $p'(x)$ has $n-1$ real roots, but I am clueless about how to proceed with $p(x)+p'(x)$
 A: For simplicity, first assume that the roots of $p$ are additionally distinct. 
Let $x_1<x_2<\ldots <x_{2019}$ be the roots of $p$.
Then the roots $\xi_i$ of  $p'$ are between these, i.e., $x_1<\xi_1<x_2<\xi_2<\ldots$.
Now $p(x_i)+p'(x_i)=p'(x_i)$ changes sign with every step $i$ makes because $p'$ changes sign precisely at the $\xi_i$.
We conclude that $p+p'$ has a root between $x_i$ and $x_{i+1}$ for all $i$. This gives us $2018$ distinct real roots of a degree $2019$ polynomial.
As non-real roots come in pairs, we conclude that all $2019$ roots of $p+p'$ must be real. (In case of interest, the additional root is before $x_1$ or after $x_{2019}$, depending on which end of $p$ tends to $-\infty$).
What if some roots of $p$ are multiple? You can add a suitable lower-degree perturbation to $p$ to separates these and conclude as above. As the perturbation can be made arbitrarily small (in our region of interest), the conclusion that all roots of $p+p'$ are real also holds in the limiting case.
A: Suppose $\deg P=d$ and $P$ has $d_0$ distinct roots $x_1,\ldots,x_{d_0}$ with respective multiplicity $n_i\geq 2$. Let $\Sigma = \sum_{i=1}^{d_0} n_i$ and let $x_1',\ldots,x_{d-\Sigma}'$ denote the simple roots of $P$, so that
$$P(X)=\prod_{i=1}^{d_0}(X-x_i)^{n_i}\prod_{i=1}^{d-\Sigma}(X-x_i')$$
Then $P(X)+P'(X)= \prod_{i=1}^{d_0}(X-x_i)^{n_i-1}Q(X)$ for some polynomial $Q$ with $\deg Q = d-(\Sigma -d_0)=d+d_0-\Sigma$.
Since $(e^xP(x))'=e^x(P(x)+P'(x))$, Rolle's theorem applied at the $d_0+d-\Sigma$ distinct roots of $P$ yields $d_0+d-\Sigma-1$ new distinct roots of $P+P'$ (they are roots of $Q$). But since $\deg Q =d+d_0-\Sigma$, this implies that $Q$ only has real roots (one of them can be repeated once).
So $P+P'$ only has real roots. Besides, it has exactly $2d_0+d-\Sigma-1$ or $2d_0+d-\Sigma$ distinct roots (while $P$ had $d_0+d-\Sigma$ distinct roots).
