Finding residues at a point $a$ where $a$ is a pole. I am faced with the following problem:

(a) Find $\displaystyle res_{a} \frac{\varphi(z)}{(z-a)^{n}}$ where $\varphi$ is a given function analytic at $a$, $\varphi(a) \neq 0$, and $n$ is a positive integer.
(b) Suppose $a$ is a simple pole of $f$, and let $\displaystyle  res_{a} f = A$. Find $res_{a}(\varphi f)$

I have come up with solutions for both, but I'm not sure if they're right. Here are my answers to part (a):

(a) Let $\displaystyle f(z) = \frac{\varphi(z)}{(z-a)^{n}}$.  Then, $\displaystyle res_{a}f = \frac{1}{(n-1)!}\lim_{z \to a} \frac{d^{n-1}}{dz^{n-1}}\left( f(z) \cdot (z-a)^{n}\right) = \frac{1}{(n-1)!}\lim_{z \to a}\frac{d^{n-1}}{dz^{n-1}}\left( \frac{\varphi(z)}{(z-a)^{n}} \cdot (z-a)^{n} \right) = \frac{1}{(n-1)!} \lim_{z \to a} \frac{d^{n-1}}{dz^{n-1}}\varphi(z) = \frac{1}{(n-1)!}\lim_{z \to a} \varphi^{(n-1)}(z) = \frac{1}{(n-1)!} \varphi^{(n-1)}(a)$
by the analyticity of $\varphi$ at $a$.

And part (b):

(b) If $a$ is a simple pole of $f$, then $\displaystyle res_{a} f = \lim_{z \to a} (z-a)f(z) = A$.  Let $\displaystyle g(z) = f(z) \cdot \varphi(z) = \frac{\psi(z)}{(z-a)}\cdot \varphi(z)$. Then, $\displaystyle res_{a}(\varphi f) = res_{a}g = \lim_{z \to a}(z-a)\cdot g = \lim_{z \to a}(z-a)\cdot \frac{\psi(z) \cdot \varphi(z)}{(z-a)} \\ = \lim_{z \to a}(z-a)\frac{\psi(z)}{(z-a)} \cdot \lim_{z \to a} \varphi(z) = A \cdot \lim_{z \to a}\varphi(z) = A \cdot \varphi(a)$.

I especially think that my answer for part (b) is messed up. I know there is a way to calculate the residue of the quotient of two functions, but I don't think I've applied it correctly here.
In any case, please let me know (1) if what I did here is, in fact, correct, and (2) if it is not correct, what it needs in order to make it correct.
Thank you.
 A: Both parts look fine. Maybe the second could be formulated somewhat simpler. But let's start with

part (a): Since $\varphi$ is analytic at $a$, we can find a series representation as Taylor series
  \begin{align*}
\varphi(z)=\sum_{k=0}^{\infty}\frac{\varphi^{(k)}(a)}{k!}(z-a)^k\tag{1}
\end{align*}
  We obtain
  \begin{align*}
res_a\frac{\varphi(z)}{(z-a)^n}
&=res_a\sum_{k=0}^{\infty}\frac{\varphi^{(k)}(a)}{k!}(z-a)^{k-n}\tag{2}\\
&=\frac{\varphi^{(n-1)(a)}}{(n-1)!}
\end{align*}
according to your result of part a.

Comment:


*

*In (2) we select the coefficient of $(z-a)^{-1}$ and take $k=n-1$ accordingly.



part (b): Since $a$ is a simple pole of $f$ with residuum $A$, we have the representation
  \begin{align*}
f(z)=\frac{A}{z-a}+\sum_{k=0}^{\infty}f_k(z-a)^k
\end{align*}
  If we consider the multiplication of $f$ with $\varphi$, only the coefficient of $(z-a)^0$
  \begin{align*}
\frac{\varphi^{(0)}(a)}{0!}=\varphi(a)
\end{align*}
  contributes to the residuum of $f\cdot \varphi$.
We conclude the following rule is valid if a function $f$ with a simple pole at $a$ is multiplied with an analytic function $\varphi$ at $a$
\begin{align*}
res_a(\varphi f)=\varphi(a)\cdot res_a(f)
\end{align*}
  and
  \begin{align*}
res_a(\varphi f)=\varphi(a)\cdot A
\end{align*}
  follows according to your result of part b.

