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

$$\int_0^1 \frac 1 {1+y\cos(x)}dx$$

If there was no $y$, I would multiply by $1-\cos(x)$ and finish it quickly. But the $y$ stops me from doing that. I tried the trigonometric substitution but failed. I assume there is a simple way to solve this. I would appreciate if anyone could help me with this. Thanks.

EDIT: When trying the Weirstrass Sub. I got here and wasn't able to find a way to go forward:

$$\int_0^{\pi/4}\frac {2dt}{1+y+t^2(1-y)}$$

• Did you consider to myltiply and divide by $1-y\cos x$? If so, what is your problem with the result? (Also, the upper limit is a bit strange for cosine, did this integral come from an exercise or from some application?) – mickep Feb 7 '17 at 15:23
• You can see $y$ as a constant, so you can multiply and divide by $1-ycos(x)$ and continue with your way. In fact the only variable is $x$. – Giulio Feb 7 '17 at 15:23
• @Giulio. That is not going to work here. The Pythagorean Theorem doesn't work anymore if $y$ is not $1$ or $-1$. – imranfat Feb 7 '17 at 15:25
• @Ron. Have you looked into the Weierstrass substitution? – imranfat Feb 7 '17 at 15:25
• @imranfat just noticed my typo – Giulio Feb 7 '17 at 15:28

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) .$$

• typo in your substitution. Should be $t=\tan\frac{x}{2}$? – Juniven Feb 7 '17 at 15:38
• Yes, sure. Thank you! – Niklas Feb 7 '17 at 15:39
• Thank you. I'm afraid my problem is exactly with that easy substitution, since I reached the same integral using the substitution. – Ron Feb 7 '17 at 15:44
• @Ron, okay. Next hint added! – Niklas Feb 7 '17 at 15:54

First one should be careful to consider only $y$ such that $1+y\cos x\neq 0$.

If that is the case we notice that $$\frac{1}{1+y\cos x}=\frac{1-y\cos x}{1-y^2\cos^2x}.$$ Next, we divide into the parts $$\frac{1}{1-y^2\cos^2x}=\frac{1}{\sin^2 x+(1-y^2)\cos^2x}=\frac{1}{\cos^2x}\frac{1}{\tan^2x+1-y^2}$$ For this part, let $u=\tan x$. For the second part, $$\frac{-y\cos x}{1-y^2\cos^2x}=-\frac{y \cos x}{1-y^2+y^2\sin^2x}.$$ Here, let $u=\sin x$.

I think you are now on safe ground. Ask if you cannot take it from here.
