Flux integral of a vector field across a circle. Let $f(x,y) = \ln ( x^{2} + y^{2})$ and $C$ be the circle $x^{2} + y^{2} = a^{2}$ then find the flux integral $ \int_{C} \text {grad} f.n ds$
$ \int_{C} \text {grad} f.n ds = \int_{C} \frac{2xi + 2yj}{x^{2} + y^{2}} . \frac{2xi + 2yj}{( 4x^{2} + 4y^{2})^{1/2}} ds$
$= \int_{C} \text {grad} f.n ds =  \int_{C} \frac{( 4x^{2} + 4y^{2})^{1/2}}{ x^{2} + y^{2}} ds$
$=(2/a) \int_{C} ds$
What do we put the value of $ds$. If it is the area of the circle then the flux integral is $2 \pi a$ and if it is arc length, then it is $4\pi$ 
For flux it should be area. Still I'm confused.
Answer is given $2 \pi$, which is neither of both.
What is $ds$ here$?$ Moreover, why am I not getting the right answer$?$
 A: Thinking of the flux integral in terms of the line integral makes it much easier:
if $F$ is a vector field, then the flux of the field across a boundary $C$ is the line integral over $C$ of the normal component of the vector field.
which means that the flux integral of this vector field across a boundary C :$$F\left(x,y\right)=\begin{pmatrix}\:P\left(x,y\right)\\ Q\left(x,y\right)\end{pmatrix}$$
is just the line integral of this vector field over the boundary C:
$$F\left(x,y\right)=\begin{pmatrix}\:-Q\left(x,y\right)\\ P\left(x,y\right)\end{pmatrix}$$
Now applying the previous on your problem, our line integral becomes:
$$\int _c\frac{-2y}{x^2+y^2}dx+\frac{2x}{x^2+y^2}dy$$
which evaluates to $4\pi$ (the correct answer).
Now to strictly answer your question:
In three-dimensions we use the flux integral to calculate the flux across a surface so we use the area of the surface, but in two-dimensions we use the flux integral to calculate the flux across a boundary, so we use the arc length, 
