Easiest way to find $\Re\int_{0}^{\pi/2} e^{e^{i\theta}} d\theta$

How do we find $$\Re\left[\int_0^{\large\frac{\pi}{2}} e^{\Large e^{i\theta}}d\theta\right]$$

In the shortest and easiest possible manner?

I cannot think of anything good.


Solution 1:

Alternatively, using Taylor series of exponential function and Euler's formula we have $$e^{\Large e^{i\theta}}=1+(\cos\theta+i\sin\theta)+\frac{(\cos2\theta+i\sin2\theta)}{2!}+\frac{(\cos3\theta+i\sin3\theta)}{3!}+\cdots$$ We also have $$\int_0^{\pi/2}\cos(n\theta)\;d\theta=\frac{\sin\left(\frac{\pi n}{2}\right)}{n}=\begin{cases}\dfrac{(-1)^{n-1}}{2n-1}&,\;\text{for $n$ is odd}\\\\0&,\;\text{for $n$ is even}\end{cases}$$ and series for sine integral, see formula $(9)$ $$\text{Si}\,(x)=\sum_{n=1}^\infty(-1)^{n-1}\frac{x^{2n-1}}{(2n-1)(2n-1)!}$$ Therefore $$\begin{align}\int_0^{\pi/2}\Re\left( e^{\Large e^{i\theta}}\right)d\theta&=\int_0^{\pi/2}\left(1 +\cos\theta+\frac{\cos2\theta}{2!}+\frac{\cos3\theta}{3!}+\cdots\right)d\theta\\&=\frac{\pi}{2}+1-\frac{1}{3\cdot3!}+\frac{1}{5\cdot5!}-\frac{1}{7\cdot7!}+\cdots\\&=\frac{\pi}{2}+\text{Si}\,(1)\end{align}$$

Solution 2:

The answer can be expressed in terms of the sine integral.

Let $z=e^{i \theta}$.

Then

$$ \begin{align} \text{Re} \int_{0}^{\pi /2} e^{e^{i \theta}} \ d \theta = \text{Re} \frac{1}{i} \int_{C} \frac{e^{z}}{z} \ dz \end{align}$$ where $C$ is the portion of the unit circle in the first quadrant traversed counterclockwise.

But since $\displaystyle \frac{e^{z}}{z}$ is analytic in a simply connected domain that contains $z=1$ and $z= i$,

$$ \begin{align} \int_{C} \frac{e^{z}}{z} \ dz &= \int_{1}^{i} \frac{e^{z}}{z} \ dz \\ &= \text{Ei}(i) - \text{Ei}(1) \\ &= \text{Ci}(1) + i \text{Si}(1) + \frac{i \pi}{2}- \text{Ei}(1) . \tag{1} \end{align} $$

Therefore, $$\begin{align} \text{Re} \int_{0}^{\pi/2} e^{e^{i \theta}} \ d \theta &= \text{Re} \frac{1}{i} \Big( \text{Ci}(1) + i \text{Si}(1) + \frac{i \pi}{2}- \text{Ei}(1)\Big) \\ &= \text{Si}(1) + \frac{\pi}{2} \\ &\approx 2.5168793972. \end{align}$$

$(1)$ Exponential integral of imaginary argument

Solution 3:

Here is Feynman's style answer. We will evaluate the general integral using differentiation under integral sign method. Consider \begin{equation} I(\alpha)=\Re\left[\int_0^{\large\frac{\pi}{2}} e^{\Large e^{i\alpha\theta}}d\theta\right]=\int_0^{\large\frac{\pi}{2}} e^{\alpha\cos\theta}\cos(\alpha\sin\theta)\ d\theta\quad\Rightarrow\quad I(0)=\frac{\pi}{2} \end{equation} The above integral has been evaluated in this OP: How to evaluate $\displaystyle\int_{0}^{2\pi}e^{\cos \theta}\cos( \sin \theta)\, d\theta$, where Mr. john and Tunk-Fey have posted brilliant answers there. You may refer there to see the detail. Rephrase the final step of their answers, we have

\begin{equation} I(\alpha)=\Im\bigg[\,{\rm{Ei}}(i\alpha)\bigg]={\rm{Si}}(\alpha)+\frac{\pi}{2} \end{equation}

Therefore

\begin{equation} I(1)=\Re\left[\int_0^{\large\frac{\pi}{2}} e^{\Large e^{i\theta}}d\theta\right]=\int_0^{\large\frac{\pi}{2}} e^{\cos\theta}\cos(\sin\theta)\ d\theta=\Im\bigg[\,{\rm{Ei}}(i)\bigg]={\rm{Si}}(1)+\frac{\pi}{2} \end{equation}

Solution 4:

