Integral of $\dfrac{\cos(x)}{5+3\cos(x)}$ I was doing 

$$\int\!\mathrm{d}x \dfrac{\cos(x)}{5+3\cos(x)}$$

and using the substitution $\cos(\theta) = \dfrac{1-t^2}{1+t^2},\quad t = \tan\left(\dfrac{\theta}{2}\right)$
$$\dfrac{\dfrac{1-t^2}{1+t^2}}{5+3\dfrac{1-t^2}{1+t^2}} =
\dfrac{\dfrac{1-t^2}{1+t^2}}{5\dfrac{1+t^2}{1+t^2}+3\dfrac{1-t^2}{1+t^2}} =
\dfrac{\dfrac{1-t^2}{1+t^2}}{\dfrac{5(1+t^2)+3(1-t^2)}{1+t^2}} =
\dfrac{\dfrac{1-t^2}{1+t^2}}{\dfrac{5+5t^2+3-3t^2}{1+t^2}}\\[4em]
\dfrac{\dfrac{1-t^2}{1+t^2}}{\dfrac{8+2t^2}{1+t^2}} =
\dfrac{\dfrac{1-t^2}{1+t^2}}{\dfrac{2(4+t^2)}{1+t^2}} =
\dfrac{1-t^2}{1+t^2}\times\dfrac{1+t^2}{2(4+t^2)} =
\dfrac{1-t^2}{2(4+t^2)} =
\dfrac{1}{2}\dfrac{1-t^2}{4+t^2}$$
So now I'm left with $\dfrac{1}{2}\int\!\mathrm{d}x\dfrac{1-t^2}{4+t^2}$, but I don't know how to proceed from here...
 A: Calculate the integral
$$\int \frac{\cos \left(x\right)}{5+3\cos \left(x\right)}dx$$
First, apply the Integral Substitution:
$$\int f(g(x))\cdot g'(x)dx=\int f(u)du, u=g(x) $$
So, your $u=\tan(\frac{x}{2})$ that $dx=\frac{2}{1+u^2}du$ and $\cos \left(x\right)=\frac{1-u^2}{1+u^2}$.
$$\Rightarrow \int \frac{\cos \left(x\right)}{5+3\cos \left(x\right)}dx =\int \frac{\frac{1-u^2}{1+u^2}}{5+3\frac{1-u^2}{1+u^2}}\frac{2}{1+u^2}du =\int \frac{1-u^2}{u^4+5u^2+4}du $$
Now you take the partial fraction of $\frac{1-u^2}{u^4+5u^2+4}$ that
\begin{align}
\int \frac{1-u^2}{u^4+5u^2+4}du&=\int \frac{2}{3\left(u^2+1\right)}-\frac{5}{3\left(u^2+4\right)}du\\
&=\int \frac{2}{3\left(u^2+1\right)}du-\int \frac{5}{3\left(u^2+4\right)}du \\
&= \frac{2\arctan(u)}{3} - \frac{5\arctan(\frac{u}{2})}{6}
\end{align}
Now back Substitute then you have
$$=\frac{2\arctan \left(\tan \left(\frac{x}{2}\right)\right)}{3}-\frac{5\arctan \left(\frac{\tan \left(\frac{x}{2}\right)}{2}\right)}{6}$$
Don't Forget to add a constant to the solution ;-)
So: your solution is
$$\int \frac{\cos \left(x\right)}{5+3\cos \left(x\right)}dx=\frac{2\arctan \left(\tan \left(\frac{x}{2}\right)\right)}{3}-\frac{5\arctan \left(\frac{\tan \left(\frac{x}{2}\right)}{2}\right)}{6}+C$$
A: $$\frac{\cos x}{5+3\cos x}=\frac13\left(1-5\cdot\frac1{5+3\cos x}\right)$$
$$\int\frac1{5+3\cos x}dx=\int\frac{1+t^2}{5(1+t^2)+3(1-t^2)}\frac{2t\ dt}{1+t^2}$$
$$=\int\frac{dt}{2^2-t^2}=\frac14\int\left(\frac1{2-t}+\frac1{2+t}\right)dt=\cdots$$
Hope the rest can be handled easily.
