# Evaluating $\int_0^\pi \sin^2(3x+\cos^45x)dx$ (2023 MIT Integration Bee #16)

2023 MIT Integration Bee Regular Season, Problem 16. $$\int_0^\pi \sin^2(3x+\cos^45x)dx$$

I got as far as $$\int_0^\pi \sin^2(3x+\cos^45x)dx = \frac{1}{2}\int_0^\pi 1dx \\ - \frac{1}{2}\int_0^\pi \cos(6x+2\cos^45x)dx$$ For the 2nd integral, I’ve tried substitutions like $$x\rightarrow\pi-x$$ and $$x\rightarrow\frac{\pi}{2}-x$$ but they don’t seem to lead anywhere. Would appreciate some help in how to show that the 2nd integral is $$0$$ so that the final answer is $$\frac{\pi}{2}$$, or if there’s another method completely to go about this.

These solutions are all very well thought out, but an integration bee problem has to be solved in minutes. Most likely the intent behind the problem was to recognize that

$$\int_0^\pi \sin^2(3x+\cos^4(5x))\:dx = \int_0^\pi\sin^2(3x)\:dx$$

or in other words the cosine term doesn't matter, which solves the problem immediately. But how would one quickly justify that to themselves?

Consider

$$I[a] = \int_0^\pi\sin^2(3x+a\cos^4(5x))\:dx \implies I'[a] = \int_0^\pi\sin(6x+2a\cos^4(5x))\cos^4(5x)\:dx$$

There are a few immediate simplifications to be made here. First using the sine angle addition formula

$$\require{cancel} I'[a] = \cancelto{0}{\int_0^\pi\sin(6x)\cos(2a\cos^4(5x))\cos^4(5x)\:dx}+\int_0^\pi\cos(6x)\sin(2a\cos^4(5x))\cos^4(5x)\:dx$$

which cancels due to odd symmetry on the interval. Next, observe that the remaining integrand is $$\pi$$-periodic, so we can move the integral over any interval of $$\pi$$ length we wish. Choosing $$[0,\pi]\to\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$$ we get

$$I'[a] = \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\cos(6x)\sin(2a\cos^4(5x))\cos^4(5x)\:dx = \cancelto{0}{2\int_0^{\frac{\pi}{2}}\cos(6x)\sin(2a\cos^4(5x))\cos^4(5x)\:dx}$$

due to even then odd symmetry. Thus $$I[a]$$ is a constant so

$$I[a] = I[0] = \int_0^\pi\sin^2(3x)\:dx = \frac{\pi}{2}$$

Explaining the steps out makes this seem like a long process, but on a bee contestants would not have to think the symmetry computations all the way through to justify to themselves to a good degree of confidence that things cancel out. The same cannot be said for computations involving series.

• How does odd symmetry come about to determine that $2\int_0^\frac{\pi}{2}…$ evaluates to $0$? Commented May 31, 2023 at 15:08
• I don't know why $2\int_0^{\pi/2} \cos(6x)\sin(2a\cos^4(5x))\cos^4(5x) dx=0$. Can you explain it more clearly? Commented Dec 17, 2023 at 11:56

Let $$I = \int_{0}^{\pi}\cos{(6x + 2\cos^{4}{5x})} \ dx$$ Let $$x = \pi - u$$ $$I = \int_{0}^{\pi}\cos{(6(\pi - u) + 2\cos^{4}{5(\pi - u)})} \ du = \int_{0}^{\pi}\cos{(-6u + 2\cos^{4}{5u})} \ dx$$ $$=\int_{0}^{\pi}\cos{(-6x + 2\cos^{4}{5x})} \ dx$$ Thus, $$2I = \int_{0}^{\pi}\cos{(6x + 2\cos^{4}{5x})} + \cos{(-6x + 2\cos^{4}{5x})} \ dx$$ $$= \int_{0}^{\pi}2\cos{(6x)}\cos{(2\cos^{4}{(5x)})} \ dx$$ Hence, $$I = \int_{0}^{\pi}\cos{(6x)}\cos{(2\cos^{4}{(5x)})} \ dx$$ We rewrite using the Maclaurin series of $$\cos{x}$$, $$I = \int_{0}^{\pi}\cos{(6x)}\sum_{n=0}^{\infty}\frac{(-1)^{n}2^{n}\cos^{8n}(5x)}{(2n)!} \ dx = \sum_{n=0}^{\infty}(-1)^{n}\frac{2^{n}}{(2n)!}\int_{0}^{\pi}\cos{(6x)}\cos^{8n}(5x) \ dx$$ Using orthogonality relations and trig identities, you can show that for each $$n\in \mathbb{N}$$, $$\int_{0}^{\pi}\cos(6x)\cos^{8n}(5x) \ dx = 0$$ Hence, $$I = 0$$

• For $\int_0^\pi \cos(6x)\cos^{8n}(5x)dx$, would it suffice to explain that repeatedly using the product-to-sum to combine all $8n$ $\cos5x$ terms with $\cos6x$ will result in a sum of integrals of the form $\int_0^\pi \cos(kx)dx$ where $k\in\mathbb N$, which all evaluate to $0$? Commented May 29, 2023 at 3:40
• @craig1 That was my thinking exactly. Commented May 29, 2023 at 11:36

