This is making me feel quite stupid right now, but I have the following integral that is messing with my head

$\displaystyle \frac{1}{2\gamma} \int_{-\infty}^{\infty}\! \frac{d^2}{dx^2}\left[e^{-\gamma |x - y|}\right] q(y)\, dy$

Where $\displaystyle q:\mathbb{R}\rightarrow\mathbb{R}$ is continuous with compact support.

My first bit of instinct is to split the integral, because I need to know how to take that derivative. So there are two cases $\displaystyle x < y$ and $\displaystyle x>y$, but how do I translate this into the limits of the integral? It seems that I would split it like so

$\displaystyle \frac{1}{2\gamma} \left(\int_{-\infty}^{x}\! \frac{d^2}{dx^2}\left[e^{-\gamma |x - y|}\right] q(y)\, dy + \int_{x}^{\infty}\! \frac{d^2}{dx^2}\left[e^{-\gamma |x - y|}\right] q(y)\, dy\right)$.

$\displaystyle =\frac{1}{2\gamma} \left(\int_{-\infty}^{x}\! \frac{d^2}{dx^2}\left[e^{-\gamma (x - y)}\right] q(y)\, dy + \int_{x}^{\infty}\! \frac{d^2}{dx^2}\left[e^{-\gamma (y - x)}\right] q(y)\, dy\right)$

$\displaystyle =\frac{1}{2\gamma} \left(\int_{-\infty}^{x}\! \gamma^2e^{-\gamma (x - y)} q(y)\, dy + \int_{x}^{\infty}\! \gamma^2 e^{-\gamma (y - x)} q(y)\, dy\right)$

$\displaystyle =\frac{\gamma}{2} \left(\int_{-\infty}^{x}\! e^{-\gamma (x - y)} q(y)\, dy + \int_{x}^{\infty}\! e^{-\gamma (y - x)} q(y)\, dy\right)$

Does this seem correct?