<s>[INST] Evaluating integral using residue calculus Evaluating the following using residue calculus:
$$I = \int_0^{2\pi} {sin^4\theta}d\theta$$
I have simplified to:
$$\oint_{\lvert z \rvert = 1} \frac{(z^2-1)^4}{16iz^5}$$
z= 0 is the isolated singular point here.
Let 
$$g(z) = (z^2 -1)^4 $$ and
$$h(z) = 16iz^5$$
$h(z)$ has a zero of order 5 at $z = 0$
$g(z)$ and $h(z)$ are analytic at $z = 0$, $h(0) = 0$, $g(0)\neq 0$
Thus $f(z)$ has a pole of order 5 at$z=0$. Then use the formula:
$$Res[f(z), z_0] = \lim_{z\to 0} \frac{1}{(N-1)!}*\frac{d^(N-1)}{dz^(N-1)}[(z-z_0)^Nf(z)]$$
However, taking the 4th degree derivative of $g(z)$ over $h(z) is super messy. What did I do wrong and is there a way to do it cleaner?
Edit:
So I expanded:
$$Res[f(z), 0] = \lim_{z\to 0} \frac{1}{(5-1)!}*\frac{d^4}{dz^4}[(z-0)^5*\frac{(z^2-1)^4}{16iz^5}]$$
$$Res[f(z), 0] = \lim_{z\to 0} \frac{1}{4!}*\frac{d^4}{dz^4}[z^5*\frac{(z^2-1)^4}{16iz^5}]$$
$$Res[f(z), 0] = \lim_{z\to 0} \frac{1}{384i}*\frac{d^4}{dz^4}[z^8-4z^6+6z^4-4z^2+1]$$
$$Res[f(z), 0] = \lim_{z\to 0} \frac{1}{384i}*\frac{d^3}{dz^3}[8z^7-24z^5+24z^3-8z]$$
$$Res[f(z), 0] = \lim_{z\to 0} \frac{1}{384i}*\frac{d^2}{dz^2}[56z^6-120z^4+72z^2-8]$$
$$Res[f(z), 0] = \lim_{z\to 0} \frac{1}{384i}*\frac{d}{dz}[336z^5-480z^3+144z]$$
$$Res[f(z), 0] = \lim_{z\to 0} \frac{1}{384i}*(1680z^4-1440z^2+144)$$
$$Res[f(z), 0] = \lim_{z\to 0} \frac{144}{384i} = \frac{3}{8i}$$
So the result is $\frac{3\pi}{4}$
Appeared I have solved it typing this. Lol.... SMH
 [/INST] $\oint_{|z| = 1} \frac {(z^2-1)^4}{16i z^5} \ dz$ 
Rather than differentiating (which is legit, but not necessary) find the Laurent series.  Which just means expanding the binomial.
$\frac {1}{16i z^5} - \frac {4}{16i z^3} + \frac {6}{16i z} - \frac {4}{16i} z  +\frac {1}{16i} z^3$ 
$\frac {6}{16i z}$ is the only term you care about to calculate the residual.
$(\frac 2\pi i) \frac {6}{16i z} = \frac {3\pi}{4}$
</s>