When analyzing the diffraction patterns of x-rays on crystals, we utilize the formula for the scattering intensity ($I(\vec{K})$):
$I(\vec{K})\propto \left|\sum_G \rho_G\int_V e^{i(\vec{G}-\vec{K})\cdot \vec{r}}dV\right|^2 \tag{1}$ where $\rho(\vec{r})=\sum_G \rho_Ge^{i\vec{G}\cdot \vec{r}}$ is the scatterer density (i.e electron density), and $\vec{K}\equiv \vec{k'}-\vec{k}$ is the difference between the scattered wave vector $\vec{k'}$ incident wave vector $\vec{k}$. Note that the integral above is performed over the volume of the whole crystal. My textbook then says that because the integral is over a plane wave with wave vector $\vec{G} −\vec{K}$ , if the crystal is very large, the integral will average over the crests and troughs of the wave and end up being very small (or even zero) unless $\vec{K}=\vec{k'}-\vec{k}=\vec{G}$ in which case the exponential becomes one and the integral will equal the crystal volume. It is this last paragraph that I take issue with for suppose that the crystal at hand is a perfect cube of side length $L$. Also suppose that $\vec{K}\neq \vec{G}$ so that $\vec{G} −\vec{K}\equiv \vec{q}=(q_1,q_2,q_3)$ where atleast one of the $q_i$ is non zero. In this case we have $$\int_V e^{i\vec{q}\cdot \vec{r}}dV=\int_{-L/2}^{L/2} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} e^{i\vec{q}\cdot \vec{r}} dxdydz=\frac{8 \sin \left(\frac{q_x L}{2}\right) \sin \left(\frac{q_y L}{2}\right) \sin \left(\frac{q_z L}{2}\right) }{q_x q_y q_z} \tag{2}$$ This result approaches $L^3$ as $|\vec{q}|\rightarrow 0$ and approaches zero as $|\vec{q}|\rightarrow \infty$ which are expected results. My primary issue is that the result of the above integral becomes totally different if we change the bounds of the integral from $(\frac{-L}{2},\frac{L}{2})$ to $(0,L)$. This should not be the case because we are still effectively integrating over the same volume. We are merely labeling its "corners" differently. Using these new bounds, we get that
$$\int_{0}^{L} \int_{0}^{L} \int_{0}^{L} e^{i\vec{q}\cdot \vec{r}} dxdydz=\frac{i \left(-1+e^{i L q_1}\right) \left(-1+e^{i L q_2}\right) \left(-1+e^{i L q_3}\right)}{q_1 q_2 q_3}$$ which is not only no longer similar to the sinc function but now it is imaginary. Why do we get this discrepancy when we simply choose to change the starting and ending points of the bounds for the integral?