<s>[INST] 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$
 [/INST] 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$.
</s>