<s>[INST] What mistake am I making trying to calculate the line integral $\oint_C3xy^2dx+8x^3dy$. 
Evaluate the line integral
  $$\oint_C3xy^2dx+8x^3dy$$
  where $C$ is the boundary of the region between the circles $x^2+y^2=1$ and $x^2+y^2=64$ having positive orientation.

I actually used Green's theorem to find this. I know $r$ ranges from $1$ to $8$ and $\theta$ ranges from $0$ to $\pi$.
Okay, so I found $\dfrac{d}{dx}8x^3=24x^2$, and $\dfrac{d}{dy}3xy^2=6xy$.
Now I'm integrating $24x^2-6xy$. I converted it to polar coordinates and took the integral and I got $0$. However this is incorrect. What am I doing wrong? 
 [/INST] A direct integration around the two circles involves (by convention) following the larger circle counter-clockwise ("positive" direction) and then the smaller circle clockwise ("negative" direction).  Applying polar coordinates, the integral becomes
$$ \int_0^{2 \pi} \ 3 \ (r \cos \theta) \ (r \sin \theta)^2 \ \ d(r \cos \theta) \ \ + \ \ 8 \ (r \cos \theta)^3 \ \ d(r \sin \theta) $$
with fixed values for $ \ r \ $ .  We would trace the two circles by 
$$ 8^4 \ \int_0^{2 \pi} \ -3 \  \sin^3 \theta \ \cos \theta \   +  \ 8 \ \cos^4 \theta \ \ d \theta $$
$$ - \ \ 1^4 \ \int_0^{2 \pi} \ -3 \  \sin^3 \theta \ \cos \theta \   +  \ 8 \ \cos^4 \theta \ \ d \theta $$
$$ = \ \  ( \ 8^4 - 1 \ ) \   \left( \ [ \ 3 \theta \ + \ 2 \ \sin \ 2 \theta \ + \ \frac{1}{4}  \sin \ 4 \theta \ ] \ + \ [ \ \frac{3}{4} \sin^4 \theta \ ] \ \right) \ \vert_0^{2 \pi}   \ \ . $$
Integrating through one full period, all of the terms except the first produce zeroes.  Thus, the value of the integral is
$$ ( \ 8^4 - 1 \ ) \  \cdot \ 3 \cdot \ 2 \pi \ = \ 6 \pi \ ( \ 8^4 - 1 \ ) \ \ \text{or} \ \ 24570 \pi \ \ . $$
This confirms the result found by Jeb , applying Green's Theorem over the annulus bounded by the two circles.
</s>