Artificial intelligent assistant

Limit of a complex function (resulting in divide by zero situations) I have the following limit which I'm attempting (and failing) to evaluate: $\lim_{x \to i} (z-i)\frac{e^{imz}}{(z^2+1)^2}$ Evaluating directly, we get $\frac{0}{0}$, so can rewrite using L'Hopital's rule and get: $\lim_{x \to i} \frac{e^{imz}(1+m+imz)}{4z(z^2+1)}$ Now, evaluating yields $\frac{e^{-m}}{0}$ which is clearly undefined. As this limit makes up part of a larger (assignment) proof question, I'm pretty sure that there is a defined limit, but I'm not sure how to find it. Any hints/pointers in the right direction would be appreciated. **EDIT:** The original assignment question is: Show that $\int_{0}^{\infty}\frac{cos(mx)}{(x^2+1)^2}dx=\frac{\pi e^{-m}(1+m)}{4}$ where m > 0 This is a very similar question to one that the lecturer did during a lecture, given below. So I'm trying to use the same approach. Hopefully this helps give context (perhaps I've gone wrong somewhere else). !example

With a double root $a$ in the denominator, combine all the other terms into a function $f(z)$. Then your expression has the form $$ \frac{f(z)}{(z-a)^2}=\frac{f(a)+f'(a)(z-a)+(z-a)^2r(z)}{(z-a)^2} $$ where the remainder $r(z)$ is holomorphic close to $a$. Thus the residuum results from the linear term in the numerator and is $f'(a)$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1856b4c1f57fdb69e2e0322d80782de9