# Double Integral of an Exponential Function with an Absolute Value in the Numerator of the Exponent

This is a question related to statistics, but my major concern relates to the setup and evaluation of integrals. So I decided this question was better suited for Mathematics Exchange than CV.

I know the following...

$E[S(x)]=\mu , \\ Var[S(x)]= \sigma^{2} , \\ \rho(h)= \mathrm{e}^{\left(-\tfrac{h}{\phi} \right)} , \\ R(x)=(2\theta)^{-1} \int\limits_{x-\theta}^{x+\theta} S(u) \, du , \\ \implies Cov \left[ S(u), S(v) \right] = \gamma(h) =\sigma^{2} \mathrm{exp} \left\{-\frac{|h|}{\phi} \right\} = \sigma^{2} \mathrm{exp} \left\{-\frac{| u-v|}{\phi} \right\}.$

I also know,

$E[R(x)]= (2\theta)^{-1} \mu \ (2\theta) = \mu.$

What I want to know is $Cov[R(x), R(y)]$.

Here is what I have so far...

\begin{align} Cov \left[R(x), R(y) \right] &=Cov \left[(2\theta)^{-1} \int\limits_{x-\theta}^{x+\theta} S(u) \, du, \ (2\theta)^{-1} \int\limits_{y-\theta}^{y+\theta} S(v) \, dv \right] \\ &= (2\theta)^{-2} \ Cov \left[ \ \int\limits_{x-\theta}^{x+\theta} S(u) \, du, \ \int\limits_{y-\theta}^{y+\theta} S(v) \, dv \right] \\ &= (2\theta)^{-2} \int\limits_{x-\theta}^{x+\theta} \int\limits_{y-\theta}^{y+\theta} \ Cov \left[ S(u), S(v) \right] \ du \ dv \\ &= (2\theta)^{-2} \int\limits_{x-\theta}^{x+\theta} \int\limits_{y-\theta}^{y+\theta} \sigma^{2} \mathrm{exp} \left\{-\tfrac{| u-v|}{\phi} \right\} \ du \ dv \\ &= (2\theta)^{-2} \ \sigma^{2} \int\limits_{x-\theta}^{x+\theta} \int\limits_{y-\theta}^{y+\theta} \mathrm{exp} \left\{-\tfrac{| u-v|}{\phi} \right\} \ du \ dv \end{align}

Here, I am having trouble understanding how to properly set up this integral. I have been told this is what it should look like... $$(2\theta)^{-2} \ \sigma^{2} \int\limits_{x-\theta}^{x+\theta} \int\limits_{v}^{y+\theta} \mathrm{exp} \left\{-\frac{(u-v)}{\phi} \right\} \ du \ dv + (2\theta)^{-2} \ \sigma^{2} \int\limits_{y-\theta}^{y+\theta} \int\limits_{u}^{x+\theta} \mathrm{exp} \left\{-\frac{(v-u)}{\phi} \right\} \ dv \ du$$

I have a few questions. What is the intuition regarding splitting the two integrals into two double integrals? How do you deiced on the bounds and order of the integration? Why is the order of $u$ and $v$ in the exponent changed? And how would I go about integrating the following...

$$\int\limits_{x-\theta}^{x+\theta} \int\limits_{v}^{y+\theta} \mathrm{exp} \left\{-\frac{(u-v)}{\phi} \right\} \ du \ dv$$

Thanks for the help!

• You split the integral up into two parts because that's effectively what the absolute value is doing - when $x\geq0$, $|x|=x$, and when $x<0$, $|x|=-x$, the two parts being positive and negative $x$. – danimal Apr 26 '15 at 22:19
• The idea is to get rid of the absolute value in the exponential. You have to separate some cases in the integration : $u\leq v \Rightarrow \lvert u-v \rvert = -(u-v)$ and $v\leq u\Rightarrow \lvert u-v \rvert = u-v$. Integrate your last integral is straightforward unless $\phi = \phi(u,v)$ – Joelafrite Apr 26 '15 at 22:27
• @danimal So when the $1>0, \ |1|=1$ and when $-1<0, \ |-1|=-1$? That doesn't make sense to me. Perhaps I am missing something. – k6adams Apr 26 '15 at 22:33
• @Joelaftite $\phi$ is not equal to $\phi (u, v)$, but I am glad you pointed that out. As for the integral being straight forward, lol. I am a statistician by trade so I can have other people do the hard work upfront and then get credit ;). Any suggestions as to how to start? – k6adams Apr 26 '15 at 22:45
• @k6adams If $\phi$ is constant then first you have to compute $I(v) = \int\limits_v^{y+\theta} \exp{-\dfrac{u-v}{\phi}} du$ treating $v$ as a constant. Hint : $I(v) = -\phi \int\limits_v^{y+\theta} -\dfrac{1}{\phi} \exp{-\dfrac{u-v}{\phi}} du$ you will probably recognize the derivative of a function. Once you have calculated $I(v)$ you just have to integrate : $\int\limits_{x-\theta}^{x+\theta} I(v) dv$. – Joelafrite Apr 26 '15 at 22:56