Please help me integrate
$$\int_0^{\pi/4}\!\frac{\mathrm dx}{2+\sin x}$$
and
$$\int_0^{2\pi}\!\frac{\mathrm dx}{2+\sin x}$$
I've tried the standard $u = \tan \frac{x}{2}$ substitution but it looks horrible.
Thanks in advance!
Please help me integrate
$$\int_0^{\pi/4}\!\frac{\mathrm dx}{2+\sin x}$$
and
$$\int_0^{2\pi}\!\frac{\mathrm dx}{2+\sin x}$$
I've tried the standard $u = \tan \frac{x}{2}$ substitution but it looks horrible.
Thanks in advance!
Let's give another try to your failed technique...
$$\displaystyle\int \frac{dx}{2+\sin x}$$
Let $u = \tan \frac{x}{2}$
$$\int \frac{du}{u^2+u+1} = \int \frac{du}{\left(u+\frac{1}{2}\right)^2 + \left(\frac{\sqrt{3}}{2}\right)^2}$$
Let $s=u+\frac{1}{2}$
$$\begin{align}\int \frac{ds}{s^2 + \left(\frac{\sqrt{3}}{2}\right)^2} &= \frac{2}{\sqrt{3}}\arctan\left(\frac{2s}{\sqrt{3}}\right)\\ &=\frac{2}{\sqrt{3}}\arctan\left(\frac{2u+1}{\sqrt{3}}\right)\\&=\frac{2}{\sqrt{3}}\arctan\left(\frac{2\tan\frac{x}{2}+1}{\sqrt{3}}\right)\end{align}$$
Evaluating the above from $0$ to $\dfrac{\pi}{4}$ yields approximately $0.33355$ while $0$ to $2\pi$ gives $\dfrac{2\pi}{\sqrt{3}}$.
For the second one, where the integral is from $0$ to $2\pi$, here is a way out.
\begin{align} \dfrac12\int_0^{2\pi} \dfrac{dx}{1+\dfrac{\sin(x)}2} & = \dfrac12\int_0^{2\pi}\sum_{k=0}^{\infty}\left(-\dfrac12 \right)^k \sin^{k}(x) dx = \sum_{k=0}^{\infty}\dfrac1{2^{2k+1}} \int_0^{2 \pi}\sin^{2k}(x) dx\\ & = \sum_{k=0}^{\infty} \dfrac1{2^{2k+1}} \cdot \dfrac{2\pi}{2^{2k}} \dbinom{2k}k = \sum_{k=0}^{\infty} \cdot \dfrac{\pi}{16^{k}} \dbinom{2k}k= \dfrac{\pi}{\sqrt{1-4\times \left(\dfrac1{16}\right)}} = \dfrac{2\pi}{\sqrt3} \end{align} where we used the following facts:
$\dfrac1{1+r} = \displaystyle \sum_{k=0}^{\infty}(-r)^k$, $\displaystyle \int_0^{2\pi} \sin^{2k}(x) dx = \dbinom{2k}k \dfrac{2\pi}{2^{2k}}$ and $ \dfrac1{\sqrt{1-4x}} = \displaystyle\sum_{k=0}^{\infty} \dbinom{2k}k x^k \,\, \forall x \in \left[-\dfrac14,\dfrac14 \right)$