Proof of tangent half identity 
Prove the following: $$\tan \left(\frac{x}{2}\right) = \frac{1 + \sin (x) - \cos (x)}{1 + \sin (x) + \cos (x)}$$

I was unable to find any proofs of the above formula online. Thanks!
 A: Hints:


*

*$\sin x = 2 \sin \frac{x}{2} \cos \frac{x}{2}$

*$1 - \cos x = 2 \sin^2 \frac{x}{2}$

*$1 + \cos x = 2 \cos^2 \frac{x}{2}$

A: There are several ways to proceed, apart from what Ayman gave
Approach 1: If you know the tangent t-formulas: For $t = \tan \frac {\theta} {2}$, 
$$ \sin \theta = \frac {2t}{1+t^2}, \cos \theta = \frac {1-t^2}{1+t^2}$$
Substitute these into the equation and simplify.
Approach 2: (my preference)If you know that $\tan \frac {\theta}{2} = \frac {\sin \theta}{1+\cos \theta} = \frac { 1- \cos \theta}{\sin \theta}$, then by the equivalence class of fractions, we can sum across the numerator and denominator to get
$$\tan \frac {\theta}{2} = \frac {\sin \theta + 1 - \cos \theta}{ 1 + \cos \theta + \sin \theta}$$
Of course, you could also take the difference across the numerator and denominator to get
$$\tan \frac {\theta}{2} = \frac {\sin \theta - 1 + \cos \theta}{ 1 + \cos \theta - \sin \theta}$$
A: One well known tangent half-angle formula says
$$
\tan\frac x2 = \frac{\sin x}{1+\cos x}.
$$
Another well known tangent half-angle formula says:
$$
\tan\frac x2 = \frac{1-\cos x}{\sin x}.
$$
If two fractions $\dfrac AB$ and $\dfrac CD$ are equal, then their common value is also equal to $\dfrac{A+C}{B+D}$, so there you have it.
A: You could always use Euler's formula, setting $$ z = e^{i x} $$ which gives for the left
$$ \tan\left(\frac{x}{2}\right) = \frac{1}{i} \frac{z^{1/2}-z^{-1/2}}{z^{1/2}+z^{-1/2}}
= \frac{1}{i} \frac{z-1}{z+1}$$
and for the right
$$ \frac{1+\sin(x)-\cos(x)}{1+\sin(x)+\cos(x)} =
\frac{1+ 1/(2i) z - 1/(2i) 1/z - (1/2) z - (1/2) 1/z}
{1+ 1/(2i) z - 1/(2i) 1/z + (1/2) z + (1/2) 1/z} =
\frac{z + 1/(2i) z^2 - 1/(2i) - (1/2) z^2 - (1/2)}
{z + 1/(2i) z^2 - 1/(2i) + (1/2) z^2 + (1/2)} $$
which is
$$ \frac{-1/2(1+i)(z-1)(z+i)}{1/2(1-i)(z+1)(z+i)} =
-\frac{1+i}{1-i}  \frac{z-1}{z+1} = \frac{1}{i} \frac{z-1}{z+1}.$$
While this may not be the most intuitive approach it does show that these trigonometric identities are amenable to automated theorem proving -- just make the substitution from Euler's formula, factorize LHS and RHS, done.
