How do I integrate
$$ \int_{-\infty}^\infty\exp\left(\vphantom{\Huge A^{A}}% -\frac{1}{2}\left[n + {1 \over k}\right] \left[\mu-\frac{\varepsilon/k + \sum_{i = 1}^{n}x_i}{n + 1/k}\right]^2 \right) \; d\mu$$
The answer is supposed to be $$\frac{\sqrt{2\pi}}{(n+\frac{1}{k})^{1/2}}$$
It appears this the integral is something of the form
$$\int e^{g(\mu-\frac{h}{g})^2} \; d\mu$$
How do I integrate such a thing? I tried expanding the square part but am not sure I know how to integrate it either
If I try integration by substitution, what do I substitute with? If I do
$$u = \mu-\frac{h}{g}$$
then I still get something like
$$\int e^{gu^2} \, du$$
theres a $u^2$ ... which I dont know how to integrate
UPDATE: Background - full question from my lecture
Its actually a probability question, but the integration part in question is marked with a red arrow ...

