# Help with calculating $\int_{-\infty}^{\infty}|e^{-|t|}|^2dt$

I'm given the task to calculate $$\int_{-\infty}^{\infty}|x(t)|^2dt$$ with $$x(t) =e^{-|t|}$$ (with $e$ being Euler's number).

This is how I would do it:

$$\int_{-\infty}^{\infty}|x(t)|^2dt = \int_{-\infty}^{\infty}|e^{-|t|}|^2dt = \int_{-\infty}^{\infty}e^{-2|t|}dt = \int_{-\infty}^0e^{2t}dt + \int_0^{\infty}e^{-2t}dt = \left[2e^{2t}\right]_{-\infty}^0 + \left[-2e^{-2t}\right]_0^{\infty} = (0 - 2) + (-2 - 0) =-4$$

However, [looking at the graph](https://www.google.nl/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=y+%3D+e%5E(-2*abs(x)), $(x(t))^2$ doesn't have any negative values, so integrating over it shouldn't give a negative number.

What am I doing wrong?

Thanks in advance.

Edit: Just to be sure, $t$ is a real variable.

• You flipped the sign on the differences – Kitter Catter Nov 23 '16 at 22:01
• Where do you mean? – Kevin Nov 23 '16 at 22:03
• Look at the limits of integration, then look at the differences you cslculate – Kitter Catter Nov 23 '16 at 22:04
• It should be 2-0 + 0-(-2)=4 – Kitter Catter Nov 23 '16 at 22:08
• Oh I did $[f(x)]_a^b = f(a) - f(b)$ instead of $[f(x)]_a^b = f(b) - f(a)$, what it should be. Must be because it's late. :) Thanks for your comments/answer! – Kevin Nov 23 '16 at 22:10

## 2 Answers

You are really close, your anti derivatives are off, and as Kitter Catter stated, you got your signs backwards. when you do the integral you evaluate the bound on top first, and then negate the lower bound. Doing so is going to give you two positives and then your answer should be $1$. It ought to look like this:

$$\int_{-\infty}^{\infty} \left| x(t) \right|^2dt = \int_{-\infty}^{\infty} \left| e^{-|t|} \right|^2dt = \int_{-\infty}^{\infty}e^{-2|t|}dt = \int_{-\infty}^0 e^{2t}dt + \int_0^{\infty} e^{-2t} dt = \left[\frac{1}{2} e^{2t} \right]_{-\infty}^0 + \left[\frac{-1}{2} e^{-2t} \right]_0^{\infty} = \left( \frac{1}{2} - 0 \right) + \left( 0 - \frac{-1}{2} \right) = 1$$

• Thanks, I made some stupid mistakes haha. – Kevin Nov 23 '16 at 22:11
• They were small mistakes, which are very different from stupid mistakes. You did a great job setting it all up, you should be proud, particularly about the first part setting it all up correctly, that's where the difficulty in this question lies. – Mitch Nov 23 '16 at 22:13
• @Mitch Nice answer and nice comment! (+1). – Olivier Oloa Nov 23 '16 at 22:15

Following your steps, one may write \begin{align} \int_{-\infty}^{\infty}|x(t)|^2dt &= \int_{-\infty}^{\infty}|e^{-|t|}|^2dt \\& = \int_{-\infty}^{\infty}e^{-2|t|}dt \\&= \int_{-\infty}^0e^{2t}dt + \int_0^{\infty}e^{-2t}dt \\&= \left[\frac12\cdot e^{2t}\right]_{-\infty}^0 + \left[-\frac12\cdot e^{-2t}\right]_0^{\infty} \\& =\left(\frac12 - 0\right) + \left(0+\frac12 \right) =1. \end{align} Alternatively, one may write using the parity of the integrand \begin{align} \int_{-\infty}^{\infty}|x(t)|^2dt &= \int_{-\infty}^{\infty}|e^{-|t|}|^2dt \\& = \int_{-\infty}^{\infty}e^{-2|t|}dt \\&= 2\int_0^{\infty}e^{-2t}dt \\&=2\cdot\left[-\frac12\cdot e^{-2t}\right]_0^{\infty} \\& =2 \cdot \frac12 \\&=1. \end{align}

• Thanks, it's a nice trick to use the symmetry about the y-axis. – Kevin Nov 23 '16 at 22:13
• @Kevin You are welcome. – Olivier Oloa Nov 23 '16 at 22:14