\begin{aligned} \int_0^\pi \sin ^2\left(3 x+2 \cos ^4 5 x\right) d x = & \frac{1}{2} \int_0^\pi\left[1-\cos \left(6 x+4 \cos ^4 5 x\right)\right] d x \\ = & \frac{\pi}{2}-\frac{1}{2} \underbrace{\int_0^\pi \cos \left(6 x+4 \cos ^4 5 x\right) d x}_{J} \end{aligned} Noting that $$x\mapsto \pi-x$$ gives $$J= \int_0^\pi \cos \left(4 \cos ^4 5 x-6 x\right) d x$$ Averaging them yields \begin{aligned} J & =\frac{1}{2}\int_0^\pi \left[\cos \left(4 \cos ^4 5 x+6 x\right)+\cos \left(4 \cos ^4 5 x-6 x\right) \right]d x \\ & =\int_0^\pi \cos \left(4 \cos ^4 5 x\right) \cos 6 xd x\\&= \Re\int_0^\pi e^{4 i \cos ^4 5 x} \cos 6 x d x \end{aligned} Expanding by definition of $$e^x$$ yields $$J=\Re \sum_{n=0}^{\infty} \frac{(4 i)^n}{n !} \int_0^\pi \cos ^{4 n} 5 x \cos 6 x d x$$ For the last integral, we express the integrand in terms of $$\cos mx\cos 5x$$ as below:

\begin{aligned} \cos ^{4 n} 5 x&=\left(\frac{e^{5 x i}+e^{-5 x i}}{2}\right)^{4 n} \\ & =\frac{1}{2^{4 n}} \sum_{k=0}^{4 n}\left(\begin{array}{c} 4 n \\ k \end{array}\right) e^{5(4 n-2 k) x i} \\ &=\frac{1}{2^{4 n}} \left[\sum_{k=0}^{2 n-1}\left(\begin{array}{c} 4 n \\ k \end{array}\right) \cos [5(4 n-2 k) x]+\left(\begin{array}{c} 4 n \\ 2 n \end{array}\right)\right] \\ & \end{aligned} Hence $$\int_0^\pi \cos ^{4 n} 5 x \cos 6 x d x= \frac{1}{2^{4 n}} \left[\sum_{k=0}^{2 n-1}\left(\begin{array}{c} 4 n \\ k \end{array}\right)\int_0^\pi \cos [5(4 n-2 k) x]\cos 6x dx + \left(\begin{array}{c} 4 n \\ 2 n \end{array}\right) \int_0^\pi\cos 6xdx\right] =0$$ Hence we can conclude that $$\boxed{\int_0^\pi \sin ^2\left(3 x+2 \cos ^4 5 x\right) d x = \frac{\pi}{2}}$$

\begin{align} I &:= \int_{0}^{\pi}\sin^{2}\left(3x+2\cos\left(5x\right)^{4}\right)dx \\ &= \frac{1}{2}\Re\int_{0}^{\pi}\left(1-\exp\left(2i\left(3x+2\cos^{4}\left(5x\right)\right)\right)\right)dx \\ &= \frac{1}{2}\int_{0}^{\pi}dx-\frac{1}{2}\Re\int_{0}^{\pi}\exp\left(6ix+4i\cdot\frac{1}{4}\left(1+2\cos\left(10x\right)+\frac{1}{2}\left(1+\cos\left(20x\right)\right)\right)\right)dx \\ &= \frac{\pi}{2}-\frac{1}{2}\Re\exp\left(i+\frac{i}{2}\right)\int_{0}^{\pi}e^{6ix}\exp\left(2i\cos\left(10x\right)\right)\exp\left(\frac{i}{2}\cos\left(20x\right)\right)dx \\ &= \frac{\pi}{2}-\frac{1}{2}\Re\exp\left(i+\frac{i}{2}\right)\int_{0}^{\pi}e^{6ix}\sum_{n=-\infty}^{\infty}i^{n}\operatorname{J}_{n}\left(2\right)e^{10nix}\sum_{k=-\infty}^{\infty}i^{k}\operatorname{J}_{k}\left(\frac{1}{2}\right)e^{20kix}dx \tag{1}\\ &= \frac{\pi}{2}-\frac{1}{2}\Re\exp\left(i+\frac{i}{2}\right)\sum_{n,k=-\infty}^{\infty}i^{n+k}\operatorname{J}_{n}\left(2\right)\operatorname{J}_{k}\left(\frac{1}{2}\right)\int_{0}^{\pi}e^{6ix}e^{10nix}e^{20kix}dx \\ &= \frac{\pi}{2}-\frac{1}{2}\Re\exp\left(i+\frac{i}{2}\right)\sum_{n,k=-\infty}^{\infty}i^{n+k}J_{n}\left(2\right)J_{k}\left(\frac{1}{2}\right)\int_{0}^{\pi}e^{6ix}e^{10nix}e^{20kix}dx \\ &= \frac{\pi}{2}-\frac{1}{2}\Re\exp\left(i+\frac{i}{2}\right)\sum_{n,k=-\infty}^{\infty}i^{n+k}\operatorname{J}_{n}\left(2\right)\operatorname{J}_{k}\left(\frac{1}{2}\right)\cdot\frac{i\left(1-e^{2\pi i\left(10k+5n+3\right)}\right)}{20k+10n+6} \\ &= \frac{\pi}{2}-\frac{1}{2}\Re\exp\left(i+\frac{i}{2}\right)\sum_{n,k=-\infty}^{\infty}i^{n+k}\operatorname{J}_{n}\left(2\right)\operatorname{J}_{k}\left(\frac{1}{2}\right)\cdot 0 \\ &= \frac{\pi}{2} \end{align}

Where in $$(1)$$ we used the Jacobi–Anger expansion.

• Nice Complex Analysis approach. I don't really get it, but it seems like you know what you are doing +1 Commented Dec 6, 2023 at 22:44
• Thanks @KamalSaleh I might revisit this one in the future because looking back on this, I should've added some words to justify what exactly I was doing Commented Dec 6, 2023 at 23:13