Prove that $\sum_{k=0}^n a_k x^k = 0$ has at least $1$ real root if $\sum_{k=0}^n \frac{a_k}{k+1} = 0$

Knowing that $$ \frac{a_0}{1} + \frac{a_1}{2} + \frac{a_2}{3} +\cdots + \frac{a_n}{n+1} =0$$ Prove that $$ a_0 + a_1x + a_2x^2 + \cdots + a_nx^n = 0$$ has at least one real solution.

I suspect that it's proven with the intermediate value theorem. But can't find two numbers that satisfy it.


Hint : $$\int_0^1 a_0+a_1x+a_2x^2+\ldots a_nx^n= \frac{a_0}{1} + \frac{a_1}{2} + \frac{a_2}{3} +\cdots + \frac{a_n}{n+1}=\color{red}0$$

This integral vanishes, it means that the function was sometimes above the $x$-axis, and sometimes below. Since this function is continuous, it must cut $x$-axis at least once, I.e. must have at least one real solution.


Let $$g(x)=a_0x+a_1\frac{x^2}2+a_2\frac{x^3}3+\cdots+a_n \frac{x^{n+1}}{n+1}.$$ Apply Rolle's theorem to $g(x)$.