# How may we evaluate the closed form for $\int_{0}^{\pi/4}x^n\sqrt{1+\sin(2x)}\mathrm dx=n!+F(n)?$

Proposed: An approximation to n factorial in terms of $\pi$

$$\int_{0}^{\pi/4}x^n\sqrt{1+\sin(2x)}\mathrm dx=n!+F(n)\tag1$$ $n\ge1$

Where $F(n)$ is expressed in terms of $\pi$ for $n\ge2$

We notice that $$\lim_{n\to \infty }n!= F(n)$$

Examples:

$$\color{blue}{1\approx \sqrt{2}}$$

$$2\approx {\pi\over \sqrt{2}}$$

$$6\approx {\pi(32-\pi^2)\over 8\sqrt{2}}$$

$$24\approx {\pi(96-\pi^2)\over 8\sqrt{2}}$$

$$120\approx {5(6144-192\pi^2+\pi^4)\over 128\sqrt{2}}$$

$$720\approx {3\pi(30720-320\pi^2+\pi^4)\over 256\sqrt{2}}$$

My try:

Recall $$(1+x)^{1/2}=\sum_{k=0}^{\infty}{(-1/2)_k\over k!}(-x)^k$$ then $(1)$ becomes

$$\sum_{k=0}^{\infty}{(-1)^k\over k!}(-1/2)_k\int_{0}^{\pi/4}x^n\sin^k(2x)\mathrm dx\tag2$$

Apply IBP to

$$\int x^n\sin^{k}(2x)\mathrm dx={x^{n+1}\over n+1}\sin^k(2x)-{2k\over n+1}\int x^{k+1}\cos(2x)\sin^{k-1}(2x)\mathrm dx\tag3$$

How may one evaluate the closed form for $(1)?$

• Observe $\sqrt{1+\sin(2x)}=\sin(x)+\cos(x)=\sqrt{2}\,\cos(\pi/4-x)$. It should be $n!-F(n)$, because the integral itself should be $O\left(\left(\frac{\pi}{4}\right)^n\right)$. – Professor Vector May 19 '17 at 8:53
• Formulas for $(1)$ are written below. I've written a closed form. :-) – user90369 Aug 29 '17 at 8:35

$n\in\mathbb{N}_0$ :
$$\int\limits_0^{\pi/4} x^n\sqrt{1+\sin(2x)}dx=\int\limits_0^{\pi/4} x^n\cos x dx +\int\limits_0^{\pi/4} x^n\sin x dx$$
$$=n![t^n]\frac{1+t(\sqrt{2}e^{t\pi/4}-1)}{1+t^2}=n!\sum\limits_{k=0}^n\frac{a_k}{k!}\cos(\frac{\pi}{2}(n-k))$$
with $\enspace a_0=1\enspace$, $\enspace a_1=\sqrt{2}-1\enspace$, $\enspace \displaystyle a_{k\geq 2}=\sqrt{2}k(\frac{\pi}{4})^{k-1}$
Mathematica gives a closed(ish) form for the integral. $$\int_0^{\pi/4}x^n\sqrt{1+\sin(2n)}\;dx = (\frac{1}{2}+\frac{i}{2})i^{-n}\left(((-1)^n-i)n!+(-1)^{n+1}\Gamma(n+1,-\frac{i\pi}{4})+i\Gamma(n+1,\frac{i\pi}{4}) \right)$$ It contains imaginary numbers due to the way the incomplete gamma function is defined, but the results are all real for integer $n$, so your $F(n)$ function can be that minus $n!$. I would not know how to get there by hand.