# How to evaluate the integral $\int_{0}^{\pi}\arctan\left(\frac{1+\cos x}{2+\sin x}\right)dx$ [closed]

How to evaluate the integral: $$\int_{0}^{\pi}\arctan\left(\frac{1+\cos x}{2+\sin x}\right)dx$$ I didn't get it by partial integration,Any help is appreciated.

I still can't solve this integral. That's a good question. Why doesn't anyone answer it?

## closed as off-topic by Namaste, mickep, user21820, Carl Mummert, user223391 Oct 22 '17 at 14:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Namaste, mickep, user21820, Carl Mummert, Community
If this question can be reworded to fit the rules in the help center, please edit the question.

• Where did you see this integral? – pisco Jan 20 '18 at 9:07
• @pisco125 I'm sorry. It's been a long time. I forgot. – JamesJ Jan 20 '18 at 9:28

Through $\arctan(x)+\arctan(y)=\arctan\left(\frac{x+y}{1-xy}\right)$ and symmetry we get that the given integral equals $$\int_{0}^{\pi/2}\arctan\left(\frac{2+\sin(x)}{2+2\sin(x)}\right)\,dx =\int_{0}^{1}\arctan\left(\frac{2+z}{2+2z}\right)\frac{dz}{\sqrt{1-z^2}}$$ hence it is enough to compute $$\int_{3/4}^{1}\frac{\arctan(u)\,du}{(2u-1)\sqrt{4u-3}}\quad\text{or}\quad \int_{0}^{1}\arctan\left(\frac{3+v^2}{4}\right)\frac{dv}{1+v^2}.$$ This can be done through integration by parts and the dilogarithms machinery, but the final outcome is not really nice. At least, not the one I got, but maybe I missed some crucial simplification. Anyway, the approach just outlined tends to work pretty well for similar Ahmed-like integrals.
• @JamesJ: they are the same. You integral equals $$\int_{0}^{\pi/2}\arctan\frac{1+\cos x}{2+\sin x}\,dx+\int_{0}^{\pi/2}\arctan\frac{1-\cos x}{2+\sin x}\,dx = \int_{0}^{\pi/2}\arctan\frac{2+\sin x}{2+2\sin x}\,dx$$ – Jack D'Aurizio Oct 20 '17 at 10:20
• But that's what mine is:$\frac{1-\sin x}{2+\cos x}$? – JamesJ Oct 20 '17 at 10:35