# Verification of convolution between gaussian and uniform distributions

Let $n \sim \mathcal{N}(\mu, \sigma^2)$ and let $u \sim \mathcal{U}(a,b)$, with $b>a>0$, and suppose that $n$ and $u$ are independent random variables. Let $g = n + u$. The probability density function (pdf) of $g$, denoted with $p(\cdot)$, is the convolution between the gaussian distribution and the uniform distribution and, if my derivation is correct, it should be given by the following expression $$(*) \quad \quad p(t) = \frac{1}{(b-a)\sqrt{2 \pi \sigma^2}} \int_{a+\mu}^{b+\mu} \exp \left\{-\frac{(\tau -t)^2}{2\sigma^2} \right\} d\tau$$

Besides the verification if $(*)$ is correct, I'm looking for a generalization to $N$-dimensional spaces. Let $\mathbf{n} \sim \mathcal{N}_N(\mathbf{m}, \mathbf{C})$ and let $\mathbf{u}$ be a vector of indipendent uniform random variables, each defined in a (possibly) different interval $(a,b)$, i.e. $u_1 \sim \mathcal{U}(a_1, b_1)$, $u_2 \sim \mathcal{U}(a_2, b_2)$, and so on, with the only condition that $b_i > a_i > 0$. The vectors $\mathbf{a,b}$ cointain these scalars.

As before, $\mathbf{n} \in \mathbb{R}^{N \times 1}$ and $\mathbf{u} \in \mathbb{R}^{N \times 1}$ are indipendent; let $\mathbf{g} = \mathbf{n} + \mathbf{u}$. Is the pdf of $\mathbf{g}$ of the type $$(**) \quad \quad p(\mathbf{t}) \propto \frac{1}{\sqrt{\det(\mathbf{C})}} \int_{\mathbf{a}+\mathbf{m}}^{\mathbf{b}+\mathbf{m}} \exp \left\{ -\frac{1}{2}(\mathbf{v-t})^T \mathbf{C}^{-1}(\mathbf{v-t}) \right\} d\mathbf{v}$$ where $^T$ denotes transpose? If $\mathbf{C}$ is a diagonal matrix (making the gaussian variables indipendent from each other), can the integral be splitted in smaller pieces, in the sense that the $N$-dimensional integral becomes the product of $N$ monodimensional integrals?

For the second formula, there are 2 missing factors: $$\frac 1{\prod_{k=1}^N (b_k - a_k)}$$ which is the inverse of the total weight of the uniform distribution, and $$\frac 1{(2\pi)^{N/2}}$$ to make sure the weight of the normal distribution is 1.
For the third question, if $C = \text{diag}(\sigma_1^2, \dots \sigma_N^2)$ then the integrand splits and becomes $$\prod_{k=1}^N \int_{m_k + a_k}^{m_k + b_k} \frac 1{(b_k-a_k)\sqrt{2\pi\sigma_k^2}} \exp\left(-\frac {(v_k - t_k)^2}{2\sigma_k^2}\right) dt_k$$ so the coordinates remain independent.