f(x) as defined is a non-periodic function. Effectively it’s f(x)=1 for x∈(-5,5) and zero otherwise. So the following applies:
F(k)=(1/2π)∫f(x)e^(-ikx)dx[-∞,∞]=
(1/2π)∫e^(-ikx)dx[-5,5] because the function only exists in the narrow range [-5,5].
F(k)=(-1/(2πik))(e^(-5ik)-e^(5ik)).
e^(-5ik)=cos(5k)-isin(5k),
e^(5ik)=cos(5k)+isin(5k).
e^(-5ik)-e^(5ik)=-2isin(5k).
So F(k)=(1/(πk))sin(5k) (Fourier Transform).