Integral of $\sin(x)/x$ from $-400$ to $400$. I recently saw this on Glassdoor as an interview question.
Is there any way of performing this integral analytically? I cannot seem to do it by substitution or by parts. Given it asks for the definite integral, I assume it is possible?
 A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
$\ds{\bbox[5px,#ffd]{}}$

\begin{align}
&\bbox[5px,#ffd]{\int_{0}^{400}{\sin\pars{x} \over x}\,\dd x} =
\int_{0}^{\infty}{\sin\pars{x} \over x}\,\dd x -
\int_{400}^{\infty}{\sin\pars{x} \over x}\,\dd x 
\\[5mm] = &\
{\pi \over 2} - {\cos\pars{400} \over 400} +
\int_{400}^{\infty}{\cos\pars{x} \over x^{2}}\,\dd x
\\[5mm] = &\
\underbrace{{\pi \over 2} - {\cos\pars{400} \over 400} -
{\sin\pars{400} \over 160000}}
_{\ds{1.5721148\color{red}{8\ldots}}} +
2\int_{400}^{\infty}{\sin\pars{x} \over x^{3}}\,\dd x
\end{align}
$\ds{{\tt Mathematica}: 1.5721148\,692738117518013214479640847648
\ldots}$
A: As TonyK mentioned, a good estimate is . By abuse of notation, we expect that the error is $\mathcal{O}\left(1/400\right)$, meaning that it should be on the order of $1/400$ (because there are no other relevant length scales) with higher order corrections in powers of $1/400$. This is indeed what Felix Marin has shown in his answer, i.e. you basically have an infinite series of corrections, with the leading order term being roughly $1/400$.
This analysis needs to be slightly modified when trying to estimate $\int_{-N}^N \frac{\sin x}{x}\, dx$, $N\gg 1$ whenever $N\approx (2m+1)\pi/2$ for some $m\in \mathbb{N}$. Indeed, if that is the case, then $\cos N\approx 0$ and the leading order term is not anymore $\mathcal{O}\left(1/N\right)$, as that term will vanish, but now $\mathcal{O}\left(1/N^2\right)$.
