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.
 A: 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$$
A: 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}
$$
