No, a function does not have to be piecewise for a Fourier integral. Fourier integrals apply to any function that is integrable over an interval. The function, however, must satisfy Dirichlet’s conditions.