Law of Cosines/Proof 3/Acute Triangle

Theorem
Let $\triangle ABC$ be a triangle whose sides $a, b, c$ are such that:
 * $a$ is opposite $A$
 * $b$ is opposite $B$
 * $c$ is opposite $C$.

Let $\triangle ABC$ be an acute triangle.

Then:
 * $c^2 = a^2 + b^2 - 2a b \cos C$

Proof
Let $\triangle ABC$ be an acute triangle.
 * CosineRule-Proof3-acute.png

Let $BD$ be dropped perpendicular to $AC$, and let us define $h = BD$, $e = CD$ and $f = AD$.

Then $\triangle CDB$ and $\triangle ADB$ are right triangles.

So we have both :
 * $(1):\quad c^2 = h^2 + f^2 \quad$ Pythagoras's Theorem
 * $(2):\quad a^2 = h^2 + e^2 \quad$ Pythagoras's Theorem

and also :
 * $(3):\quad b^2 = (e + f)^2 = e^2 + f^2 + 2ef$
 * $(4):\quad e = a \cos C \quad$ Definition:Cosine of Angle

We'll start with the first equation and use the rest of them to get the desired result :