Evaluate integral $\int_0^\pi \sin^4\left(x+\sin 3x\right)dx$ Evaluate $\int_0^\pi \sin^4\left(x+\sin 3x\right)dx$
My working let I=$\int_0^\pi \sin^4\left(x+\sin 3x\right)dx$
$=\int_0^\pi \frac18\left(\cos (4x+4\sin 3x)-4\cos(2x+2\sin 3x)+3\right)dx$
$=\frac{3\pi}{8}+\frac18\int_0^\pi\cos (4x+4\sin 3x)dx-\frac12\int_0^\pi\cos (2x+2\sin 3x)dx$
 A: Before we start, let us look at a related family of integrals.
For any integer $n$ and $\lambda \in \mathbb{R}$, let $J_n(\lambda)$ be the integral
$$J_n(\lambda) \stackrel{def}{=} \int_{-\pi}^{\pi} e^{in(x+\lambda\sin(3x))} dx$$
It is easy to see $J_0(\lambda) = 2\pi$ independent of $\lambda$. Furthermore, $J_n(\lambda) = 0$ unless $3$ divides $n$.
To see this, we use the fact $\sin(3x)$ is periodic with period $\frac{2\pi}{3}$.
This allows us to rewrite $J_n(\lambda)$ as
$$\left(\int_{-\pi}^{-\frac{\pi}{3}} + \int_{-\frac{\pi}{3}}^{\frac{\pi}{3}} + \int_{\frac{\pi}{3}}^{\pi}\right)e^{in(x+\lambda\sin(3x))} dx
= 
\left(\int_{-\frac{\pi}{3}}^{\frac{\pi}{3}}e^{in(x+\lambda\sin(3x))} dx\right)
\left(e^{-i\frac{2\pi n}{3}} + 1 + e^{i\frac{2\pi n}{3}}\right)
$$
When $n$ is not divisible by $3$, $J_n(\lambda)$ vanishes because of the factor $e^{-i\frac{2\pi n}{3}} + 1 + e^{i\frac{2\pi n}{3}}$.
Back to the original problem. Since both $x$ and $\sin(3x)$ is an odd function, so does the sum. Together
with $\sin^4(x)$ is an even function, we find the integrand is an even function.
As a result,
$$\begin{align}\int_0^\pi \sin^4(x + \sin(3x)) dx
&= \frac12\int_{-\pi}^\pi \sin^4(x + \sin(3x))dx\\
&= \frac12\int_{-\pi}^\pi\left(\frac{ e^{i(x+\sin(3x))} - e^{-i(x+\sin(3x))}}{2i}\right)^4 dx\\
&= \frac{1}{32}\left[ J_4(1) - 4 J_2(1) + 6J_0(1) - 4J_{-2}(1) + J_{-4}(1)\right]\\
&= \frac{1}{32}\left[ 0 - 4(0) + 6(2\pi) - 4(0) + 0\right]\\
&= \frac{3\pi}{8}
\end{align}
$$
About the family of integrals mentioned in question/comment, we have
$$\int_0^\pi \cos (2^n x + k \sin (3x)) dx
= \frac12 \int_{-\pi}^\pi \cos (2^n x + k \sin (3x)) dx
= \frac14 \left(J_{2^n}(k') + J_{-2^n}(k')\right)
$$
where $k' = \frac{k}{2^n}$. Since $2^n$ is not divisible by $3$, all of them evaluate to $0$.
A: Since the question has already been answered, I would like to share the generalized versions of the problem:

(1) Let $n,k\in N$ such that $2p\not\equiv 0 \pmod {(2k+1)}$ $\forall p\in \{1,2,3,\ldots, n\}$ then $$\displaystyle \int_0^{\pi}\left[\sin\big(x+\sin((2k+1)x)\big)\right]^{2n}dx=\displaystyle \frac {{2n-1 \choose n}}{2^{2n-1}}\pi$$


(2) $$\displaystyle \int_0^{\pi} \left[\sin \big(x+\sin((2k+1)x)\big)\right]^{2n}dx$$
$$=\displaystyle \frac {{2n-1 \choose n}\pi}{2^{2n-1}}+\frac {\pi}{2^{2n-1}(2k+1)}\sum_{i=1}^{\left\lfloor \frac {n}{2k+1}\right\rfloor} \sum_{r=0}^{2k} (-1)^i {2n \choose n-(2k+1)i}J_{2i}(2i(2k+1)\cdot (-1)^{r+1})$$
where $J_{\nu}(z)$ denotes Bessel function of first kind.

