# What is the integral of $e^{\cos x}$

Question:

Find out $$\displaystyle{\int e^{\cos x}~dx}$$.

My Attempt:

Let $$\cos x = y$$. Hence $$-\sin x\ dx = dy$$ or $$dx = \displaystyle{\frac{-dy}{\sin x}=\frac{-dy}{\sqrt{1-\cos^2x}}=\frac{-dy}{\sqrt{1-y^2}}}$$ So

\begin{align}\int e^{\cos x}~dx &= \int e^y\left(\frac{-dy}{\sqrt{1-y^2}}\right)\\ &=-\int\frac{e^y}{\sqrt{1-y^2}}~dy \end{align}

This integral is one I can't solve. I have been trying to do it for the last two days, but can't get success. I can't do it by parts because the new integral thus formed will be even more difficult to solve. I can't find out any substitution that I can make in this integral to make it simpler. Please help me solve it. Is the problem with my first substitution $$y=\cos x$$ or is there any other way to solve the integral $$\displaystyle{\int\frac{e^y}{\sqrt{1-y^2}}~dy}$$?

• there in no solution known – Dr. Sonnhard Graubner Oct 12 '17 at 9:09
• I don’t think the indefinite integral could be expressed in elementary functions. – BAI Oct 12 '17 at 9:09
• – GEdgar Oct 12 '17 at 11:09
• A related question. – Lucian Aug 21 at 8:43

Although this indefinite integral has no known closed form, certain definite integrals are known... $$\int_0^\pi e^{\cos x}\;dx = \pi\;I_0(1) ,$$ where $I_0$ is a modified Bessel function

First of all: there is no close form solution in terms of elementary functions.

What can you do, but it's not an exact result and also its validity is bounded, is to express the exponential as a Taylor series:

$$e^{\cos x} = \sum_{k = 0}^{+\infty} \frac{(\cos x)^k}{k!}$$

hence the integral becomes

$$\sum_{k = 0}^{+\infty} \frac{1}{k!}\int \cos^k(x)\ \text{d}x$$

The integral can be evaluated with a "close" form (not really since it does involte an Hypergeometric Function which is itself a series) as follow:

$$\int \cos^k(x)\ \text{d}x = -\frac{\sin (x) \cos ^{k+1}(x) \, _2F_1\left(\frac{1}{2},\frac{k+1}{2};\frac{k+3}{2};\cos ^2(x)\right)}{(k+1) \sqrt{\sin ^2(x)}}$$

Hence in the end the solution:

$$\sum_{k = 0}^{+\infty} \frac{1}{k!}\left(-\frac{\sin (x) \cos ^{k+1}(x) \, _2F_1\left(\frac{1}{2},\frac{k+1}{2};\frac{k+3}{2};\cos ^2(x)\right)}{(k+1) \sqrt{\sin ^2(x)}}\right)$$

You may get satisfied in taking the first $n$ terms of the series...

Remarks

As I said, it's not a real close solutions, since it does involve two series and a Taylor expansion, but I believe it's the best you can obtain.

• "First of all: there is no close form solution in terms of elementary functions." Can this be proven, or is it just that no closed form is known? – Qudit Oct 12 '17 at 21:07
• @Qudit By applying the Risch Algorithm you can easily prove and find that there is no close form / elementary function primitive! – Von Neumann Oct 13 '17 at 6:45

This is just a response to your comments about having tried integration by parts for this problem.

By parts:

$$\int 1\cdot e^{\cos x}\text dx = x\cdot e^{\cos x}+\int x \cdot\sin x \cdot e^{\cos x}\text dx$$

Applying parts (and substitution of $\cos x$) for the integral on the right hand side, we get:

$$\int x \cdot\sin x \cdot e^{\cos x}\text dx = -x\cdot e^{\cos x}+\int e^{\cos x}\text dx$$

This, unfortunately, simply gives us the circular, and not very helpful, result that:

$$\int e^{\cos x}\text dx = \int e^{\cos x}\text dx$$

$$\int e^{\cos x}~dx$$

$$=\int\sum\limits_{n=0}^\infty\dfrac{\cos^{2n}x}{(2n)!}dx+\int\sum\limits_{n=0}^\infty\dfrac{\cos^{2n+1}x}{(2n+1)!}dx$$

$$=\int\left(1+\sum\limits_{n=1}^\infty\dfrac{\cos^{2n}x}{(2n)!}\right)dx+\int\sum\limits_{n=0}^\infty\dfrac{\cos^{2n+1}x}{(2n+1)!}dx$$

For $$n$$ is any natural number,

$$\int\cos^{2n}x~dx=\dfrac{(2n)!x}{4^n(n!)^2}+\sum\limits_{k=1}^n\dfrac{(2n)!((k-1)!)^2\sin x\cos^{2k-1}x}{4^{n-k+1}(n!)^2(2k-1)!}+C$$

This result can be done by successive integration by parts.

For $$n$$ is any non-negative integer,

$$\int\cos^{2n+1}x~dx$$

$$=\int\cos^{2n}x~d(\sin x)$$

$$=\int(1-\sin^2x)^n~d(\sin x)$$

$$=\int\sum\limits_{k=0}^nC_k^n(-1)^k\sin^{2k}x~d(\sin x)$$

$$=\sum\limits_{k=0}^n\dfrac{(-1)^kn!\sin^{2k+1}x}{k!(n-k)!(2k+1)}+C$$

$$\therefore\int\left(1+\sum\limits_{n=1}^\infty\dfrac{\cos^{2n}x}{(2n)!}\right)dx+\int\sum\limits_{n=0}^\infty\dfrac{\cos^{2n+1}x}{(2n+1)!}dx$$

$$=x+\sum\limits_{n=1}^\infty\dfrac{x}{4^n(n!)^2}+\sum\limits_{n=1}^\infty\sum\limits_{k=1}^n\dfrac{((k-1)!)^2\sin x\cos^{2k-1}x}{4^{n-k+1}(n!)^2(2k-1)!}+\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^kn!\sin^{2k+1}x}{(2n+1)!k!(n-k)!(2k+1)}+C$$

$$=\sum\limits_{n=0}^\infty\dfrac{x}{4^n(n!)^2}+\sum\limits_{n=1}^\infty\sum\limits_{k=1}^n\dfrac{((k-1)!)^2\sin x\cos^{2k-1}x}{4^{n-k+1}(n!)^2(2k-1)!}+\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^kn!\sin^{2k+1}x}{(2n+1)!k!(n-k)!(2k+1)}+C$$