Sorry, I was a bit too loose. In this case you can do that, but that's because I know that \int_{-\infty}^{\infty} f(x)dx exists. But generally speaking, what you should do in your integral is let the upper and lower limit go to infinity and negative infinity independently. That is, \int_{-\infty}^{\infty} f(x)d(x) = \lim_{n \rightarrow \infty, m \rightarrow -\infty} \int_{m}^n f(x)d(x).
If you can prove, which shouldn't be too hard, that \int_{-\infty}^{\infty} f(x)d(x) [\itex] exists (meaning the limit as shown above exists and is finite), <b> then </b> you can write \int_{-\infty}^{\infty} f(x)d(x) = \lim_{n \rightarrow \infty} \int_{-n}^n f(x) d(x) because if the improper integral exists, then allowing the upper and lower limits of integration to get to infinity anyway you want will always result in the same answer.<br />
<br />
If the improper integral doesn't exist, then there could exist paths for the limits of integration to take which will give you different, finite answers!