Evaluate $\int_0^{\pi} e^{i \zeta e^{ ix}} \ dx$.

I'm trying to evaluate the following integral: $$\int_0^{\pi} e^{i \zeta e^{ ix}} \ dx$$ where $$\zeta >0$$ is some positive real number. Since the antiderivative of this function is just in terms of the exponential integral, I decided to go for a different approach.

My attempt

I did the following $$\int_0^{\pi} e^{i \zeta e^{ ix}} \ dx = \int_0^{\pi} \sum_{n=0}^{\infty}\frac{\left(i \zeta e^{ ix}\right)^n}{n!} \ dx = \sum_{n=0}^{\infty}\frac{(i \zeta)^n}{n!} \int_0^{\pi} e^{nix} \ dx = \sum_{n=0}^{\infty}\frac{(i \zeta)^n}{n! (in)}\left(\underbrace{e^{i\pi n}}_{(-1)^n} -1\right) = \sum_{n=0}^{\infty}\frac{\zeta^ni^{n-1}}{(n+1)!} \left((-1)^n -1\right)$$ To then verify if my procedure was correct, I used WolframAlpha to evaluate both sides of the equation for the value $$\zeta = 1$$. From here I got that $$\int_0^{\pi} e^{i e^{ ix}} \ dx = 1.2494... \neq -0.9193... = \sum_{n=0}^{\infty}\frac{i^{n-1}}{(n+1)!} \left((-1)^n -1\right)$$ I'm not sure where I made my mistake. I think interchanging the integral and the sum is justified since I believe the sum converges absolutely, but now I'm not so sure.

Could anyone tell me where my mistake is? Or alternatively, could anyone tell me how I could evaluate this integral? Thank you!

Edit: Thanks to the comments, I believe that I can simplify the integral to be $$\int_0^{\pi} e^{i \zeta e^{ ix}} \ dx = \pi -2\int_0^\zeta \frac{\sin(t)}{t} \ dt$$ I'm not sure if the approach I was taking was a good way to show this, but if anyone has any ideas about how I could maybe get here I would greatly appreciate them!

• For your solution: $n n!\not = (n+1)!. \int_0^\pi 1dx\not=0.$ – Iridescent Aug 20 '20 at 7:19
• @User628759, I think that with the corrections you mention I get the correct result of $$\pi + \sum_{n=1}^{\infty}\frac{\zeta^ni^{n-1}}{n n!} \left((-1)^n -1\right)$$ Can I simplify the sum on the right even further for a general $\zeta >0$? – Robert Lee Aug 20 '20 at 7:27
• You are right now. The resulting sum is not elementary, but it can be expressed by exponential integrals. – Iridescent Aug 20 '20 at 7:29
• If I understood correctly, I think I should be able to show that $$\sum_{n=1}^{\infty}\frac{\zeta^ni^{n-1}}{n n!} \left((-1)^n -1\right) = -2\int_0^\zeta \frac{\sin(t)}{t} \ dt$$ Or is this not true for the values of $\zeta$ I'm working with? – Robert Lee Aug 20 '20 at 7:41
• You're right, I'll correct it immediately. Thank you for pointing it out! – Robert Lee Aug 20 '20 at 10:52

After playing around with the integral for a while, I believe I've found a way to solve the integral and get it in terms of $$\text{Si}(\zeta)$$.
Let's say we define $$F(\zeta)$$ as $$F(\zeta) := \int_0^{\pi} e^{i \zeta e^{ ix}} \ dx$$ Here we notice that $$F(0) = \int_0^{\pi} 1\ dx = \pi$$. Now, from here we can then analyze the derivative of $$F$$ as follows: \begin{align} F'(\zeta) &= \frac{d}{d\zeta} \int_0^{\pi} e^{i \zeta e^{ ix}} \ dx = \int_0^{\pi} \frac{\partial}{\partial \zeta }e^{i \zeta e^{ ix}} \ dx =\int_0^{\pi}e^{i \zeta e^{ ix}}\left(e^{ix}\right)i\ dx \\ &\overset{\color{blue}{u=ix}}{=} \int_0^{i\pi}e^{i \zeta e^u} e^u \ du \overset{\color{blue}{s=e^{u}}}{=}\int_1^{-1}e^{i \zeta s} \ ds = \frac{e^{i \zeta s}}{\zeta i}\Bigg\vert_{s=1}^{s=-1} = \frac{1}{\zeta i}\left(e^{-i\zeta} - e^{i \zeta}\right)\\ &= -\frac{2}{\zeta} \left( \frac{e^{i\zeta}-e^{-i\zeta}}{2i}\right) = -2 \frac{\sin(\zeta)}{\zeta} \end{align} recalling that we can put the derivative as a partial inside the integral because of Leibniz's integral rule. On the other hand, by the fundamental theorem of calculus, we can easily see that $$\frac{d}{d\zeta}-2\text{Si}(\zeta) =-2 \frac{d}{d\zeta} \int_0^\zeta \frac{\sin(t)}{t} \ dt = -2 \frac{\sin(\zeta)}{\zeta}$$ And since we've found $$2$$ functions with the same derivative, we know they must be the same up to a constant, or in other words $$F(\zeta) = -2 \int_0^\zeta \frac{\sin(t)}{t} \ dt + c$$ But recalling the initial condition we had, we can solve for the value of the constant as follows $$F(0) = \pi = \int_0^0 \frac{\sin(t)}{t} \ dt + c = c$$ and so we get the final result being $$\boxed{\int_0^{\pi} e^{i \zeta e^{ ix}} \ dx = \pi -2\int_0^\zeta \frac{\sin(t)}{t} \ dt}$$
I think that this solution is valid for any $$\zeta \in \mathbb{R}$$, which means I could generalize the original problem to more than just positive values. I believe I haven't missed any details this time, but if I have please let me know!