Consider the Hilbert space $H$ of square-integrable complex functions on the real line equipped with the inner product $$\langle \phi,\psi\rangle:=\int \phi^*\psi d\mu,$$ where $\mu$ is the Lebesgue measure and $*$ denotes complex conjugation. For a given $\psi\in H$, with $\|\psi\| := \sqrt{\langle \psi, \psi\rangle} = 1$, define the expectation value $\langle Q \rangle$ of an operator $\hat{Q}$ on $H$ as $\langle Q \rangle:=\int \psi^* \hat Q\psi d\mu$.
Clearly, the function $\psi(x) = e^{-|x|}$ is in $H$ and the momentum operator $\hat{p}:=-i\frac{d}{dx}$ is a symmetric operator on (a subset of) $H$. The computation for $\langle p^2 \rangle$ is as follows:
\begin{align*} \langle p^2 \rangle &= \int_{-\infty}^\infty e^{- |x|} \left(-\frac{d^2}{dx^2}\right)e^{- |x|} dx\\ &= -\int_{-\infty}^\infty e^{- |x|} \frac{d^2}{dx^2}e^{- |x|} dx = -\left(\int_{-\infty}^0 e^{ x} \frac{d^2}{dx^2}e^{ x} dx + \int^\infty_0 e^{- x} \frac{d^2}{dx^2}e^{- x} dx\right)\\ &= -\left(\int_{-\infty}^0 e^{2 x} dx + \int^\infty_0 e^{-2 x} dx\right) = -2 \int^\infty_0 e^{-2\alpha x} dx = -1. \end{align*}
Which I find strange because by symmetry we should have $\langle p^2\rangle = \langle \psi,\hat p^2\psi\rangle = \langle \hat p\psi,\hat p\psi\rangle\geq0$. I have tried to figure out what might be the problem and have come to the following conclusions:
$\psi$ is not differentiable at $x=0$, but that should not be an issue under the integral sign since $\{0\}$ is a set of measure zero.
My computation is wrong and have checked it numerous times.
Please help.