Find the range of values for $a+b$ when $y=-\frac{1}{8}x^2+ax+b$ is tangent to the $x-$axis.

If $f(x)=-\frac{x^2}8+ax+b$, then $f'(x)=-\frac x4+a$, and therefore $f'(x)=0\iff x=4a$. So, since the graph of $f$ as tangent to the $x$-axis, $f(4a)=0$, which means that $b=-2a^2$. But then\begin{align}a+b&=a-2a^2\\&=-2\left(a-\frac14\right)^2+\frac18\end{align}and$$\left\{-2\left(a-\frac14\right)^2+\frac18\,\middle|\,a\in\Bbb R\right\}=\left(-\infty,\frac18\right].$$


Given parabola is tangent to x-line iff it discriminat is $0$, so $$a^2+b/2 =0$$

So $f(a)=a+b = a-2a^2$ which is a quadratic function on $a$ and achieves the maximum at $a={1\over 4}$, so $f(a)\leq {1\over 4}-{1\over 8} = {1\over 8}$.


$f(x)=-\frac{1}{8}x^2 + ax +b. \\ f'(x)=-\frac{1}{4}x +a.\\ f'(x_0)=0 \Leftrightarrow x_0=4a.\\ f(x_0)=f(4a)=2a^2+b.\\ f(x_0)=0 \Leftrightarrow b=-2a^2.\\S(a, b)=a+b = a + (-2a^2).\\ S'(a, b)=-4a+1.\\ S'(a, b)=0 \Leftrightarrow a=\frac{1}{4}.\\ S(a, b) \le -2(\frac{1}{4})^2 + \frac{1}{4}=\frac{1}{8}. $