Inequality bewteen integral of a squared function and the square of the integrated function Situation I am intrigued by this inequality
$ a \int_0^a f^2 dx \ne \left( \int_0^a f dx \right)^2 $
where $f=f(x)$ is some vanilla real function of reals, continuous and admitting continuous first and second derivatives, at least. 
It can have any sign. 
Obviously, $f$ is not a constant. 
Also, both integrals exist and are finite.
Question (still unanswered) Are there ways to express $ \int_0^a f^2 dx $ as an approximation of $ \int_0^a f dx $? Which ones?
Aim (addressed by Chappers below) The ultimate aim would be to anticipate how large the difference
$ a \int_0^a f^2 dx -\left( \int_0^a f dx \right)^2 $
is for different choices of $f$.
Note To gauge the lingo in the answers, I am no mathematician by training (clearly), but I would also welcome being pointed out to expositions for educators if you know any  
 A: We have $(f(x)-f(y))^2 \geq 0$ for any $x$ and $y$ where $f$ is defined, and moreover, this continuous, and zero if and only if $f$ is constant. 
Then we state the identity
$$ 0 \leq \frac{1}{2}\int_0^a\int_0^a (f(x)-f(y))^2 \, dx \, dy = \frac{1}{2}\int_0^a \int_0^a (f(x)^2 - 2f(x)f(y)+f(y)^2) \, dx \, dy \\
= a\int_0^a f^2 - \left( \int_0^a f \right)^2 $$
by expanding the double integral.
To estimate the difference more precisely, one can try to produce an upper bound $$J[f]=\int_0^a\int_0^a (f(x)-f(y))^2 \, dx \, dy.$$
A trivial bound may be found by noting that $$(f(x)-f(y))^2 \leq (M-m)^2,$$ where $M$ and $m$ are the maximum and minimum values $f$ takes on in the interval, and it follows that
$$J[f] \leq a^2 (M-m)^2.$$
Alternatively, since $f$ is differentiable, the Mean Value Theorem says that
 $$f(x)-f(y) = (x-y)f'(z)$$ 
for some $z$ strictly between $x$ and $y$, which gives the bound for the integrand
$$(f(x)-f(y))^2 \leq (x-y)^2 (\max_{(0,a)}{f'})^2,$$ 
and then the bound for the integral
$$ J[f] \leq (\max_{(0,a)}{f'})^2 \int_0^a\int_0^a (x-y)^2 \, dx\, dy = \frac{a^4}{6} \left(\max_{(0,a)}{f'}\right)^2 $$
This is probably the most than can be said without more stringent conditions on $f$: one can set up a smooth function with integral zero and integral of its square as large as one likes, for example, and indeed, likely saturate one or both of the bounds I have given; the best one could hope for in bounds of this type is probably to sharpen the constants (there will be bounds on the size of the set where $f$ is close to $M$ versus $m$, for example).
We also have via the Fundamental Theorem of Calculus
$$ J[f] = \int_0^a\int_0^a \left( \int_x^y f'(z) \, dz \right)^2 \, dx \, dy, $$
which may lead to a better bound depending on how much one can say about $f'$.
