TITLE: Vector Calculus Proof: $\oint_K \nabla f\cdot \vec n\,ds$ has two possible values
QUESTION [6 upvotes]: I'm looking over the last chapter in my University Calculus (2nd edition) text by Hass, Weir, and Thomas.  I came across the following problem (not homework), with which I have had some difficulty.

Let $K$ be an arbitrary smooth, simple closed curve in the plane that does not pass through $(0, 0)$.  Use Green's Theorem to show that
  $$\oint_K \nabla f\cdot \vec n\,ds$$
  has two possible values, depending on whether $(0, 0)$ lies inside $K$ or outside $K$.
Problem 15.4.39b, page 869

I don't really want to see the whole answer, but I would like some guidance as to what sort of route I should take.

Here's what I've done:
Let $K$ be an arbitrary smooth, simple closed curve in the plane that does not pass through $(0, 0)$.  Let $D$ be the region bordered by $K$.
Let $f(x, y)$ be a function with continuous $2^\text{nd}$ partial derivatives on $D$.
(Question: do I need to specify that $f$ has continuous 2nd partial derivatives?  I think so, to fulfill the qualifications on Green's Theorem...)
Then: 
$$\begin{align}
\oint_K \nabla f\cdot \vec n\,ds &= \iint_D \frac{\partial}{\partial x}\left[\frac{\partial f}{\partial x}\right] + \frac{\partial}{\partial y}\left[\frac{\partial f}{\partial y}\right]\, dA \\
&=  \iint_D \frac{\partial^2 f}{\partial x^2} + \frac{\partial^2 f}{\partial y^2}\, dA \\
\end{align}$$
At this point, I know that the integrand is the right-hand-side of Laplace's equation, but I don't see how that applies.  I also know that this is the divergence of $\nabla f$, but I don't see how that applies, either.
Could I have a push/shove in the right direction? :)

REPLY [3 votes]: A side note of oen's answer:
The all time favorite potential in oen's answer is the fundamental solution of the Laplace equation in $\mathbb{R}^2$, i.e., and $\Delta \phi = 2\pi \delta_{(0,0)}(x,y)$, where $\delta $ is the Dirac delta at the origin:
$$
\phi = \ln\sqrt{x^2+y^2}.
$$
The gradient of $\phi$ above is
$$
\nabla \phi = \left(\frac{x}{x^2+y^2}, \frac{y}{x^2+y^2}\right),
$$
if rotated by $\pi/2$ counter-clockwisely, we get the gradient of the second all time favorite potential, polar angle, $\theta = \arctan(y/x)+C$:
$$
\nabla \theta = \left(-\frac{y}{x^2+y^2}, \frac{x}{x^2+y^2}\right),
$$
And we have:
$$
\oint_K \nabla\phi \cdot \mathbf{n}\,ds  = \oint_K \nabla \theta\cdot d\mathbf{r}, \tag{$\star$}
$$
where $d\mathbf{r} = (dx,dy)$ is a vector parametrization of the curve $K$, first is computing the flux of $\nabla \phi$ going outside of the region this closed curve $K$ bounded, the second is computing the work of flow field $\nabla \theta$ made on a unit mass particle, when this particle is driven by this field rotating around $K$ for once.
Now $(\star)$ over $2\pi$ will get you the winding number if $K$ is "winding" around $(0,0)$. Now the curve is simple, the winding number is $\pm 1$, depending on whether $K$ is rotating counter-clockwisely or clockwisely around $(0,0)$. Also I should add that $1$ and $-1$ are not "the two possible values" OP mentioned in the question, for a fixed simple curve $K$, the values are $0$ and one value from $\pm 1$.
If $K$ is not simple, what you obtain is:
$$\oint_K \nabla\phi \cdot \mathbf{n}\,ds  = \oint_K \nabla \theta\cdot d\mathbf{r}  = 2n\pi, \quad n\in \mathbb{Z}.$$
Relevant question: Green's theorem and flux