2
$\begingroup$

This is supposed to be a very easy integral, however I cannot get around.

Evaluate:

$$\int_0^{2\pi} \frac{1}{\cos x + \sin x +2}\, dx$$

What I did is:

$$\int_{0}^{2\pi}\frac{dx}{\cos x + \sin x +2} = \int_{0}^{2\pi} \frac{dx}{\left ( \frac{e^{ix}-e^{-ix}}{2i}+ \frac{e^{ix}+e^{-ix}}{2} +2\right )}= \oint_{|z|=1} \frac{dz}{iz \left ( \frac{z-z^{-1}}{2i} + \frac{z+z^{-1}}{2}+2 \right )}$$

Although the transformation is correct I cannot go on from the last equation. After calculations in the denominator there still appears $i$ and other equations of that. How can I proceed?

$\endgroup$
  • 1
    $\begingroup$ This is an excellent candidate for the Weierstrass substitution. en.wikipedia.org/wiki/Tangent_half-angle_substitution $\endgroup$ – Thomas Andrews Jun 17 '15 at 3:39
  • $\begingroup$ No... !! If you do that you get $0$. Why? Because $\tan \frac{x}{2}$ is not an $1-1$ function. Try it out. $\endgroup$ – Tolaso Jun 17 '15 at 3:40
  • 1
    $\begingroup$ Have you tried with $\cos(x) + \sin(x) = \sqrt{2} \cos(x-\frac{\pi}{4})$? $\endgroup$ – corindo Jun 17 '15 at 3:47
  • 2
    $\begingroup$ @ThomasAndrews, the OP means that both of the limits of integration become $0$, which is problematic. $\endgroup$ – user230734 Jun 17 '15 at 3:47
  • 1
    $\begingroup$ If you do the substitution you get an explicit antiderivative in terms of $\tan(x/2)$. You can then evaluate the resulting improper integral (to take into account the asymptote of $\tan(x/2)$ at $x = \pi$) and get the correct answer. $\endgroup$ – Rolf Hoyer Jun 17 '15 at 3:56
2
$\begingroup$

Via corindo's rearrangement: we have $$ I = \int_0^{2 \pi} \frac{1}{\sqrt{2}\cos(x - \pi/4) + 2}\,dx =\\ \frac 1{\sqrt{2}} \int_0^{2 \pi} \frac{1}{\cos(x - \pi/4) + \sqrt{2}}\,dx = \\ \frac 1{\sqrt{2}} \int_0^{2 \pi} \frac{1}{\cos(x) + \sqrt{2}}\,dx =\\ \frac 1{\sqrt{2}} \oint_{|z| = 1} \frac{1}{iz((z + z^{-1})/2 + \sqrt{2})}\,dx = \\ \frac {\sqrt{2}}{i} \oint_{|z| = 1} \frac{1}{(z^2 + 2\sqrt{2}z + 1)}\,dz $$ Note the integrand has one pole inside the unit circle, namely $$ z_{0} = 1-\sqrt{2} $$

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ There is something I do not follow here. How did the third line come up ? $\endgroup$ – Tolaso Jun 17 '15 at 4:03
  • $\begingroup$ Both are the integral of the same function over a period $\endgroup$ – Omnomnomnom Jun 17 '15 at 4:03
  • $\begingroup$ Whoops, made another mistake though $\endgroup$ – Omnomnomnom Jun 17 '15 at 4:04
  • $\begingroup$ Good! Now that you fixed it , this suits my needs! Although @Thomas Andrews answer is also good and I have upvoted it. $\endgroup$ – Tolaso Jun 17 '15 at 4:09
5
$\begingroup$

Note that: $$\frac{1}{iz \left ( \frac{z-z^{-1}}{2i} + \frac{z+z^{-1}}{2}+2 \right )}$$

is a rational function. Write it as a quotient of polynomials, then factor the denominator and apply partial fractions.

If you change the integral to:

$$\int_{-\pi}^{\pi} \frac{1}{\cos x + \sin x +2}\, dx$$ you can apply the Weierstrass substitution and get:

$$\int_{-\infty}^{\infty} \frac{\frac{2}{1+t^2}}{\frac{1-t^2}{1+t^2}+\frac{2t}{1+t^2}+2}\,dt=\int_{-\infty}^{\infty}\frac{2\,dt}{2+(t+1)^2}\\=\int_{-\infty}^{\infty}\frac{dt}{1+\left(\frac{1+t}{\sqrt 2}\right)^2}$$

Substituting $u=\frac{1+t}{\sqrt{2}}$ gives:

$$=\sqrt{2}\int_{-\infty}^{\infty} \frac{du}{1+u^2}=\sqrt{2}\pi$$

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ So you mean to apply partial decomposition? $\endgroup$ – Tolaso Jun 17 '15 at 4:01
  • $\begingroup$ No idea what partial decomposition is. I said partial fractions, and that is what I meant. @Tolaso $\endgroup$ – Thomas Andrews Jun 17 '15 at 4:04
  • $\begingroup$ It is exaclty the same. (+1) $\endgroup$ – Tolaso Jun 17 '15 at 4:07
  • $\begingroup$ Thank you Thomas for providing also the solution with real analysis. $\endgroup$ – Tolaso Jun 17 '15 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.