Problem with definite integral $\int _0^{\frac{\pi }{2}}\sin \left(\arctan \left(x\right)+x\right)dx$ Need to calculate this definite integral. It's seems very strange for me
$$\int _0^{\frac{\pi }{2}}\sin \left(\arctan\left(x\right)+x\right)dx$$
I dont see any reasonable way to calculate this integral. For instance, arctan of π/2 - it's incomprehensible value. I think there are some clever and special way.
 A: If the upper limit were $\infty$ instead of $\dfrac\pi2$ , then the result would be expressible in terms of Bessel I and Struve L functions. To prove this, first use the famous trigonometric formula for $\sin(a+b)$, then simplify $\sin(\arctan x)$ and $\cos(\arctan x)$, and rewrite $x\cos x+\sin x$ as the derivative of $x\sin x$, followed by integration by parts. Lastly, write $x^2=(x^2+1)-1$ to split up the integral into two nicer ones, and employ this to evaluate both of them. As it stands, however, the expression cannot be parsed even in terms of such special functions, unless, of course, one were to allow the existence of “incomplete” Bessel and Struve functions.
A: $\int_0^\frac{\pi}{2}\sin(\tan^{-1}x+x)~dx$
$=\int_0^\frac{\pi}{2}\sin\tan^{-1}x\cos x~dx+\int_0^\frac{\pi}{2}\cos\tan^{-1}x\sin x~dx$
$=\int_0^\frac{\pi}{2}\dfrac{x\cos x}{\sqrt{x^2+1}}~dx+\int_0^\frac{\pi}{2}\dfrac{\sin x}{\sqrt{x^2+1}}~dx$
$=\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\dfrac{(-1)^nx^{2n}}{2(2n)!\sqrt{x^2+1}}~d(x^2+1)+\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\dfrac{(-1)^nx^{2n+1}}{(2n+1)!\sqrt{x^2+1}}~dx$
$=\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\dfrac{(-1)^n(x^2+1-1)^n}{2(2n)!\sqrt{x^2+1}}~d(x^2+1)+\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\dfrac{(-1)^n(x^2+1-1)^n}{2(2n+1)!\sqrt{x^2+1}}~d(x^2+1)$
$=\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{C_k^n(-1)^{2n-k}(x^2+1)^k}{2(2n)!\sqrt{x^2+1}}~d(x^2+1)+\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{C_k^n(-1)^{2n-k}(x^2+1)^k}{2(2n+1)!\sqrt{x^2+1}}~d(x^2+1)$
$=\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^kn!(x^2+1)^{k-\frac{1}{2}}}{2(2n)!k!(n-k)!}~d(x^2+1)+\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^kn!(x^2+1)^{k-\frac{1}{2}}}{2(2n+1)!k!(n-k)!}~d(x^2+1)$
$=\left[\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^kn!(x^2+1)^{k+\frac{1}{2}}}{2(2n)!k!(n-k)!\left(k+\dfrac{1}{2}\right)}\right]_0^\frac{\pi}{2}+\left[\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^kn!(x^2+1)^{k+\frac{1}{2}}}{2(2n+1)!k!(n-k)!\left(k+\dfrac{1}{2}\right)}\right]_0^\frac{\pi}{2}$
$=\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^kn!(\pi^2+2)^{k+\frac{1}{2}}}{2^{k+\frac{1}{2}}(2n)!k!(n-k)!(2k+1)}+\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^kn!(\pi^2+2)^{k+\frac{1}{2}}}{2^{k+\frac{1}{2}}(2n+1)!k!(n-k)!(2k+1)}-\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^kn!}{(2n)!k!(n-k)!(2k+1)}-\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^kn!}{(2n+1)!k!(n-k)!(2k+1)}$
