I have seen similar integrals being attacked by complex analysis. I am wondering whether there are elementary methods to solve such integrals.
$$\int_{0}^{2\pi}\exp(\sin\theta)\cos(\cos\theta)\mathrm d\theta$$
Any hints are appreciated. Thanks.
calculuscontest-mathdefinite integralsintegration
I have seen similar integrals being attacked by complex analysis. I am wondering whether there are elementary methods to solve such integrals.
$$\int_{0}^{2\pi}\exp(\sin\theta)\cos(\cos\theta)\mathrm d\theta$$
Any hints are appreciated. Thanks.
Variant 1: Harmonic functions have the mean value property,
$$f(z) = \frac{1}{2\pi} \int_0^{2\pi} f(z + re^{i\varphi})\,d\varphi$$
if $f$ is harmonic in $\Omega$ and $\overline{D_r(z)} \subset \Omega$.
$u$ is an entire harmonic function, hence
$$u(0) = \frac{1}{2\pi}\int_0^{2\pi} u(e^{i\varphi})\,d\varphi = \frac{1}{2\pi}\int_0^{2\pi} \cos(\varphi)e^{\cos\varphi}\cos (\sin\varphi) - \sin(\varphi)e^{\cos\varphi}\sin(\sin\varphi)\,d\varphi.$$
Whether we write $z$ and $re^{i\varphi}$ or $(x,y)$ and $(r\cos \varphi, r\sin\varphi)$ is completely immaterial. The complex notation is just more convenient sometimes.
Variant 2: Consider the analytic function $f = u+iv$.
Since $u$ and $v$ are both real, and $d\varphi$ is also real, we have
$$\begin{align} \int_0^{2\pi} u(\cos\varphi,\sin\varphi)\,d\varphi &= \operatorname{Re}\left(\int_0^{2\pi} u(\cos\varphi,\sin\varphi)\,d\varphi + i\int_0^{2\pi} v(\cos\varphi,\sin\varphi)\,d\varphi\right)\\ &= \operatorname{Re} \int_0^{2\pi} f(e^{i\varphi})\,d\varphi. \end{align}$$
Now,
The path integral over some closed curve is zero, over an analytic function.
is not correct as stated. On the one hand, the closed curve must not wind around any point in the complement of the function's domain - but since we have an entire function, that is vacuously satisfied here. More pertinent in the case at hand is that the integral theorem concerns only integrals with respect to $dz$ (it's a theorem about holomorphic differential forms), but here the integrand is $f(z)\,d\varphi$, not $f(z)\,dz$. Thus Cauchy's integral theorem does not apply.
However, for integrals over a circle, we have a simple correspondence between $dz$ and $d\varphi$. If we parametrise the circle as $\gamma(\varphi) = z_0 + r e^{i\varphi}$, then we have
$$dz = \gamma'(\varphi)\,d\varphi = ire^{i\varphi}\,d\varphi = i(z-z_0)\,d\varphi,$$
so we get
$$\int_0^{2\pi} f(e^{i\varphi})\,d\varphi = \int_{\lvert z\rvert = 1} f(z)\frac{dz}{iz},$$
and we see that that leads to Cauchy's integral formula,
$$\frac{1}{i} \int_{\lvert z\rvert = 1} \frac{f(z)}{z}\,dz = 2\pi\: f(0).$$
Not hard to see that \begin{align*} \int_0^{2 \pi } \theta \cdot e^{x \cos \theta +y \sin \theta } \, \mathrm{d}\theta &=\int_{0}^{2\pi }\theta \sum_{k=0}^{\infty }\frac{\left ( x \cos \theta +y \sin \theta \right )^{k}}{k!}\, \mathrm{d}\theta \\ &=\int_{0}^{2\pi }\theta \sum_{k=0}^{\infty }\frac{1}{k!}\sum_{j=0}^{k}\binom{k}{j}y^{j}\sin^{j}\theta x^{k-j}\cos^{k-j}\theta \, \mathrm{d}\theta \\ &=\sum_{k=0}^{\infty }\frac{1}{k!}\sum_{j=0}^{k}\binom{k}{j}y^{j}x^{k-j}\int_{0}^{2\pi }\theta \sin^{j}\theta \cos^{k-j}\theta \, \mathrm{d}\theta \end{align*} For the last integral, with the help of Mathematica we get the following complex result \begin{align*} \int_{0}^{2\pi }\theta \sin^{m}\theta \cos^{n}\theta \, \mathrm{d}\theta =&\frac{(-1)^{m+n} \pi ^2 \csc \left(\frac{n \pi }{2}\right) \csc \left(\frac{\pi m}{2}+\frac{n \pi }{2}\right) \Gamma \left(\frac{n}{2}+\frac{1}{2}\right)}{4 \Gamma \left(\frac{1}{2}-\frac{m}{2}\right) \Gamma \left(\frac{m}{2}+\frac{n}{2}+1\right)}+\frac{\pi ^2 \csc \left(\frac{n \pi }{2}\right) \csc \left(\frac{\pi m}{2}+\frac{n \pi }{2}\right) \Gamma \left(\frac{n}{2}+\frac{1}{2}\right)}{4 \Gamma \left(\frac{1}{2}-\frac{m}{2}\right) \Gamma \left(\frac{m}{2}+\frac{n}{2}+1\right)}\\ &+(-1)^{m+n} 2^{\frac{m}{2}-\frac{1}{2}} \cos \left(\frac{m \pi }{2}\right) \Gamma \left(\frac{m}{2}+\frac{1}{2}\right) \Gamma \left(-\frac{m}{2}-n-\frac{1}{2}\right) \Gamma (n+1) \, _2F_1\left(\frac{1-m}{2},\frac{m+1}{2};\frac{m}{2}+n+\frac{3}{2};\frac{1}{2}\right)\\ &+\frac{(-1)^{m+2 n} 2^{\frac{m}{2}-\frac{1}{2}} \pi \Gamma \left(\frac{m}{2}+\frac{1}{2}\right) \Gamma (n+1) \, _2F_1\left(\frac{1-m}{2},\frac{m+1}{2};\frac{m}{2}+n+\frac{3}{2};\frac{1}{2}\right)}{\Gamma \left(\frac{m}{2}+n+\frac{3}{2}\right)}\\ &+\frac{(-1)^{m+n} \Gamma \left(\frac{n}{2}\right) \Gamma \left(\frac{m}{2}+1\right) \, _3F_2\left(\frac{1}{2},1,\frac{m}{2}+1;\frac{3}{2},1-\frac{n}{2};1\right)}{2 \Gamma \left(\frac{m}{2}+\frac{n}{2}+1\right)}\\ &+\frac{\Gamma \left(\frac{n}{2}\right) \Gamma \left(\frac{m}{2}+1\right) \, _3F_2\left(\frac{1}{2},1,\frac{m}{2}+1;\frac{3}{2},1-\frac{n}{2};1\right)}{2 \Gamma \left(\frac{m}{2}+\frac{n}{2}+1\right)}\\ &+\frac{(-1)^n \Gamma \left(\frac{m}{2}\right) \Gamma \left(\frac{n}{2}+1\right) \, _3F_2\left(\frac{1}{2},1,\frac{n}{2}+1;\frac{3}{2},1-\frac{m}{2};1\right)}{2 \Gamma \left(\frac{m}{2}+\frac{n}{2}+1\right)}\\ &+\frac{(-1)^{m+2 n} \Gamma \left(\frac{m}{2}\right) \Gamma \left(\frac{n}{2}+1\right) \, _3F_2\left(\frac{1}{2},1,\frac{n}{2}+1;\frac{3}{2},1-\frac{m}{2};1\right)}{2 \Gamma \left(\frac{m}{2}+\frac{n}{2}+1\right)}\\ &+\frac{(-1)^n \pi \Gamma \left(\frac{m}{2}+\frac{1}{2}\right) \left(\pi \csc \left(\frac{m \pi }{2}\right) \csc \left(\frac{\pi m}{2}+\frac{n \pi }{2}\right)+\pi \sec \left(\frac{n \pi }{2}\right)\right)}{4 \Gamma \left(\frac{1}{2}-\frac{n}{2}\right) \Gamma \left(\frac{m}{2}+\frac{n}{2}+1\right)}\\ &+\frac{(-1)^{m+2 n} \pi \Gamma \left(\frac{m}{2}+\frac{1}{2}\right) \left(\pi \csc \left(\frac{m \pi }{2}\right) \csc \left(\frac{\pi m}{2}+\frac{n \pi }{2}\right)+\pi \sec \left(\frac{n \pi }{2}\right)\right)}{4 \Gamma \left(\frac{1}{2}-\frac{n}{2}\right) \Gamma \left(\frac{m}{2}+\frac{n}{2}+1\right)}\\ &+\frac{(-2)^{m+n} \pi ^{5/2} \Gamma \left(\frac{m}{2}+\frac{1}{2}\right) \sec \left(\frac{\pi m}{2}+n \pi \right)}{\Gamma \left(\frac{1}{2}-\frac{n}{2}\right) \Gamma \left(-\frac{m}{2}-\frac{n}{2}+\frac{1}{2}\right) \Gamma (m+n+1)} \end{align*} Looking at this horrible result, If I'm not doing the wrong way, I don't there will be a closed form for the integral, as least it won't be too short.
Best Answer
This is inspired by a deleted solution of a similar question (Calculating the following integral using complex analysis: $\int_{0}^{\pi}e^{a\cos(\theta)}\cos(a\sin(\theta))\, d\theta$), containing no details, though:
Let $$I(a)=\int^{2\pi}_0 e^{a \sin \theta} \cos(a \cos \theta)\,d\theta.$$ Then, $$\frac{d}{d a}I(a) = \int^{2\pi}_0 e^{a \sin \theta} (\sin \theta\cos(a \cos \theta) - \cos \theta\sin(a \cos \theta))\,d\theta.\tag{1}$$ Since $$\frac{d}{d\theta}(e^{a \sin \theta} \sin(a \cos \theta)) = -a e^{a \sin \theta} (\sin \theta\cos(a \cos \theta) - \cos \theta\sin(a \cos \theta)),$$ the RHS of (1) is $0$ for $a>0$, i.e. $I(a)$ is a constant, implying $$I(a)=\lim_{a\to0^+}I(a)=2\pi.\tag{2}$$ Differentiation under the integral sign and the limit in (2) can be justified using the standard ("elementary") methods of real anaysis, like dominated convergence theorem etc.
I guess the solution was deleted because the question explicitly asked for an answer using complex analysis. Let's face it: to distinguish between "elementary" and complex analysis was dubious (and mere tradition) already 100 years ago, it's absolutely ludicrous in the 21st century.