Let us have five points at $x = -2,-1,0,1,2$ with ordinates equal to $y_i$, I want to derive the formula for $a_0$, such that the parabola $y = a_0 + a_1x + a_2x^2$ fits the points the best in ordinary least square sense.
$$(y_{-2}-a_0 +2a_1-4a_2)^2 + (y_{-1} - a_0 + a_1 -a_2)^2 + (y_{0} -a_0)^2 + (y_{1} -a_0 - a_1 - a_2)^2 + (y_{2} - a_0 - 2a_2 - 4a_2)^2 \to min \ \text{w.r.t. } a_0, a_1 \text{and } a_2.$$
I know the answer $a_0 = \frac{1}{35} [ -3 y_{-2} + 12 y_{-1} + 17 y_0 + 12 y_1 -3 y_2]$. It was given on a lecture and the proof was left as an exercise.
Background of the question is time series weighted moving average smoothing. We substitute every $y$ with $a_0$ to get a smoother time series.
However I don't understand how we can derive it not taking three derivatives, getting 3 linear equations and solving them. But looks like there is a simpler proof for $a_0$ particularly that I don't see. If we denote every summand being squared as $S_i$ then we get a system of linear equations.
$$ \begin{cases} S_{-2} + S_{-1} + S_0 + S_1 + S_2 = 0 \\ 2S_{-2}+S_{-1} - S_1 - 2S_2 = 0 \\ 4S_{-2}+S_{-1}+S_{1}+4S_2 = 0 \end{cases}$$
But is there a faster proof? The original slide is given below for reference

I don't know about faster, but I managed to simplify the task by exploiting a few symmetries. Very likely I am missing something major, for this is not really my cup of coffee.
We are looking for a weighted average, so it is clear that the solution must have the form $$ \hat{a}_0=L(y_{-2},\ldots,y_2)=\sum_{i=-2}^2q_iy_i, $$ where the constants $q_i$ are the weights. Clearly we must have $$\sum_{i=-2}^2q_i=1\tag{1}$$ for this to be an average.
So far so good. We have three unknowns, $q_0,q_1,q_2$ and two equations, $(1)$ and $(2)$. To solve for them we need something extra. Here I'm sad to say I had to brute force it. Consider a pulse input $(y_i)_{-2\le i\le 2}=(0,0,1,0,0)$. That is $y_0=1$ and the rest all zero. Again by symmetry, the best quadratic approximation has no linear term, so we test this against $y_i=a_0+a_2i^2$. The optimal $a_0$ will then be $L(0,0,1,0,0)=q_0$ allowing us to solve the problem.
The sum of squared errors will then be $$ E(a_0,a_2)=(1-a_0)^2+2(a_2+a_0)^2+2(4a_2+a_0)^2=1-2a_0+5a_0^2+20a_0a_2+34a_2^2. $$ Solving the system $\partial E/\partial a_0=0, \partial E/\partial a_2=0$ is easy, and yields $$a_0=17/35, a_2=-1/7.\tag{3}$$ As the only critical point that must yield the optimum.
So we can conclude that $q_0=17/35$, whence $(1)$ together with the symmetries gives $$q_1+q_2=9/35\tag{4}.$$ Combining this with $(2)$ leads to the given solution.