I want to prove that if $\int_{-\pi}^{\pi} f(x) \cos(nx) = 0 = \int_{-\pi}^{\pi} f(x) \sin(nx)$, for all $n \in \mathbb{N}$ then $f = 0$, where $f$ is a continuous function from $[- \pi, \pi]$ to the reals.
Specifically I want to do this by supposing (for contradiction) that there is a point $x_0 \in [-\pi, \pi]$ such that $f(x_0) \neq 0$. Then I want to consider the inner product of $f$ with $(1 + \cos(x - x_0) - \cos \delta)^n$ for some appropriate $\delta > 0$ and prove the statement, but I'm not sure how to do this, or what the appropriate choice of $\delta$ is. Any and all help appreciated.
Because $f$ is continuous, it suffices to show $\int_{-\pi}^\pi |f(x)|^2\,dx =0.$ This follows from Parseval, which says
$$\int_{-\pi}^\pi |f(x)|^2\,dx = \sum |\hat f(n)|^2,$$
where the $\hat f(n)$ are the Fourier coefficients of $f.$ Those coefficients are all $0$ by the condition assumed in this problem.
Added later in response to the OP's request: There is a constant $a>0$ such that the functions $g_n$ defined by
$$g_n(t)= a\sqrt n((1+\cos t)/2)^n$$
is an "approximate identity" at $0.$ This means that if $f$ is continuous, then
$$\tag 1\int_{-\pi}^\pi f(t)g_n(t)\,dt \to f(0)$$
as $n\to \infty.$
Now each $g_n$ is a trig polynomial, so for $f$ as in our problem, each of these integrals is $0.$ Therefore $f(0)=0.$
Let's now think of $f|_{[-\pi,\pi)}$ as extended to be $2\pi$-periodic on $\mathbb R.$ Let $t_0\in [-\pi,\pi).$ Then
$$\tag 2 \int_{-\pi}^\pi f(t+t_0)g_n(t)\,dt =\int_{-\pi}^\pi f(t)g_n(t-t_0)\,dt= 0.$$
The equality on the right holds because $g_n(t-t_0)$ is a trig polynomial. From $(1),$ applied to $t\to f(t+t_0)),$ we conclude $f(t_0)=0.$ This shows $f\equiv 0$ as desired.