Solving integral using trig substitution $\tan(x/2)=t$ I have problems with solving the following integral:
$$ \int{{\sin x - \cos x}\over {\sin x + \cos x}} \, dx$$
Could anybody please help me to find the solution and show me the method how it can be solved? I already tried to solve similar ones but I get always stuck when trying the technique with partial fraction decomposition.
Thanks very much in advance!

\begin{align}
\tan \frac x 2 & = t \\[8pt]
\frac x 2 & = \arctan t \\[8pt]
x & = 2\arctan t \\[8pt]
\sin x & = \sin(2\arctan t) = \sin(2 \, \bullet) = 2 \sin(\bullet)\cos(\bullet) \\
& = 2\sin(\arctan t)\cos(\arctan t), \\[8pt]
\cos x & = \cos(2\arctan t) = \cos(2\,\bullet) = \cos^2(\bullet) - \sin^2(\bullet) \\
& = \cos^2(\arctan t) - \sin^2(\arctan t).
\end{align}
Now let us consider what $\sin(\arctan t)$ and $\cos(\arctan t)$ are.
$\tan = \dfrac{\text{opposite}}{\text{adjacent}} = \dfrac t 1$ so $\text{hypotenuse} = \sqrt{t^2+1^2}$, and so we have
$$
\sin(\arctan t) = \frac{\text{opposite}}{\text{hypotenuse}} = \frac t {\sqrt{t^2+1}}.
$$
Similarly
$$
\cos(\arctan t) = \frac{\text{adjacent}}{\text{hypotenuse}} = \frac 1 {\sqrt{t^2+1}}.
$$
Consequently
$$
2\sin(\arctan t)\cos(\arctan t) = 2\cdot \frac 1 {\sqrt{t^2+1}} \cdot \frac t {\sqrt{t^2+1}} = \frac{2t}{1+t^2}.
$$
Similarly
$$
\cos^2(\arctan t) - \sin^2(\arctan t) = \frac 1 {1+t^2} - \frac t {1+t^2} = \frac{1-t^2}{1+t^2}.
$$
So now we have
$$
\left.
\begin{align}
\sin x & = \frac{2t}{1+t^2}, \\[10pt]
\cos x & = \frac{1-t^2}{1+t^2}.
\end{align}
\right\} \tag 1
$$
Finally, since $x = 2\arctan t$, we have
$$
dx = \frac{2\,dx}{1+t^2}. \tag 2
$$
Your ultimate answer comes from $(1)$ and $(2)$, followed by actually evaluating the resulting integral of a rational function.
