How to evaluate this integral with error term I want to estimate
$$\tag{1}\int_{-A}^A\Big(\int_0^1e^{2\pi i xy}\,dy\Big)^3e^{-2\pi i x}\,dx.$$
I know that somehow this equals $\tfrac12+O(A^2)$. In particular, 
$$\int_{-\infty}^\infty\Big(\int_0^1e^{2\pi i xy}\,dy\Big)^3e^{-2\pi i x}\,dx  = \frac12,$$
and somehow we get an error of $O(A^2)$ (not sure why). 
I tried to evaluate the integral with the infinite limits, I've managed to simplify it to
$$-\frac1{8\pi^3i}\int_{-\infty}^\infty \Big(\frac{e^{4\pi ix/3}-e^{-2\pi ix/3}}x\Big)^3\,dx,$$
but I don't know how to proceed to get $\tfrac12$, and I don't know how evaluating this will allow me to deduce that it differs from $(1)$ by $O(A^2)$. 
 A: After computing the definite inner integral, you face
$$I=\int \frac{e^{i \pi  x} \sin ^3(\pi  x)}{\pi ^3 x^3}\,dx=-\frac i \pi\int \frac{e^t \sinh ^3(t)}{t^3}\,dt \qquad \text{with} \qquad t=i \pi x$$
A CAS gives
$$I=\frac{i}{4 \pi  t^2} \left(t^2 (\text{Ei}(-2 t)+3 \text{Ei}(2 t)-4 \text{Ei}(4 t))+2 e^t \sinh ^2(t) ((t+1)
   \sinh (t)+3 t \cosh (t))\right)$$
$$J=\int_{-A}^A \frac{e^{i \pi  x} \sin ^3(\pi  x)}{\pi ^3 x^3}\,dx=$$
$$\frac{4 \pi ^2 A^2 (\pi-2 \text{Si}(2 A \pi )+4 \text{Si}(4 A \pi ) )-2 \sin (2
   \pi  A)+\sin (4 \pi  A)-4 \pi  A \cos (2 \pi  A)+4 \pi  A \cos (4 \pi  A)}{8 \pi
   ^3 A^2}$$ 
I suppose that I lost somewhere a factor of $2$ since the limit of the above is $1$ while numerical integration confirms $\frac 12$.
A: Use Fourier transform properties. Notice that inside integral can be considered the Fourier transform of a unit rectangular pulse
$$\pi(x) = \mathbf{1}_{[0,1]}$$
Then cubing and taking the inverse Fourier transform means that this equivalent to convolving this pulse with itself twice and then plugging in to find the value of that function at $1$.
We get that
$$\pi(x) \star \pi(x) = \Delta_{(1,2)}(x)$$
which is a symmetric triangle of height $1$ that is on the interval $[0,2]$
The last convolution is hard to compute as a function, but we only need the value at $x=1$
$$\left(\pi \star  \Delta_{(1,2)} \right)(1) = \int_{-\infty}^\infty \Delta_{(1,2)}(t)\Pi(1-t)\:dt = \int_0^1 t\:dt = \frac{1}{2}$$

I don't know if there is something wrong with my interpreter, but all of my \Pi look like \star. I'm not what's going wrong, if anything, so I will change all of the \Pi to lowercase.
