So I have the integral below which I am meant to evaluate using complex analysis. I was thinking to transform this integral and evaluate using the Residue theorem, but the process is incredibly messy and I am doubting if that is correct way to proceed. I know the answer should be $2\,\pi-4/3\,\sqrt {3}\pi$. $$\int_{0}^{2\,\pi}\!{\frac {\cos \left( x \right) }{2+\cos \left( x  \right) }}\,{\rm d}x$$
28624
Calculate the integral for $\left|a\right|&lt;1$  $$\int_{-\pi}^{\pi} \dfrac{\cos(n\theta)}{1-2a\cos(\theta)+a^2}d\theta$$  I'm supposed to evaluate this using method of residues, but the parameter a is confusing me. I'm not even sure what contour I should use. Any help would be very appreciated.
111428
I need to calculate this integral using Riemann sum. $$\int_0 ^\pi \log(1-2\alpha \cos (x) +\alpha^2){\rm d}x$$ a). For $|\alpha|&lt;1$; b). For $|\alpha| &gt; 1$.  I know one way of computing this using substitutions and symmetries, but it is necessary to do with Riemann sum. Help please.  UPD:Also, I know that decomposition of a polynomial $a^2n$  into quadratic factors is helpful.
98636
I've been wrestling with this problem (available  ):  Evaluate the integral of $f(z) = \sqrt{z^2-1}$ around the circle $\{z: |z| = 2\}$, where the branch of the square root function is chosen so that $\sqrt{2^2-1} &gt; 0$.  I came up with the answer $$\int\limits_{|z| = 2} \sqrt{z^2-1} dz = \pi i$$ using the following argument, which seems a little like voodoo to me.  You notice that there are two points, at $z \pm 1$, where you might have to pick a branch of $log()$ to define the square root. Then, I convinced myself that as long as you exclude from your domain the real interval $-1 \le x \le 1$, the function $f(z)$ can be continuously defined (maybe the two branches somehow cancel?), and so is analytic on its domain.  Therefore you can shrink the contour of integration continuously using the Cauchy Closed Curve Integral Theorem, so that you wind up reducing it to the real integral $$2\int_{-1}^1 \sqrt{x^2-1} dx = \pi i$$  I'm not really sure the answer is correct, and I'm even less certain about the way I got it. I had a hard time convincing myself that $\sqrt{z^2-1}$ was not multi-valued on the domain. To try to get at that I tried $\sqrt{z^2-1} = \sqrt{z+1} \sqrt{z-1}$ and reasoned that the product makes the discontinuity disappear, using $$e^{\frac{\pi}{2}i}\cdot e^{\frac{\pi}{2}i} = -1 = e^{-\frac{\pi}{2}i}\cdot e^{-\frac{\pi}{2}i} $$ for the different branches of $log()$ you can choose.  I'd appreciate any input that would help me get a a better way to look at this.  Thanks!    EDIT  An attempt to use the Residue at infinity:  By substituting $z = 1/w$ you get \begin{eqnarray} \int\limits_{|z| = 2} \sqrt{z^2-1} dz &amp;=&amp; \int\limits_{|w| = 1/2} \frac{1}{w^2}\sqrt{\frac{1}{w^2}-1} dw \\ &amp;=&amp; \int\limits_{|w| = 1/2} \frac{1}{w^2}\sqrt{\frac{1-w^2}{w^2}} dw \\ &amp;=&amp; \int\limits_{|w| = 1/2} \frac{1}{w^3}\sqrt{1-w^2} dw \end{eqnarray} The integrand is analytic in $|w| \le 1/2$ except at $w = 0$, so we can apply the Residue Theorem. Near $w = 0$, $\sqrt{1-w^2} = 1 - \frac{1}{2}w^2 + \dots$, so the residue of $\frac{1}{w^3}\sqrt{1-w^2} $ at $w = 0$ is $-\frac{1}{2}$. Then the integral is $$\int\limits_{|z| = 2} \sqrt{z^2-1} dz = 2\pi i \cdot (-1/2) = -\pi i$$
48560
I need to compute the improper integral $$ \int_{-\infty}^{\infty}\frac{x^{2}}{\cosh\left(x\right)}\,{\rm d}x $$ using contour integration and possibly principal values.  Trying to approach this as I would normally approach evaluating an improper integral using contour integration doesn't work here, and doesn't really give me any clues as to how I should do it. This normal approach is namely evaluating the contour integral $$ \oint_{C}{\frac{z^2}{\cosh\left(z\right)}\mathrm{d}z} $$ using a semicircle in the upper-half plane centered at the origin, but the semicircular part of this contour integral does not vanish since $\cosh\left(z\right)$ has period $2\pi\mathrm{i}$ and there are infinitely-many poles of the integrand along the imaginary axis given by $-\pi\mathrm{i}/2 + 2n\pi\mathrm{i}$ and $\pi\mathrm{i}/2 + 2n\pi\mathrm{i}$ for $n \in \mathbb{Z}$. The residues of the integrand at these simple poles are $-\frac{1}{4}\mathrm{i}\pi^{2}\left(1 - 4n\right)^{2}$ and $\frac{1}{4}\mathrm{i}\left(4\pi n + \pi\right)^{2}$, so that even when we add up all of the poles, we have the sum $4\pi^{2}\mathrm{i}\sum_{n = 0}^{\infty}\,n$, which clearly diverges.  Any hints would be greatly appreciated.
29140
Could anyone help me decide what contour to use to evaluate this integral?  $$\int_0^\infty \frac{\sqrt{t}}{1+t^2} dt$$  So we have simple poles at $i$,$-i$. Why does using a quarter of a circle in the upper right quadrant not work -is it a problem having $i$ on the contour of integration?  My second idea was to let $$\sqrt{t}=e^{\frac{1}{2}\operatorname{log}t}$$  And defining the branch of the logarithm to be the negative imaginary axis. Then using an upper semi-circular contour. With a hole at 0, which will tend to the point 0 as the radius of the semi circle tends to infinity. Then we'll divide by two to get the integral from $0$ to $\infty$. Does this work, as this does not seem to be an even function we're integrating.  I apolygise for the poor explanation of my contours, it's quite difficult without pen and paper!  EDIT: Ok, so using an upper semi circle, with a semicircular hole about $0$. let us call the contour $\gamma$, we have:  $$\int_\gamma \frac{e^{\frac{1}{2}\operatorname{log}t}}{1+t^2}dt =2\pi i\Big(\frac{e^{\frac{1}{2}\operatorname{log}t}}{t+i}\Big)\Big|_{t=i}=\frac{e^{\pi/4}}{2i}$$  But by letting on the positive real axis $z=x+iy$ implies $log(z)=log(x)+0$ and on the negative axis $log(z)=log(x)+\pi$ Therefore if we tend the large arc's radius to infinity and the small arc about the origin's radius to zero we find the integral along the arc tends to zero. So  $$\int_\gamma \frac{e^{\frac{1}{2}\operatorname{log}t}}{1+t^2}dt=\int_0^\infty \frac{\sqrt{x}}{1+x^2} dx+\int_0^\infty \frac{\sqrt{x}e^{\pi/2}}{1+x^2} dx=(1+e^{\pi/2})\int_0^\infty \frac{\sqrt{x}}{1+x^2} dx$$  $$\Rightarrow \int_0^\infty \frac{\sqrt{x}}{1+x^2} =\frac{e^{\pi/4}}{2i(1+e^{\pi/2})}$$  This is wrong but can anyone point out what mistake I have made here?
94284
This is a nice problem. I am trying to use nice methods to solve this integral, But I failed.  $$\int_{-1}^{1}\dfrac{\arctan{x}}{1+x}\ln{\left(\dfrac{1+x^2}{2}\right)}dx, $$  where  $\arctan{x}=\tan^{-1}{x}$  mark: this integral is my favorite one. Thanks to whoever has nice methods.  I have proved the following:  $$\int_{-1}^{1}\dfrac{\arctan{x}}{1+x}\ln{\left(\dfrac{1+x^2}{2}\right)}dx=\sum_{n=1}^{\infty}\dfrac{2^{n-1}H^2_{n-1}}{nC_{2n}^{n}}=\dfrac{\pi^3}{96}$$  where $$C_{m}^{n}=\dfrac{m}{(m-n)!n!},H_{n}=1+\dfrac{1}{2}+\dfrac{1}{3}+\cdots+\dfrac{1}{n}$$  I also have got a few by-products  $$\int_{-1}^{1}\dfrac{\arctan{x}}{1+x}\ln{\left(\dfrac{1+x^2}{2}\right)}dx=-I_{1}-2I_{2}$$  where $$I_{1}=\int_{0}^{1}\dfrac{\ln{(1-x^2)}}{1+x^2}\ln{\left(\dfrac{1+x^2}{2}\right)}dx=\dfrac{\pi}{4}\ln^2{2}+\dfrac{\pi^3}{32}-2K\times\ln{2}$$  and $$I_{2}=\int_{0}^{1}\dfrac{x\arctan{x}}{1+x^2}\ln{(1-x^2)}dx=-\dfrac{\pi^3}{48}-\dfrac{\pi}{8}\ln^2{2}+K\times\ln{2}$$  and same methods,I have follow integral $$\int_{0}^{1}\dfrac{\ln{(1-x^4)}\ln{x}}{1+x^2}dx=\dfrac{\pi^3}{16}-3K\times\ln{2}$$ where $ K $ denotes Catalan's Constant.
3109
$$\int \frac{6x^{3}+7x^2-12x+1}{\sqrt{x^2+4x+6}}dx$$  I have met this complex integral today, how do you evaluate this? Can you do this in more steps?  Is this an elliptic integral? I don't know how to evaluate this integral at all.
12582
My problem is to integrate this expression:  $$\int_0^{2\pi}\log(1-2r\cos x +r^2)dx.$$ where $r$ is any constant in $[0,1]$.  I know the answer is zero. Can you explain you idea to me or just prove that? Maybe you will use the "Cauchy integral theorem ".
64979
Find $$\int_{-\infty}^{\infty}\frac{1}{(x^2+b^2)^2}dx$$   We see that the only poles are at $x=\pm bi$.  Integrating over the semicircular contour implies that it is equal to $2\pi i*Res_{(+bi)}$ because the integral over the circular arc is $0$.  So now I just need to calculate the residue at $+bi$. Can anyone give hints on how to do this?  I was thinking about multiplying by $(x-bi)^2$ and then evaluating at $bi$ but I'm not sure why this even makes sense.
1632
A famous exercise which one encounters while doing Complex Analysis (Residue theory) is to prove that the given integral: $$\int\limits_0^\infty \frac{\sin x} x \,\mathrm  dx = \frac \pi 2$$ Well, can anyone prove this without using Residue theory?  I actually thought of using the series representation of $\sin x$: $$\int\limits_0^\infty \frac{\sin x} x \, dx = \lim\limits_{n \to \infty} \int\limits_0^n \frac{1}{t} \left( t - \frac{t^3}{3!} + \frac{t^5}{5!} + \cdots \right) \,\mathrm  dt$$ but I don't see how $\pi$ comes here, since we need the answer to be equal to $\dfrac{\pi}{2}$.
25146
Evaluate $$ \int_{1}^{\infty} \left(\frac{1}{\,\sqrt{\, x^{2} + 4\,}\,} - \frac{C}{x + 2}\right)\,\mathrm{d}x $$  I am stuck at this question where I should find the value of C for which the integral converges and evaluate the integral for this value of C. Any hints or answers&nbsp;??.
120960
Prove $$\int_0^\infty \frac{(\pi x - 2\log{x})^3}{\left(\log^2{x} + \frac{\pi^2}{4}\right)(1+x^2)^2} \text{d}x = 8\pi$$   I tried using a modified version of the integrand and an origin-indented semicircular contour on the positive real half of the complex plane.  Despite my best efforts, I am unable to retrieve the desired integral, as the negative factor from the negative imaginary axis is preventing me from being able to simplify the integrals.  On top of that, the residue doesn't come anywhere close to the exact result.  Are there better methods that I am missing?
91157
Question:   Compute $$\int _0 ^{2\pi} \left(\sum_{n=1}^\infty \frac {\cos(nx)}{2^n}\right)^2 dx$$   Thoughts: Tried interchanging the integral and the sum, but then the integral turned out to be zero...
111197
$$\int_{-\infty}^{\infty} \frac{\cos(mx) dx}{e^{-x}+e^x} = \frac{\pi}{e^{m\pi /2}+e^{-m\pi /2}}$$  I need to evaluate the above integral specifically using a rectangluar contour and at some point applying the residue theorem. I should be ok with the residue part, but I'm confused at to how to get this into the example form shown in the book:  $$I =\int_{-\infty}^{\infty} \frac{e^{ax}dx}{1+e^x}=\frac{\pi}{\sin(a\pi)} $$  I tried using the identity $\cos (mx) = \frac{e^{ix}+e^{-ix}}{2}$ but I end up with $\frac{1}{2} \int_{-\infty}^{\infty}\frac{e^{ix}(e^{imx}+e^{-imx})dx}{1+e^{2ix}}$, which almost resembles the example but not quite...
47738
While solving another problem I have come across this integral which I am unable to evaluate. Can someone please evaluate the following integral? Thank you.      $$\int_0^{2\pi}\frac{1}{(2+\cos\theta)^2}\,d\theta.$$
101093
Suppose that we do not know anything about the complex analysis (numbers). In this case, how to calculate the following integral in closed form? $$\int_0^\infty\frac{\cos x}{1+x^2}\,\mathrm{d}x$$
72050
Evaluate the following integral:  $$\int \frac{\sqrt{\sin ^4x+\cos ^4x}}{\sin ^3x \cos x }dx$$ where $x \in \big(0,\frac{\pi}{2} \big)$  Could some give me hint as how to approach this question?  I tried to use the fact that $\sin ^4x+\cos ^4x=1-\frac{sin^22x}{2}$ but it didn't help. How should I proceed?