Fourier Transform of Window Function Im trying to fourier transform the following function:
$$W(\textbf{x},R)= \begin{cases}
 \frac{3}{4\pi R^3},&\text{if r < R}\\
0,&\text{if  r>R} \end{cases}$$
where $r = |x|$.
I've tried to put $x$ in spherical coordinates, so:
$$ x = (r\cos(\theta)\sin(\phi),r\sin(\theta)\sin(\phi),r\cos(\theta))$$ and then I have to calculate the following integral:
$$\tilde{W}(\textbf{k},R)=\int_{0}^{2\pi} \int^{\pi}_{0} \int_{0}^{R} e^{-i\textbf{k.x}} \ r^2 \sin(\theta) \ dr d\theta \ d\phi $$.
which I couldn't do...
Is there a simpler way to do that? Or the integral can be solved?
 A: Let $\tilde W(\vec k,R)$ be the function represented by the Fourier integral
$$\tilde W(\vec k,R)=\frac{3}{4\pi R^3}\int_0^{2\pi}\int_0^\pi \int_0^R e^{i\vec k\cdot \vec r}r^2\sin(\theta)\,dr\,d\theta\,d\phi$$
We can rotate our coordinate system so that $\hat z$ aligns with $\vec k$.  Then, we can write
$$\begin{align}
\tilde W(\vec k,R)&=\frac{3}{4\pi R^3}\int_0^{2\pi}\int_0^\pi \int_0^R e^{i k  r\cos(\theta)}r^2\sin(\theta)\,dr\,d\theta\,d\phi\\\\
&=\frac{3}{2 R^3} \int_0^\pi\int_0^Re^{i k  r\cos(\theta)}r^2\sin(\theta)\,dr\,d\theta\\\\
& =\frac{3}{2 R^3}  \int_0^R r^2\int_0^\pi e^{i k  r\cos(\theta)}\sin(\theta)\,d\theta\,dr\\\\
&=\frac{3}{2 R^3}  \int_0^R r^2 \left.\left(-\frac{e^{ikr\cos(\theta)}}{ikr}\right)\right|_{0}^{\pi} \,dr\\\\
&=\frac{3}{2 R^3}  \int_0^R r\left(\frac{e^{ikr}-e^{-ikr}}{ik}\right)\,dr\\\\
&=\frac{3}{kR^3}\int_0^R r\sin(kr)\,dr\\\\
&=3\left(\frac{\sin(kR)-(kR)\cos(kR)}{(kR)^3}\right)
\end{align}$$
A: The transform of a window function, is the transform of a positive step at beginning and a negative step at the end.
Since you want to calculate an integral of a function depending on the dot product of $\mathbb x$ with another vector$\mathbb v$, over the sphere $|\mathbb x|\leqslant R$, then take the "z" axis  in the direction of $\mathbb v$ and the integral will be easily computed.
In the spherical coordinates you gave, note that the $z$ component of $\mathbb x$ should be $r cos\phi$.
