Calculating $\operatorname{Res} \left(\frac{f(z)}{g(z)}, z=a\right)$ with $a$ a double zero of $g$. I have to show that for $f,g$ analytic on some domain and $a$ a double zero of $g$, we have:
$$\operatorname{Res} \left(\frac{f(z)}{g(z)}, z=a\right) = \frac{6f'(a)g''(a)-2f(a)g'''(a)}{3[g''(a)]^2}.$$
The problem is that direct calculation using the formula (for pole of order $2$):
$$\operatorname{Res}(h(z),z=a)=\lim_{z \to a} \frac{d}{dz}\left(  (z-a)^2h(z) \right)$$
is extremely ugly, given that we're dealing with a quotient. Is there some sort of trick to make the calculation more manageable?
 A: A little Taylor expansion takes you a long way. Say
$$g(z) = (z-a)^2\left(a_2 + a_3(z-a) + (z-a)^2\cdot \tilde{g}(z)\right)$$
with $a_2 \neq 0$, and
$$f(z) = b_0 + b_1(z-a) + (z-a)^2\cdot \tilde{f}(z).$$
Then
$$\begin{align}
\frac{f(z)}{g(z)} &= \frac{b_0 + b_1(z-a) +(z-a)^2\tilde{f}(z)}{(z-a)^2\left(a_2 + a_3(z-a) + (z-a)^2\tilde{g}(z)\right)}\\
&= \frac{1}{a_2(z-a)^2}\frac{b_0 + b_1(z-a) + (z-a)^2\tilde{f}(z)}{1 + \frac{a_3}{a_2}(z-a) + (z-a)^2h(z)}\\
&= \frac{1}{a_2(z-a)^2}\left(b_0 + b_1(z-a)\right)\left(1-\frac{a_3}{a_2}(z-a)\right) + \tilde{h}(z)\\
&= \frac{c}{(z-a)^2} + \frac{b_1 - (b_0a_3)/a_2}{a_2(z-a)} + k(z),
\end{align}$$
so the residue is
$$\frac{b_1a_2 - b_0a_3}{a_2^2} = \frac{f'(a)\frac12g''(a) - f(a)\frac16g'''(a)}{\left(\frac12g''(a)\right)^2} = \frac{6f'(a)g''(a) - 2f(a)g''(a)}{3g''(a)^2}.$$
That didn't hurt, doctor.
A: Because $a$ is a double zero of $g(z)$, write
$$g(z) = (z-a)^2 p(z)$$
where $p(a) \ne 0$ and is analytic, etc. etc.
Then
$$\operatorname*{Res}_{z=a} \frac{f(z)}{g(z)} = \left [\frac{d}{dz} \frac{f(z)}{p(z)} \right ]_{z=a}$$
Now,
$$\frac{d}{dz} \frac{f(z)}{p(z)} = \frac{f'(z) p(z)-f(z) p'(z)}{p(z)^2}$$
Also, note that
$$g(z) = \frac12 g''(a) (z-a)^2 + \frac16 g'''(a) (z-a)^3+\cdots = p(a) (z-a)^2 + p'(a) (z-a)^3+\cdots$$
Therefore
$$p(a) = \frac12 g''(a)$$
and
$$p'(a) = \frac16 g'''(a)$$
Thus
$$\operatorname*{Res}_{z=a} \frac{f(z)}{g(z)} = \frac{f'(a) \frac12 g''(a) - f(a) \frac16 g'''(a)}{\frac14 [g''(a)]^2}$$
which is equivalent to the formula you seek.
