Did I solve this funky integral right? $\int_{-\infty}^{\infty}\frac{\sin(\sin(x))}{x}\,dx$ So I tried to solve this integral:
$$\int_{-\infty}^{\infty}\frac{\sin(\sin(x))}{x}\,dx$$
By turning it into a contour integral with a small semi-circle to avoid the singularity at z=0, and taking the imaginary part:
$$\oint\frac{e^{\sin(z)i}}{z}\,dz$$
The answer I got is $\pi$, but Wolfram Alpha can’t evaluate the integral. How can I check my answer ?
 A: Just to show up what the correct answer looks like. By Lobachevsky's integral formula, $$I:=\int_{-\infty}^\infty\frac{\sin\sin x}{x}\,dx=\int_0^\pi\frac{\sin\sin x}{\sin x}\,dx$$ can be written as $\pi\int_0^1 J_0(z)\,dz$ using the Bessel function $J_0(z)$ and its integral representation; this has a closed form expression in terms of Struve functions (and Bessel functions). Alternatively, $$I=\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)!}\int_0^\pi\sin^{2n}x\,dx=\pi\sum_{n=0}^\infty\frac{(-1/4)^n}{n!^2(2n+1)},$$ useful for numerics: $I\approx2.889418299621118615441122131089\cdots$
A: After @metamorphy's elegant solution and answers, we can also write
$$I=2\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)!}\int_0^{\frac\pi2}\sin^{2n}(x)\,dx= \sqrt \pi \sum_{n=0}^\infty (-1)^n\frac{ \Gamma \left(n+\frac{1}{2}\right)}{\Gamma (n+1)
   \Gamma (2 n+2)}$$
$$I=\pi  \,\,\,
   _1F_2\left(\frac{1}{2};1,\frac{3}{2};-\frac{1}{4}\right)$$
The convergence is very fast since we have an alernating series and
$$a_n=\frac{ \Gamma \left(n+\frac{1}{2}\right)}{\Gamma (n+1)
   \Gamma (2 n+2)}\implies \frac{a_{n+1}}{a_n}=\frac{2 n+1}{4 (n+1)^2 (2 n+3)}=\frac{1}{4 n^2}+O\left(\frac{1}{n^3}\right)$$
If we truncate the sum as
$$I=\sqrt \pi \sum_{n=0}^p (-1)^n\frac{ \Gamma \left(n+\frac{1}{2}\right)}{\Gamma (n+1)   \Gamma (2 n+2)}+\sqrt \pi \sum_{n=p+1}^\infty (-1)^n\frac{ \Gamma \left(n+\frac{1}{2}\right)}{\Gamma (n+1)   \Gamma (2 n+2)}$$ for, a given accuracy we search for $p$ such that
$$\frac{\sqrt{\pi }\,\, \Gamma \left(p+\frac{3}{2}\right)}{\Gamma
   (p+2) \Gamma (2 p+4)} \leq \epsilon$$ an approximation (in fact an overestimate) is given by
$$p \sim \frac{1}{2} \exp\left(1+W\left(-\frac{\log (16 \epsilon )}{e}\right)\right)$$ where $W(.)$ is the principal branch of Lambert function.
For $\epsilon=10^{-50}$, this gives, as a real, $p=20.648$ while the "exact" solution is $p=19.022$
