Find the smallest possible value of an integral Say a have an integral, like this one
$$\int_{0}^1 (x-a)^2\, dx$$ 
and asked to find the smallest possible value of it, as a varies. How can I do this? Besides, is there a certain rule I can use to solve this type of questions?
I will be grateful for any help.

\begin{align}
\int_{0}^{1} (x-a)^2 &= \frac{(x-a)^3}{3} \Bigg \rvert_0^1 \\
&=\frac{(1-a)^3}{3} - \frac{(-a)^3}{3}\\
&=a^2-a+\frac{1}3\\
&=\left(a-\frac 12\right)^2+\frac {1}{12} \ge \frac{1}{12}
\end{align}
