# Compute using Complex Analysis: integral

I am studying a practice midterm and do not know what I need to do to solve this problem?

Compute using Complex Analysis:

$$\int\limits_{|x|=2}\frac{x}{\cos (x)}\mathrm{dx}$$

I tried using a power series to solve, but that did not get me anywhere.

-
@Tom: You should keep the question as it is and if you want to ask a new question you can ask on a new post. The old question was $\int\limits_{|x|=2}\frac{x}{\cos(x)}\mathrm{dx}$ –  Mhenni Benghorbal Feb 25 '13 at 19:06

Hint: You have two poles inside the contour, namely $x=\pi/2,-\pi/2$.

$$\int\limits_{|x|=2}\frac{x}{\cos(x)}\mathrm{dx}.$$

Added: Here is how you compute the residue at $x=\pi/2$. Since $x=\pi/2$ is a simple pole, then we have

$$r = \lim_{x \to \frac{\pi}{2}} (x-{\pi}/{2})\frac{x}{\cos(x)}=\lim_{x\to \pi/2}\frac{x}{\frac{\cos(x)-0}{x-\pi/2}}=\frac{\pi/2}{-1}= -\pi/2.$$

Now, you can finish the problem.

-
So I integrate from π/2 to −π/2? –  Tom Feb 25 '13 at 15:35
@Tom: You need to use residue theorem or Cauchy formula. You compute the residue at each point then you add them. –  Mhenni Benghorbal Feb 25 '13 at 15:42
for x=-pi/2 would the answer be: x/cos(x)*x+(pi/2)= pi/2 as x goes to -pi/2 Therefore adding these equals zero –  Tom Feb 25 '13 at 16:30