8
$\begingroup$

Evaluate the limit:

$$\lim_{n\to\infty} \int_{0}^{\pi} e^x\cos(nx)\space dx$$

W|A tells that the limit is $0$, but i'm not sure why is that result or if this is the correct result.

5 Answers 5

16

Hint: Integrate by parts, letting $u=e^x$ and $dv=\cos nx \,dx$.

To get an explicit antiderivative, you will have to do two cycles of integration by parts. However, for the limit calculation, one cycle will do, and is in a sense more informative.

Added: We get $du=e^x\,dx$ and can take $v=\frac{1}{n}\sin nx$. Since $uv$ vanishes at both ends, we find that $$\int_0^\pi e^x \cos nx \,dx=-\frac{1}{n}\int_0^\pi e^x\sin nx \,dx.$$ But $|e^x\sin nx|\le e^x$.

  • 0
    ah. Got it! Thanks. I tried to avoid integration by parts, but it seems it works nice and is very useful in these situations.2012-06-15
  • 0
    This way works very fast.2012-06-15
14

This is a consequence of the much more general Riemann-Lebesgue lemma, which (in one version) says that for any $L^1(\mathbb R)$ function $f$ we have $$\lim\limits_{n\to\infty}\int_{-\infty}^\infty f(x)\cos(nx)dx=0.$$ In your case, the function $f$ is $$f(x)=\begin{cases} e^x &\text{if }\; 0\leq x\leq\pi\\ 0 &\text{otherwise} \end{cases}$$ which is certainly in $L^1(\mathbb R)$. This lemma can be proven for characteristic functions of intervals by integrating by parts, then using linearity of integration extended to step functions, and finally proven by using the density of step functions in $L^1(\mathbb R)$.

  • 0
    nice. I didn't know of this lemma. Thanks!2012-06-15
  • 0
    Wasn't the lemma stated with $\sin x$ instead of $\cos x$?2012-06-15
  • 0
    @PeterTamaroff: It ought to work for either -- and indeed for any periodic function whose integral over one period vanishes.2012-06-15
  • 0
    @HenningMakholm After posting that came to mind. For example, would it work for $B(\{x\})$, the periodic Bernoulli polynomials?2012-06-15
  • 0
    @PeterTamaroff The proof I outlined indeed works for "any periodic function whose integral over one period vanishes", since given any interval for sufficiently large $n$ the interval is almost an integer multiple of the period, so the integral over the interval becomes arbitrarily small.2012-06-15
  • 0
    @PeterTamaroff: I expect that the intuitive explanation in my answer could be made rigorous for those. It's possible that one needs to require it to be bounded in addition to just integrable with vanishing integral, but $B(\{x\})$ should certainly qualify.2012-06-15
  • 0
    @HenningMakholm Interesting, thanks!2012-06-15
  • 0
    @Henning Makholm We can still say something substantial when the integral over a period does not vanish. See [here](http://math.stackexchange.com/questions/105258/integral-involving-a-periodic-function/105275#105275).2012-06-16
9

Here's the standard non-integration by parts form of the intergral, using Euler's identity:

$$\begin{align} \int_0^\pi e^x \cos(nx)\ dx &= \mathfrak{Re}\left(\int_0^\pi e^x e^{inx}\ dx \right) \\ &= \mathfrak{Re}\left(\int_0^\pi e^{(1+in)x}\ dx \right) \\ &= \mathfrak{Re}\left( \left. \frac{1}{1+in}e^{(1+in)x} \right |_0^\pi\right) \\ &= \mathfrak{Re}\left( \left. \frac{1-in}{1+n^2}e^{(1+in)x} \right |_0^\pi\right) \\ \end{align}$$ and it's relatively straightforward to find an explicit form for the latter term using Euler's identity the 'other way', but not even necessary; from here all the exponential terms in $n$ are clearly going to wind up as $\sin(nx)$ and $\cos(nx)$ terms before evaluating, and so they're drowned out by the $O(1/n)$ factor in front of the evaluation.

  • 0
    i like to see for each problem a bunch of various solutions. Very short proof. Thanks.2012-06-15
7

The intuitive reason why this is true is that successive half-waves of the cosine cancel each other out, since every other half-wave is the negative of its neighbor.

The canceling is not perfect because two neigboring half-waves get multiplied by different parts of the $e^x$ factor. But $e^x$ is continuous, which means that it is "almost constant" when we look only at small $x$ intervals. As $n$ increases, the partial canceling-out of neighboring half-waves takes place across shorter and shorter $x$ intervals, which means the the $e^x$ multipliers become more and more the same between neighboring half-waves.

In the $n\to\infty$ limit, the cancellation becomes perfect.

  • 0
    a good explanation! Less formulas! Thanks! :-)2012-06-15
  • 0
    I was about to write this same intuitive explanation as answer. :)2012-06-15
5

This might be the more mechanical solution. André's is very clever.

Let $$I(n) =\int_0^\pi e^x \cos nx dx$$

The $nx = u$, we get

$$I(n) =\frac{1}{n} \int_0^{\pi n} e^{u/n} \cos u du$$

$$I(n) =\frac{1}{n} \int_0^{\pi n} e^{\alpha u} \cos u du$$

with $\alpha =1/n$.

We have that

$$\int_0^{\pi n} {{e^{\alpha u}}} \cos udu = \left. {{e^{\alpha u}}\frac{{\alpha \cos u + \sin u}}{{1 + {\alpha ^2}}}} \right|_0^{\pi n} = {e^\pi }\frac{{\cos \pi n + n\sin \pi n}}{{n + \frac{1}{n}}} - \frac{1}{{n + \frac{1}{n}}}$$

So that

$$\int_0^\pi {{e^x}} \cos nxdx = {e^\pi }\frac{{\cos \pi n + n\sin \pi n}}{{{n^2} + 1}} - \frac{1}{{{n^2} + 1}}$$

From this it is evident

$$\mathop {\lim }\limits_{n \to \infty } \int_0^\pi {{e^x}} \cos nxdx = {e^\pi }\mathop {\lim }\limits_{n \to \infty } \frac{{\cos \pi n + n\sin \pi n}}{{{n^2} + 1}} - \mathop {\lim }\limits_{n \to \infty } \frac{1}{{{n^2} + 1}} = 0$$