# Dimension of subspace in the space of polynomials

Let $W$ be the linear space of polynomials in two variables $x$, $y$ of degree at most $N$, i. e. $$W=\{f\in\mathbb{R}[x,y]:\deg(f)\leq N\}$$ Consider subspace $$V=\left\{f\in W: \oint\limits_{x^2+y^2=R^2} f(x,y)ds=0\quad\mbox{for all R>0} \right\}$$ Question: How can I find $\dim(V)$?

Attempt: I reduced this problem to the computation of the rank of certain matrix but this looks like wrong way.

If we denote the homogeneous part of $f$ of degree $k$ by $f_k$, we see that

\begin{align} I(R) &:= \int\limits_{x^2+y^2 = R^2} f(x,y)\,ds\\ &= \int\limits_{x^2+y^2=R^2} \sum_{k=0}^N f_k(x,y)\,ds\\ &= \sum_{k=0}^N \int\limits_{x^2+y^2=R^2} f_k(x,y)\,ds\\ &= \sum_{k=0}^N \int\limits_{x^2+y^2=1}f_k(x,y)\,ds\cdot R^{k+1}, \end{align}

so the integral of each homogeneous part must vanish.

By symmetry, the integral of each monomial $x^\alpha y^\beta$ vanishes when $\alpha$ or $\beta$ is odd, and is strictly positive when $\alpha$ and $\beta$ are both even.

So for odd $k$, the integral vanishes for all monomials of degree $k$, and for even $k = 2m$, we have $m$ monomials where the exponent of $x$ and $y$ is odd, so their integral vanishes, and for $\mu = 0,\dotsc,m-1$, we have a homogeneous polynomial $x^{2\mu}y^{2(m-\mu)} - c_\mu\cdot x^{2m}$ of degree $k$ whose integral vanishes, and these $k$ homogeneous polynomials are linearly independent.

So overall, we lose one dimension for every even $0 \leqslant k \leqslant N$, whence

$$\dim V = \sum_{k=0}^N (k+1) - \left(\left\lfloor \frac{N}{2}\right\rfloor + 1\right) = \frac{(N+1)(N+2)}{2} - \left\lfloor \frac{N+2}{2}\right\rfloor.$$