Not sure how to calculate $\int_0^1 \frac 1 {1+y\cos(x)}dx$

Hint:

  1. Substituting $t = \tan \frac{x}{2}$ gives $$I(y):=\int \frac{2}{1+y\cos x} \; \mathrm d x= \int \frac{2}{1+y \frac{1-t^2}{1+t^2}} \cdot \frac{2 \; \mathrm d t}{1+t^2} = \int \frac{2}{1+y+t^2(1-y)} \; \mathrm d t .$$

  2. Since $$\int \frac{1}{1+t^2} \; \mathrm d t = \arctan t$$ the final substitution should be easy.

  3. The last integral is of the type $$ \int \frac{1}{a +bt^2} \; \mathrm d t $$ with constants $a,b \in \mathbf R$. Now substitute $\frac{\sqrt{b}}{\sqrt{a}}t= z$ and you will get $$ \int \frac{1}{a +bt^2} \; \mathrm d t = \frac{1}{\sqrt{a}\sqrt{b}} \; \arctan \left( \frac{\sqrt{b}}{\sqrt{a}}t \right) .$$