# Is this the answer for what is the residue of f(z)=e^z/[(z-1)^2(z+2)]

## Homework Statement

This was an exam question I had today:

Give the location and order of each pole of
f(z)=e^z/[(z-1)^2(z+2)]
and evaluate the reside at these points

## Homework Equations

Res(f(z)) = g(p-1)(a) / (p-1)!

## The Attempt at a Solution

g(z) = e^z/(z+2)
g'(z) = -e^z/(z+2)^2
let a=1
g'(1) = -e^1/9

So res(f,1) = -e/9

Then I did
g(z) = e^z/(z-1)^2
(this is the part I think I might have stuffed up, because I did use the formula above but I had m=1 for f(z) which was 1/(z+2) so I thought it was right??? anyways I got

g(-2) = e^(-2) / (-3)^2 = res(f,-2)=1/(9e^2)

It would mean a lot to me if someone could let me know because I am trying to work out if I should be depressed because I failed or if I can be happy because I passed :)

$$g\left( z \right) = \frac{{e^z }}{{\left( {z + 2} \right)}} \Rightarrow g'\left( z \right) = \frac{{e^z }}{{\left( {z + 2} \right)}} - \frac{{e^z }}{{\left( {z + 2} \right)^2 }}$$