Showing $f^{(n-1)}(\xi) = 0$ for some $\xi$ Let $f$ be an $n$ times differentiable function on the interval $A$. If $x_1 < x_2 < \cdots < x_p$ are points on $A$ and $n_i, 1 \leq i \leq p,$ are natural numbers such that $n_1 + n_2 + \cdots + n_p = n$ and $f^{(k)}(x_i)=0$ for $0 \leq k \leq n_i -1,$ then there exists a point $\xi$ in the closed interval $[x_1,x_p]$ at which $f^{(n-1)}(\xi) = 0$.
I have no real idea how to approach this question and would like some advice.
I've tested the theorem on some polynomials and it has worked. For example, the polynomial $(x-3)^2(x-6)^3$ obviously fulfils the requirements with $n_i=2,3$ for $3,6$, respectively. The fourth derivative has a root at $4.8$. These are quite obvious examples of course. 
Edit: I should stress that this cannot seemingly be done using Rolle's theorem as it only implies that $f^{(p-1)}(\xi) = 0$ for some $\xi$, and not for $n-1$. 

Hint: Work by induction on $n$, and apply Rolle's theorem between consecutive $x_i$. Notice that $p$ and the $x_i$ will change during the inductive step! You want to keep the $x_i$ such that $n_i \geq 2$, and add the ones you found with Rolle's theorem.

Okay, here's an example. Suppose that $$f(0) = f'(0) = f''(0) = f(1) = f'(1) = f(2) = 0$$ So here $p = 3$, $x_1 = 0$, $x_2 = 1$, $x_3 = 2$, $n_1 = 3$, $n_2 = 2$ and $n_3 = 1$; $n = 3 + 2 + 1 = 6$. By Rolle's theorem, there exist $0 < a < 1 < b < 2$ such that $f'(a) = f'(b) = 0$.
So the new values will be: $x_1' = 0 < x_2' = a < x_3' = 1 < x_4' = b$. We remove $x_3 = 1$ from the list, because we only had $n_3 = 2$. The new orders are $n_1' = 2, n_2' = n_3' = n_4' = 1$. In this situation, you can apply the induction hypothesis to $f'$; all the hypotheses are satisfied, and $n' = n_1' + \dots + n_4' = 5$.
