First let's start with \(\sin(2x)\) and \(\cos(2x)\):
\[ \begin{align} \sin(2x) &= 2\sin(x)\cos(x) \\ \cos(2x) &= 2\cos^2(x) - 1\end{align} \]
One definition of \(\tan(x)\) is:
\[\tan(x) = \frac{\sin(x)}{\cos(x)}\]
This means:
\[\tan(2x) = \frac{\sin(2x)}{\cos(2x)} = \frac{2\sin(x)\cos(x)}{2\cos^2(x) - 1}\]
Since \(\cos(x) = 1/\sec(x)\):
\[\tan(2x) = \frac{2\sin(x)\left( \frac{1}{\sec(x)}\right)}{\frac{2}{\sec^2(x)} - 1} = \frac{2\sin(x)\left( \frac{1}{\sec(x)}\right)}{\frac{2 - \sec^2(x)}{\sec^2(x)}}\]
Rearranging:
\[\tan(2x) = \frac{2\sin(x)\left( \frac{1}{\sec(x)}\right) (\sec^2(x))}{2 - \sec^2(x)} = \frac{2 \sin(x)\sec(x)}{2 - \sec^2(x)}\]
Since \(\sec^2(x) = 1 + \tan^2(x)\):
\[\tan(2x) = \frac{2 \sin(x)\sec(x)}{2 - (1 + \tan^2(x))} = \frac{2 \sin(x)\sec(x)}{1 - \tan^2(x)}\]
Since \(\sec(x) = 1/\cos(x)\):
\[\tan(2x) = \frac{2 \sin(x)\sec(x)}{1 - \tan^2(x)} = \frac{2 \tan(x)}{1 - \tan^2(x)}\]
This is the double angle formula for \(\tan(x)\). As for the half angle formula, let's start with:
\[\begin{align} \sin^2(x) &= \frac{1-\cos(2x)}{2} \\ \cos^2(x) &= \frac{1+\cos(2x)}{2} \end{align}\]
By definition of \(\tan(x)\):
\[\tan^2(x) = \frac{\sin^2(x)}{\cos^2(x)} = \frac{1-\cos(2x)}{1+\cos(2x)} \]