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...

  • $\begingroup$ 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 $\endgroup$ – marwalix Jan 14 '15 at 19:51
  • 1
    $\begingroup$ If you integrate by parts twice you can even derive the value of the integral $\endgroup$ – marwalix Jan 14 '15 at 22:18

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}

  • $\begingroup$ You don't even need to do that. The question asks to show they're equal, not to compute the values. $\endgroup$ – Dylan Jan 15 '15 at 21:17
  • $\begingroup$ 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. $\endgroup$ – Cookie Jan 15 '15 at 21:49
  • $\begingroup$ I'm just saying there can be a faster way. The solution I'm talking about is posted by egreg. $\endgroup$ – Dylan Jan 15 '15 at 21:55

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}$$

  • $\begingroup$ Why the downvote? $\endgroup$ – copper.hat Jan 28 '15 at 22:51
  • $\begingroup$ I am truly curious. Why the second downvote? The answer is correct, simple and is not the only answer that does not use integration by parts. $\endgroup$ – copper.hat Feb 3 '15 at 23:24

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

  • 3
    $\begingroup$ Jack D'Aurizio: nice. +1 $\endgroup$ – Olivier Oloa Jan 14 '15 at 21:30
  • 3
    $\begingroup$ I believe this is the only answer that shows why they are the same. Integration by parts solves it, but fails in this respect. +1 $\endgroup$ – hjhjhj57 Jan 28 '15 at 22:39

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. $$

  • $\begingroup$ egreg: nice. +1 $\endgroup$ – Olivier Oloa Jan 14 '15 at 21:32

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 :)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.