having a small problem with a integration calculation

I am studying for the exam and found the following formula on my notebook:

$\displaystyle \int_{r+1}^\infty (x-(r+1))g(x)dx$

=$\displaystyle \int_{r}^\infty (x-r)g(x)dx$

But I believe that this is not generally true unless $g$ is special such as a peridoic function.

I suspect that the above function is probably supposed to be

$\displaystyle \int_{r+1}^\infty (x-(r+1))g(x)dx$

=$\displaystyle \int_{r}^\infty (x-r)g(x+1)dx$

Could anyone help me confirm that?

-
On the LHS integral, let $x\mapsto x+1$. Then you get what you claim. – Pedro Tamaroff Mar 12 '13 at 4:12
Thank you for your answer! – Tengu Mar 12 '13 at 4:23

That is correct. An easy spot check is that the integrand at the lower limit in both cases is $(0)(g(r+1))$ which the first one fails-it is $(0)(g(r+1))$ in the top and $(0)(g(r))$ in the second line. More formally you could do a $u$ substitution of $u=x-1$ and notice that (up to the name of the dummy variable) they match.