# Finding the Residue of this function

1. Mar 17, 2012

### d2j2003

1. The problem statement, all variables and given/known data

The original problem is to find the integral from 0 to 2$\pi$ of $\frac{1}{2\pi}e^{cosθ}cos(2θ)$

2. Relevant equations

I have it down to two equations which I believe I have to find the residues of and add the results, multiply by 2$\pi$i and I will have my answer.

3. The attempt at a solution

Have 1/2(∫e$^{1/2(z+1/z)}$*z + ∫e$^{1/2(z+1/z)}$*(1/z$^{3}$)

so I believe I have to find Res(e$^{1/2(z+1/z)}$*z) and Res(e$^{1/2(z+1/z)}$*(1/z$^{3}$)

If this is correct I really am unsure of how to find these residues..

2. Mar 17, 2012

### jackmell

You can find the residue of $z e^{\frac{z^2+1}{2z}}$ by using the Cauchy product:

$$ze^{\frac{z^2+1}{2z}}=z\sum_{n=0}^{\infty} \frac{z^n}{2^n n!} \sum_{n=0}^{\infty} \frac{1}{2^n n! z^n}=z\sum_{n=0}^{\infty}\sum_{k=0}^n \frac{z^k}{2^k k!} \frac{1}{2^{n-k} (n-k)! z^{n-k}}$$

Now that double sum, get all the z's together on one side. Then that's $z^{1+k-(n-k)}$ right? When does that exponent equal -1? When ever 2k+2=n right? Now we only want the coefficients of 1/z for that to sum them up (the resisue is an infinite sum). So we need to sum all the k-values when n=2k+2. So form the inner sum using only the coefficients when n=2k+2 and compute:

$$\sum_{k=0}^{\infty} ?$$

3. Mar 17, 2012

### d2j2003

If I do all of that I get $\sum^{∞}_{k=0}\frac{1}{(k+2)!(2k+2)2^{3k+4}}$ as the coefficient of $\frac{1}{z}$

so this would be the residue right? Then I just have to do the same thing for the other residue and add them and multiply by 2$\pi$i according to the residue theorem...

4. Mar 18, 2012

### jackmell

Try to check them in Mathematica. It's not hard:

Code (Text):

In[2]:=
NIntegrate[z*Exp[(z^2 + 1)/(2*z)]*I*Exp[I*t] /.
z -> Exp[I*t], {t, 0, 2*Pi}]

Out[2]=
5.551115123125783*^-16 + 0.8529277641641219*I

In[3]:=
Sum[1/(2^k*k!*(k + 2)!*2^(k + 2)), {k, 0, Infinity}]

Out[3]=
BesselI[2, 1]

In[4]:=
N[2*Pi*I*BesselI[2, 1]]

Out[4]=
0. + 0.8529277641641214*I

5. Mar 18, 2012

### d2j2003

i'm sorry i'm kind of lost with the mathematica stuff (don't have the program).. but why did you integrate z*e^((z^2+1)/2z)*i*e^(it) ? I don't understand where the i*e^(it) came from at the end..

6. Mar 18, 2012

### d2j2003

I understand everything you said about using the Cauchy product.. and went through all of that and then created a single sum from 0 to infinity substituting n=2k+2 to create the coefficient of the 1/z term in the sum, which I thought was the residue... where am I going wrong here?

Thanks for the help

7. Mar 18, 2012

### jackmell

The residue of $\displaystyle z e^{\frac{z^2+1}{2z}}$ is $\displaystyle\sum_{k=0}^{\infty} \frac{1}{2^k k! (k+2)! 2^{k+2}}$

That's what you should get when you make the substitution n=2k+2. So we can check that by numerically integrating:

$$\mathop\oint\limits_{|z|=1} z e^{\frac{z^2+1}{2z}}dz$$

Now let $z=e^{it}$ so that $dz=ie^{it}$

and substitute that into the integral above to get:

$$\int_0^{2\pi} z e^{\frac{z^2+1}{2z}}ie^{it}dt,\quad z=e^{it}$$

That's what I coded in Mathematica.

8. Mar 18, 2012

### d2j2003

ahh ok I see now.. so I did the same for the other residue (with 1/z^3 instead of z) and found that the sum is 1/z when n=2k-2 so substituted and got $\sum^{∞}_{k=0}\frac{1}{k!(k-2)!2^{k-1}}$

then added the two residues and multiplied by 1/2 to get $\sum^{∞}_{k=0}\frac{1}{k!(k-2)!2^{k}}$

(multiplied by $\frac{1}{2}$ because the original integral had $\frac{1}{4*\pi*i}$ in front before finding residues so $\frac{1}{4*\pi*i}$ * 2$\pi$*i = $\frac{1}{2}$

I think this is correct.. Thanks again for your help