A known result on Fourier analysis states that if $f$ and its Fourier transform are in $C_0^{\infty}(\mathbb R)$, then $f$ must vanish. This may also be regarded as a special case of a result by Hardy.
My question is: Does anyone know whether a similar result holds if $f$ and its cosine Fourier transform are in $C_0^{\infty}(\mathbb R)$, then must $f$ vanish?
Thanks a lot.
Notice that any odd function $f$ (i.e. such that $\forall t\in\mathbb{R}, f(-t)=-f(t)$) that is also in $C^\infty_c(\mathbb{R})\backslash \{0\}$ is a counterexample. In fact, if $f$ is such a function (and there are a lot of these functions), then: $$\forall\xi\in\mathbb{R}, \int_{\mathbb{R}}f(t)\cos({2\pi t\xi})\operatorname{d}t=\int_0^{\infty}f(t)\cos({2\pi t\xi})\operatorname{d}t+\int_{-\infty}^0f(t)\cos({2\pi t\xi})\operatorname{d}t=\\=\int_0^{\infty}f(t)\cos({2\pi t\xi})\operatorname{d}t-\int_{-\infty}^0f(-t)\cos({2\pi t\xi})\operatorname{d}t\\=\int_0^{\infty}f(t)\cos({2\pi t\xi})\operatorname{d}t-\int_{0}^{\infty}f(t)\cos({-2\pi t\xi})\operatorname{d}t\\=\int_0^{\infty}f(t)\cos({2\pi t\xi})\operatorname{d}t-\int_{0}^{\infty}f(t)\cos({2\pi t\xi})\operatorname{d}t=0.$$ so $f$ has a vanishing cosine Fourier transform, so in particular is in $C^\infty_c(\mathbb{R})$, but $f$ is not the null function.
However, you can recover a positive result if you require that your function is even. In fact, in this case, its sine Fourier transform identically vanish (with a similar argument as before) and by requiring that the cosine Fourier transform is an element of $C^\infty_c(\mathbb{R})$, from: $$\forall \xi\in\mathbb{R},\hat{f}(\xi)=\int_\mathbb{R}f(t)e^{-2\pi i\xi t}\operatorname{d}t=\int_{\mathbb{R}}f(t)\cos(-{2\pi t\xi})\operatorname{d}t+i\int_{\mathbb{R}}f(t)\sin({-2\pi t\xi})\operatorname{d}t\\=\int_{\mathbb{R}}f(t)\cos({2\pi t\xi})\operatorname{d}t,$$ you get that $\hat{f}\in C^\infty_c(\mathbb{R})$ and you can apply the result you quoted in your question.