Now that OP has understood how to prove this, here is a geometric proof for certain angles, just for fun :-)
Consider the figure:

$\displaystyle \triangle ABC$ is a right angled triangle with the right angle being at $\displaystyle C$.
$\displaystyle \angle{CAB} = A$ and $\displaystyle AB = 1$ and thus $\displaystyle BC = \sin A$ and $\displaystyle AC = \cos A$.
Now $\displaystyle AO$ is the angular bisector of $\displaystyle \angle{CAB}$. We select $\displaystyle O$ so that $\displaystyle O$ is the in-center (point of intersection of angular bisectors of a triangle). Let the in-radius $\displaystyle OD$ be $\displaystyle r$.
Now $\displaystyle BE = BF$ and $\displaystyle AE = AD$ and adding gives us $\displaystyle BF + AD = AB = 1$
Now $\displaystyle BF = BC - FC =BC - OD$ (as $\displaystyle ODCF$ is a square).
Thus $\displaystyle BF = \sin A - r$. Similarly $\displaystyle AD = \cos A - r$.
Thus $\displaystyle \sin A + \cos A - 2r = 1$.
Using $\displaystyle \triangle ADO$, $\displaystyle \tan \frac{A}{2} = \frac{OD}{AD} = \frac{r}{\cos A - r}$
Since $\displaystyle 2r = \sin A + \cos A -1 $ we get
$\tan \frac{A}{2} = \frac{2r}{2\cos A - 2r} = \frac{\sin A + \cos A - 1}{\cos A - \sin A + 1}$
It is easy to verify that
$ \frac{\sin A + \cos A - 1}{\cos A - \sin A + 1} = \frac{\sin A - \cos A + 1}{\cos A + \sin A + 1}$
Incidently, the fact that in a right triangle (hypotenuse $c$), the in-radius is given by $ a + b -c = 2r$ and also by $r = \frac{\triangle}{s}$ ($\triangle$ is the area, $s$ is the semi-perimeter) can be used to prove the pythagoras theorem ($a^2 + b^2 = c^2$)!