# Definite integral: exponential with squared exponent

1. Jan 28, 2009

### jumble0469

Hi,

I'm trying to solve the following:
$$f(x) = \int^\infty_{-\infty}ce^{yx-y^2/2} dy$$
where c is a constant
My only idea thus far was that since it is an even function, the expression can be simplified to:
$$= 2c\int^\infty_0 e^{y(x-{1/2}y)} dy$$

but I'm stuck here.

Anyone know how to do this?

2. Jan 28, 2009

### CompuChip

This is a Gaussian integral (which is ubiquitous in theoretical physics, so if you have any aspirations in that direction pay extra attention )

The trick is to complete the square: write*
$$y^2 - 2 y x = (y - a)^2 - b$$
where a and b are independent of y, so you get
$$f(x) = c e^{-b/2} \int_{-\infty}^{\infty} e^{- (y - a)^2 / 2} \, dy.$$
Then you can do a variable shift and use the standard result
$$I = \int_{-\infty}^\infty e^{-x^2 / 2} = \sqrt{2 \pi}$$
which you can easily prove (if you've never done it, try it: consider $I^2$ and switch to polar coordinates).

* From this line onwards, I take no responsibility for sign errors and wrong factors of 1/2 - please check yourself :)