5

Show that $\int_0^\infty e^{-x}\cos x \ \text{d}x=\int_0^\infty e^{-x} \sin x \ \text{d}x$ using integration by parts.

For the LHS, I got: $-e^{-x} \cos x-\int e^{-x} \sin x \ \text{d}x$

I'm not sure how to show that the RHS integral is equal to this...

Cookie
  • 13,532
Jim
  • 1,210
  • Integration by parts works watch out the sign of the integral part (derivative of cosine is minus sine) and non integral part goes to 0 both at zero and at infinity – marwalix Jan 14 '15 at 19:51
  • 1
    If you integrate by parts twice you can even derive the value of the integral – marwalix Jan 14 '15 at 22:18

5 Answers5

16

Here is an answer that does not use integration by parts:

$$\int_0^\infty e^{-x} e^{ix} dx = \int_0^\infty e^{-x} \cos x dx + i \int_0^\infty e^{-x} \sin x dx = {1 \over i-1} e^{(i-1)x} \big|_0^\infty = {1 \over 2} (1+i)$$ hence $$\int_0^\infty e^{-x} \cos x dx = \int_0^\infty e^{-x} \sin x dx = {1 \over 2}$$

Teoc
  • 8,700
copper.hat
  • 172,524
13

Integrating by parts twice for each of the following gives

\begin{align} \int_0^\infty e^{-x} \cos x \, dx &=\left.-\frac 12e^{-x}(\sin x+\cos x) \right\vert_0^\infty= \frac 12 \\ \int_0^\infty e^{-x} \sin x \, dx &= \left.\frac 12e^{-x}(\sin x-\cos x) \right\vert_0^\infty = \frac 12 \end{align}

Cookie
  • 13,532
  • You don't even need to do that. The question asks to show they're equal, not to compute the values. – Dylan Jan 15 '15 at 21:17
  • Computing the values is only one way to do it. If you have a solution that does not require computing said values, you are more than welcome to present your solution here. – Cookie Jan 15 '15 at 21:49
  • I'm just saying there can be a faster way. The solution I'm talking about is posted by egreg. – Dylan Jan 15 '15 at 21:55
13

$$\int_{0}^{+\infty}(\cos x-\sin x) e^{-x}\,dx = \left.e^{-x}\sin x\right|_{0}^{+\infty} = 0.$$

Jack D'Aurizio
  • 353,855
11

You don't need to compute the integrals to show that they're equal. First of all, for any bounded function $f$ on $[0,\infty)$, the integral $$ \int_0^\infty e^{-x}f(x)\,dx $$ converges absolutely, because, if $|f(x)|\le k$, we have $|e^{-x}f(x)|\le ke^{-x}$ and $$ \int_0^\infty e^{-x}\,dx $$ converges.

Now, integrating by parts, $$ \int_0^{\infty}e^{-x}\cos x\,dx= [e^{-x}\sin x]_0^{\infty}-\int_0^\infty (-e^{-x})\sin x\,dx= \int_0^\infty e^{-x}\sin x\,dx $$ because, clearly, $$ \lim_{x\to\infty}e^{-x}\sin x=0. $$

egreg
  • 238,574
7

firstly you look the LHS:

$$\int \:e^{-x}\cos \left(x\right)dx$$ Now you substitute with $u=-x:\quad \quad du=-1dx,\:\quad \:dx=\left(-1\right)du$: So, \begin{align*} =\int \:e^u\cos \left(x\right)\left(-1\right)du \\ =\int \:-e^u\cos \left(x\right)du \\ \end{align*} Substitute: $u=-x\quad \Rightarrow \quad \:x=-u$ $$\Rightarrow =-\int \:e^u\cos \left(-u\right)du =-\int \:e^u\cos \left(u\right)du$$ $\mathrm{Apply\:Integration\:By\:Parts}:\quad \int \:uv'=uv-\int \:u'v$ $$=-\left(e^u\sin \left(u\right)-\int \:e^u\sin \left(u\right)du\right)$$ $$=-\left(e^u\sin \left(u\right)-\left(e^u\left(-\cos \left(u\right)\right)-\int \:e^u\left(-\cos \left(u\right)\right)du\right)\right)$$ $$=-\left(e^u\sin \left(u\right)-\left(-e^u\cos \left(u\right)-\int \:-e^u\cos \left(u\right)du\right)\right)$$ $\mathrm{Isolate}\:\int \cos \left(u\right)e^udu$ $$=-\frac{e^u\left(\sin \left(u\right)+\cos \left(u\right)\right)}{2}$$ $\mathrm{Substitute\:back}\:u=-x$ , simplify and add a constant: $$=-\frac{e^{-x}\left(\cos \left(x\right)-\sin \left(x\right)\right)}{2}+C$$ Now calculate the limes for $x\to\infty$: $$\lim _{x\to \infty \:}\left(-\frac{e^{-x}\left(\cos \left(x\right)-\sin \left(x\right)\right)}{2}\right)=0$$ Now, the limes for $x\to 0+$: $$\lim _{x\to \:0+}\left(-\frac{e^{-x}\left(\cos \left(x\right)-\sin \left(x\right)\right)}{2}\right)=-\frac{1}{2}$$ $$\Rightarrow 0-\left(-\frac{1}{2}\right) = \frac{1}{2}$$

I hope you can do this for the RHS :)