Proof of Upper Bound Theorem:
Let $f(x)=q(x)*(x-a)+r$. It is given that all of the coefficients of $q(x)$ and $r$ are non-negative. Factoring out a $x-a$ from the right side of the equation yields $f(x)=(x-a)(q(x)+\frac{r}{x-a})$ for all $x \neq a$. Now, let $c > a$. Note that $c$ is positive since $a$ is non-negative. We will prove that $f(c) \neq 0$, which will prove the theorem by showing that $f(c)=0$ implies $c \leq a$ and thus $a$ is an upper bound on all zeroes of $f(c)$.
We have already shown that $f(c)=(c-a)(q(c)+\frac{r}{c-a})$. Since $c \neq a$, $c-a \neq 0$ and thus $q(c)+\frac{r}{c-a} \neq 0$ implies $f(c) \neq 0$. Therefore, we will prove that $q(c)+\frac{r}{c-a} \neq 0$. $q(x)=\sum_{i=0}^{n-1}q_i*x^i$ where $q_i$ are the non-negative coefficients of $q(x)$ and $n$ is the degree of $f(x)$. Since $c$ is positive, $c^i$ is also positive for any $i \in \mathbb{N}$ and thus, since $q_i$ is non-negative, $q_i*c^i$ is non-negative. As the sum of non-negative numbers are non-negative and $q(c)$ is the sum of all $q_i*c^i$ for $i \in \mathbb{N}$, $q(c)$ is non-negative. Also, since $c > a$, $c-a$ is positive and thus, since $r$ is non-negative, $\frac{r}{c-a}$ is non-negative.
Therefore, since both $q(c)$ and $\frac{r}{c-a}$ are non-negative, the only way their sum could be $0$ is if both of them are $0$. However, if both $q(c)$ is $0$, then all of the coefficients of $q(x)$ are $0$, meaning $q(x)=0$. Also, if $\frac{r}{c-a}=0$, since $c-a$ is positive, $r=0$. If both $q(x)$ and $r$ are $0$, since $f(x)=q(x)*(x-a)+r$, $f(x)=0$. However, $f(x) \neq 0$ since it has a leading positive coefficient. Therefore, $q(c)+\frac{r}{c-a} \neq 0$ because otherwise, $f(x)$ would not have a leading positive coefficient. Thus, we have proven the theorem.
Proof of Lower Bound Theorem:
Let $f(x)=q(x)*(x-a)+r$ and $q(x)=\sum_{i=0}^{n-1}q_i*x^i$ where $q_i$ are the coefficients of $q(x)$ and $n$ is the degree of $f(x)$. Since $f(x)$ has a positive leading coefficient, $q(x)$ must have a non-negative leading coefficient and thus $q_{n-1} \geq 0$. Also, let $c < a$. Note that $c$ is negative since $a$ is non-positive. We can use the argument from the previous theorem to show that all we need to prove is that $q(c)+\frac{r}{c-a} \neq 0$ in order to prove the whole theorem. We will now split this proof up into two cases: $n$ is odd and $n$ is even.
Case 1: $n$ is Odd
If $n$ is odd, then $n-1$ is even and since all of the coefficients alternate between non-negative and non-positive, all of the coefficients of even powers of $x$ must be the same sign as $q_{n-1}$, or non-negative, and all of the coefficients of odd powers of $x$ must be the opposite sign as $q_{n-1}$, or non-positive. Let $i \in \mathbb{N}$. If $i$ is odd, then $q_i$ is non-positive, as we have just shown, and since $c$ is negative, $c^i$ is negative, so $q_i*c^i$ is non-negative. Otherwise, $i$ is even, so $q_i$ is non-negative and $c^i$ is positive, making $q_i*c^i$ still non-negative. Thus, since the sum of non-negative numbers is non-negative and $q(c)=\sum_{i=0}^{n-1}q_i*c^i$, $q(c)$ is non-negative.
Also, since $q_0$ is non-negative (as $0$ is even) and $r$ alternates in sign with $q_0$, $r$ is non-positive. Since $c < a$, $c-a$ is negative. Therefore, $\frac{r}{c-a}$ is non-negative.
Thus, we have shown that $q(c)$ and $\frac{r}{c-a}$ are both non-negative, meaning $q(c)+\frac{r}{c-a}=0$ only if $q(c)=0$ and $\frac{r}{c-a}=0$. However, we have already shown in the argument of the above theorem that this contradicts $f(x)$'s positive leading coefficient. Therefore, $q(c)+\frac{r}{c-a} \neq 0$, proving the theorem for this case.
Case 2: $n$ is Even
The proof of this case is very similar to the proof of Case 1. Simply switch "odd" with "even" and "positive" with "negative" from the proof of the previous case (except where it says "If $i$ is odd", "since $c$ is negative, $c^i$ is negative", "Otherwise, $i$ is even", "$c^i$ is positive", and "because $0$ is even") to prove this new case.
Thus, since we have proven both cases of this theorem, we have proven the whole theorem.
This is NOT a complete answer. Let me offer few observations that might help someone figure out a complete answer.
The problem is to find (I am assuming $b=0$ in the solution) $a$ and $c$ such that $\int_{0}^{\pi/2}|\cos(x)-(ax^{2}+c)|dx$ is minimized. (The switch from $[-\pi/2,\pi/2]$ to $[0,\pi/2]$ is by the symmetry of the problem around $0$).
First order conditions w.r.t. $a$ and $c$ (by the usual principle of wishful thinking) are
$$\newcommand{\sgn}{\mathop{\rm sgn}}
\begin{aligned}
\int_{0}^{\pi/2}\sgn{(\cos(x)-(ax^{2}+c))}(-x^2)dx&=0\\
\int_{0}^{\pi/2}\sgn{(\cos(x)-(ax^{2}+c))}(-1)dx&=0\\
\end{aligned}$$
The second equation says that the areas where the approximation is above the original function and is below have to be equal.
My conjecture is that this implies that the approximation and the original function have to intersect twice on $[0,\pi/2]$ (if only once then if the second equation holds the first cannot). But this is pure speculation.
Taking the idea of two intersections seriously, denote the intersections, that is solutions to $\cos(z)=az^2+c$ on $[0,\pi/2]$ by $x$ and $y>x$. The two first order conditions then become
$$\begin{aligned}
{}[-z]_{0}^{x}+[z]_{x}^{y}+[-z]_{y}^{\pi/2}&=0\\%
{}[-z^3/3]_{0}^{x}+[z^3/3]_{x}^{y}+[-z^3/3]_{y}^{\pi/2}&=0\\%
\end{aligned}$$
which solves to $y=\frac{1}{8}\pi(\sqrt5+1)$ and $x=\frac{1}{8}\pi(\sqrt5-1)$. Finding $a$ and $c$ such that $\cos{z}=az^2+c$ for $z\in\{x,y\}$ gives (thank you Mathematica)
$$\begin{aligned}
a&=-\frac{32\sin{(\frac{\pi}{8})}\sin{(\frac{\sqrt{5}\pi}{8})}}{\sqrt5\pi^2}\\%
c&=\cos{(\tfrac{\pi}{8})}\cos{(\tfrac{\sqrt{5}\pi}{8})}\frac{3\sin{(\frac{\pi}{8})}\sin{(\frac{\sqrt{5}\pi}{8})}}{\sqrt{5}}
\end{aligned}$$
which is approximately $a=-0.427001$ and $c=0.985095$. The area is then approximately (taking $[-\pi/2,\pi/2]$) equal to $0.0449071$. (This shows that Oleg567 above in the comments has done an amazing job).
Best Answer
The leading term of a polynomial almost completely controls the behavior of the polynomial when $x \gg 0$ or $x \ll 0$ (much greater or much lesser).
Since a polynomial has only a finite number of coefficients, those coefficients are bounded. That is, there is some $M$ such that $\left|\frac{a_i}{a_n}\right| < M$ for all $i$. If we take, for example, $|x| > 1000000nM$, then each of the other terms of the polynomial is going to be at best $1 / 1000000n$ times the value of $a_nx^n$, and even their sum will be at most a millionth of the value of that leading term.
And as $x$ gets even larger in absolute value, the leading term becomes even more dominant. So no matter what polynomial $p_n(x)$ you have, if you back far enough away, it looks just like $a_nx^n$, except for tiny discrepancies near $0$.