1

I would like to compute either of the following integrals: $$\int e^{\cos(x-a)} \, dx$$ or $$\int_{-\pi}^{\pi} e^{\cos(x-a)} \, dx$$

In both cases, $a$ is a constant.

MATLAB doesn't seem to be helpful with either.

krish
  • 175
  • Have you trief wolfram alpha online? – MrYouMath Jun 30 '16 at 13:00
  • I've edited your question to clean it up. Please make sure I didn't lose accuracy of what you intended. –  Jun 30 '16 at 13:04
  • @MrYouMath, this is what I got on wolfram alpha

    Input:

    integral exp(cos(x-a)) dx

    Indefinite integral:

    (no result found in terms of standard mathematical functions)

    – krish Jun 30 '16 at 13:08
  • @krish: There is no representation using elementary functions. But you might get a numerical solution for the definit integral. – MrYouMath Jun 30 '16 at 13:09
  • @MrYouMath, in case of a definite integral, I want the answer to be in terms on only a, where 'a' is some unspecified constant – krish Jun 30 '16 at 13:12
  • @krish I think you will not be able to get that. You could try to get approximate solutions. Eg use the taylor series of exp function with remainder term and integrate it for the definit case. – MrYouMath Jun 30 '16 at 13:19

2 Answers2

5

The integrand is periodic, with period $2\pi$, so the second one is independent of $a$. In fact $$ \int_{-\pi}^\pi e^{\cos(x-a)}\,dx = 2\pi I_0(1) \approx 7.9549 $$ where $I_0$ is a certain Bessel function.

In the integral form for $I_\alpha(x)$ given on that page, put $x=1$ and $\alpha=0$.

GEdgar
  • 111,679
1

For $\int e^{\cos(x-a)}~dx$ ,

$\int e^{\cos(x-a)}~dx$

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

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

For $n$ is any natural number,

$\int\cos^{2n}(x-a)~dx=\dfrac{(2n)!x}{4^n(n!)^2}+\sum\limits_{k=1}^n\dfrac{(2n)!((k-1)!)^2\sin(x-a)\cos^{2k-1}(x-a)}{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-a)~dx$

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

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

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

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

$\therefore\int\left(1+\sum\limits_{n=1}^\infty\dfrac{\cos^{2n}(x-a)}{(2n)!}\right)dx+\int\sum\limits_{n=0}^\infty\dfrac{\cos^{2n+1}(x-a)}{(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-a)\cos^{2k-1}(x-a)}{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-a)}{(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-a)\cos^{2k-1}(x-a)}{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-a)}{(2n+1)!k!(n-k)!(2k+1)}+C$

Harry Peter
  • 7,819