$$e^{i\theta}=z\Rightarrow ie^{i\theta}d\theta=dz\Rightarrow d\theta=\frac{dz}{iz}$$ Consider the following integral $$\oint_{\gamma}e^z\frac{dz}{iz}$$ where $\gamma$ is a contour of a quarter of a unit disk. Note that the integrand has a simple pole at $z=0$ so the chosen contour will go in the clockwise direction around zero for a quarter of a circle. The above integral can be partitioned as follows $$\oint_{\gamma}e^z\frac{dz}{iz}=\int_{|z|=1,0\leq\theta\leq \pi/2}e^z\frac{dz}{iz}+\int^{\epsilon}_{1}e^{ix}\frac{dx}{ix}+\oint_{|z|=\epsilon,-\pi/2\leq\theta\leq 0}e^{z}\frac{dz}{iz}+\int^{1}_{\epsilon}e^{x}\frac{dx}{ix}$$ The first integral is the one of your interest as $$\int_{|z|=1,0\leq\theta\leq \pi/2}e^z\frac{dz}{iz}=\int^{\pi/2}_{0}e^{e^{i\theta}}\,d\theta$$ The second integral can be rewritten as $\epsilon\to 0$ in the following way $$\lim_{\epsilon\to 0}\int^{\epsilon}_{1}e^{ix}\frac{dx}{ix}=\int^{0}_{1}e^{ix}\frac{dx}{ix}=-\int^{1}_{0}e^{ix}\frac{dx}{ix}$$ The third integral can be computed using fractional residue theorem $$\oint_{|z|=\epsilon,-\pi/2\leq\theta\leq 0}e^{z}\frac{dz}{iz}=-\frac{\pi}{2}i\cdot Res\{\frac{e^{z}}{iz},z=0\}=-\frac{\pi}{2}$$ Note that the angle is negative as the orientation is clockwise for the little arc of radius $\epsilon$. The last integral can be written in the limit as $$\lim_{\epsilon\to 0}\int^{1}_{\epsilon}e^{x}\frac{dx}{ix}=\int^{1}_{0}e^{x}\frac{dx}{ix}$$ Getting all the pieces together yields $$\int^{\pi/2}_{0}e^{e^{i\theta}}\,d\theta-\int^{1}_{0}e^{ix}\frac{dx}{ix}-\frac{\pi}{2}+\int^{1}_{0}e^{x}\frac{dx}{ix}=0$$ The equality to zero comes from the fact that within the quarter disk contour there is no poles so apply Cauchy Theorem on residues. The last equality is equivalent to $$\int^{\pi/2}_{0}e^{e^{i\theta}}\,d\theta=\int^{1}_{0}e^{ix}\frac{dx}{ix}+\frac{\pi}{2}-\int^{1}_{0}e^{x}\frac{dx}{ix}=-i\int^{1}_{0}e^{ix}\frac{dx}{x}+\frac{\pi}{2}+i\int^{1}_{0}e^{x}\frac{dx}{x}$$ Using $e^{ix}=\cos(x)+i\sin(x)$ then \begin{align}\int^{\pi/2}_{0}e^{e^{i\theta}}\,d\theta&=-i\int^{1}_{0}(\cos(x)+i\sin(x))\frac{dx}{x}+\frac{\pi}{2}+i\int^{1}_{0}e^{x}\frac{dx}{x}\\&=\frac{\pi}{2}+\int^{1}_{0}\sin(x)\frac{dx}{x}+i\int^{1}_{0}(\frac{e^x}{x}-\cos(x))\,dx\end{align} Equalizing the real and imaginary parts you get $$\Re(\int^{\pi/2}_{0}e^{e^{i\theta}}\,d\theta)=\frac{\pi}{2}+\int^{1}_{0}\sin(x)\frac{dx}{x}$$

Solution 5:

Using \begin{align} e^{x} = \sum_{r=0}^{\infty} \frac{x^{r}}{r!} \end{align} then \begin{align} I &= \int_{0}^{\pi/2} e^{e^{i \theta}} \, d\theta = \sum_{r=0}^{\infty} \frac{1}{r!} \, \int_{0}^{\pi/2} e^{i \theta} \, d\theta \\ &= - i \,\sum_{r=0}^{\infty} \frac{e^{\pi i r/2} -1}{r \cdot r!} \\ &= -i \, \sum_{r=0}^{\infty} \frac{i^{r}-1}{r \cdot r!} \\ &= Si(1) + \frac{\pi}{2} + i \left( Ei(1) - Ci(1) \right) \end{align} where $Si(x)$, $Ci(x)$, and $Ei(x)$ are the Sine Integral, Cosine Integral, and Exponential Integral, respectively. This leads to \begin{align} \Re\int_{0}^{\pi/2} e^{e^{i\theta}} d\theta &= \int_{0}^{\pi/2} e^{\cos(\theta)} \, \cos(\sin(\theta)) \, d\theta = Si(1) + \frac{\pi}{2} \\ \Im \int_{0}^{\pi/2} e^{e^{i\theta}} d\theta &= \int_{0}^{\pi/2} e^{\cos(\theta)} \, \sin(\sin(\theta)) \, d\theta = Ei(1) - Ci(1) \end{align}