# 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.

-
Welcome to math.SE: since you are new, I wanted to let you know a few things about the site. In order to get the best possible answers, it is helpful if you say in what context you encountered the problem, and what your thoughts on it are; this will prevent people from telling you things you already know, and help them give their answers at the right level. If this is homework, please add the homework tag; people will still help, so don't worry. Also, many find the use of imperative ("Prove", "Solve", etc.) to be rude when asking for help; please consider rewriting your post. – Julian Kuelshammer Feb 25 '13 at 15:35
@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