<s>[INST] Tangent line $l$ through $(a,a^2)$ on $y=x^2 $, to make the area $S$ enclosed by $l$ and $y=-x^2+4x-1$ smallest. Find $l$ and $S$ 
Draw a tangent line $l$ through $(a,a^2)$ on $y=x^2 $, to make the area $S$ enclosed by $l$ and $y=-x^2+4x-1$ smallest. Find $l$ and $S$.

I was doing this:
$l$ : $y-a^2=2a(x-a)\Rightarrow y=2ax-a^2$
Supose $l$ intersect  $y=-x^2+4x-1$ at $(x_1,y_1)$ and $(x_2,y_2)$. Then 
$$S=\int_{x_1}^{x_2}\Big(-x^2+4x-1-(2ax-a^2)\Big) dx$$
But $x_{1,2}$ is too complex make $S$ more complex. So I don't how to simply it also I was wondering is there more convenient way to do this problem.
 [/INST] Since $x_1$ and $x_2$ are solution to $$x^2+x(2a-4)+1-a^2 =0$$ we have (by Vieta)
$$ x_1+x_2 = 4-2a\;\;\;\; {\rm and}\;\;\;\;\;x_1x_2 = 1-a^2\;\;\;\;\;{\rm and}\;\;\;\;\;x_2-x_1=2\sqrt{2a^2-4a+3}$$
So
$$
\begin{eqnarray}
S(a)&=&\Big|\int_{x_1}^{x_2}(x^2+x(2a-4)+1-a^2) dx\Big|\\
 &=& \Big|{x^3\over 3}+x^2(a-2)+(1-a^2)x\Big{|}_{x_1}^{x_2}\;\;\Big|\\
 &=& \Big|(x_2-x_1)\Big({x_1^2+x_1x_2+x_2^2\over 3}+(x_2+x_1)(a-2)+(1-a^2) \Big)\Big|\\
&=& \Big|2\sqrt{2a^2-4a+3}\cdot {-4a^2+8a-6\over 3}\Big| \\
&=& 4\sqrt{2a^2-4a+3}\cdot {2a^2-4a+3\over 3}\\
\end{eqnarray}
$$
Put $t = \sqrt{2a^2-4a+3}\geq 1$ for all $a$.  So $$S = {4\over 3}t^3\geq {4\over 3}$$ 
So $S_{\min} = 4/3$
</s>