# 2023 MIT Integration Bee Semifinals #1 Problem 1 $\int e^{\cos x}\cos(2x+\sin x)dx$

How do I solve $$\int e^{\cos x}\cos(2x+\sin x)dx$$? This is a problem from the 2023 MIT Integration Bee semifinals. I thought that this integral would be solved by $$u=e^{\cos x}$$ but that doesn't work since we have $$\cos(2x+\sin x)$$ and not $$\sin x$$ next to $$e^{\cos x}$$. Other than that I am a bit lost.

Edit: Integral Calculator couldn't find the solution.

• Should be a plus inside the $\cos(.)$ Commented Feb 19, 2023 at 17:11
• Edited the problem to match the video, per LemNon's suggestion. Commented Feb 19, 2023 at 17:20

$$\textbf{Hint}$$:

$$2x + \sin x = x + (x+\sin x)$$

Which we can use to rewrite the integrand by trig identity:

$$e^{\cos x} \left(-\sin x \sin (x+ \sin x) + \cos x \cos(x + \sin x)\right)$$

where we would almost have product rule $$(fg)'$$ with $$f =\exp(\cos x)$$ and $$g= \sin(x +\sin x)$$. But the derivative of $$g$$ is actually

$$(\sin(x + \sin x))' = \cos(x+\sin x)\cdot(1+\cos x)$$

can you see a way to proceed from here and correct for the missing term?

• We add $(1-\sin x)(\cos(x+\sin x))$, right? I am trying hard to use the hint. Please continue the answer if you have time. Commented Feb 21, 2023 at 16:52

Expressing the integral in terms of complex numbers as \begin{aligned} I & =\Re \int e^{\cos x} e^{(2 x+\sin x) i} d x \\ & =\Re\int e^{\cos x+i \sin x} \cdot e^{2 x i} d x \\ &= \Re \int e^{e^{x i}} e^{2 x i} d x\\& \stackrel{y=xi}{=} \Re \left( \underbrace{\frac{1}{i} \int e^{e^y} e^{2 y} d y}_{J} \right) \end{aligned} Via integration by parts on $$J$$, we have

\begin{aligned} J & =\frac{1}{i} \int e^y d\left(e^{e^y}\right) \\ & =-i\left(e^y e^{e^y}-\int e^y e^{e^y} d y\right) \\ & =-i e^{e^y}\left(e^y-1\right) \\ & =-i e^{e^{x i}}\left(e^{x i}-1\right) \end{aligned}

Expressing in terms of sine and cosine yields \begin{aligned} J & =-i e^{e^{x i}}(\cos x+i \sin x-1) \\ & =-i e^{\cos x+i \sin x}\left(2 i \sin \frac{x}{2} \cos \frac{x}{2}-2 \sin ^2 \frac{x}{2}\right) \\ & =2 \sin \frac{x}{2} e^{\cos x} e^{i \sin x}\left(\cos \frac{x}{2}+i \sin \frac{x}{2}\right) \\ & =2 \sin \frac{x}{2} e^{\cos x} e^{i \sin x} e^{\frac{i x}{2}} \\ & =2 \sin \frac{x}{2} e^{\cos x} e^{i\left(\frac{x}{2}+\sin x\right)} \end{aligned} Plugging back gives the real part as the answer below: $$\boxed{I=2 \sin \frac{x}{2} e^{\cos x} \cos \left(\frac{x}{2}+\sin x\right)}$$ which is surprisingly beautiful! Isn’t it?

• Much prettier than I expected. Thanks! Commented Feb 21, 2023 at 16:50

Utilize the pruduct rule $$[e^{g(t)}f(t)]’=e^{g(t)} [f’(t) +g’(t)f(t)]\tag1$$ to first integrate \begin{align} J(a)=&\int e^{a\cos x}\cos(x+a\sin x)\ dx\\ =& \ \frac1a\int e^{a\cos x}[(\sin (a\sin x))’+(a\cos x)’\sin(a\sin x)]\ dx\\ = &\ \frac1a e^{a\cos x}\sin(a\sin x) \end{align} Then, utilize the rule (1) again to obtain \begin{align} J’(a)=&\int \frac d{da}\left[e^{a\cos x}\cos(x+a\sin x)\right]\ dx\\ =& \int e^{a\cos x}\cos(2x+a\sin x)dx \end{align} Thus \begin{align} &\int e^{\cos x}\sin(2x+\sin x)dx\\ =& \ J’(a)\bigg|_{a=1}= \frac d{da} \left[\frac1a e^{a\cos x}\sin(a\sin x)\right]_{a=1} \\ =& \ 2e^{\cos x}\sin\frac x2\cos\left(\frac x2+\sin x\right) \end{align}