I am doing loop integral in quantum field theory, and an issue in shifting integration variable is giving me a problem. Let me illustrate with an example.
I have an integral that looks approximately as
$$I = \int^1_0 ~\mathrm dx \int_{-\infty}^{\infty} \frac{\mathrm d^dk}{(2\pi)^d}\frac{(k+p)\cdot\gamma}{((k+px)^2+m^2x^2)^2}$$
where $d = 4-2\epsilon$, which is used often in "dimensional regularization" in physics and $\gamma$ is the Dirac gamma matrices also used in physics.
I approach this integral in two different methods:
1) First, I shift $k = k'-px$ and assume $\mathrm d^4k = \mathrm d^4k'$ since integration is from $-\infty $ to $\infty$, I get, $$I = \int^1_0 ~\mathrm dx \int_{-\infty}^{\infty} \frac{\mathrm d^dk}{(2\pi)^d}\frac{(k+p(1-x))\cdot\gamma}{(k^2+m^2x^2)^2}.$$ (By the way, $p^2 = (p\cdot\gamma) (p\cdot\gamma)$).
Now say I integrate to get $I = \displaystyle \int^1_0~\mathrm dx f(x,p\cdot\gamma)$, then take derivative with respect to $p\cdot\gamma$:
$$\frac{\mathrm d}{\mathrm d p\cdot\gamma} I = \int_0^1 ~\mathrm dx\frac{\partial}{\partial p\cdot\gamma}~(f(x,p\cdot\gamma))\, .$$
2) This time, I take the derivative w.r.t., $p\cdot\gamma$ first to get:
\begin{align}\frac{\mathrm d}{\mathrm d p\cdot\gamma} I &=\int^1_0 ~\mathrm dx \int_{-\infty}^{\infty} \frac{\mathrm d^dk}{(2\pi)^d}\frac{\partial}{\partial p\cdot\gamma}\frac{(k+p)\cdot\gamma}{((k+px)^2+m^2x^2)^2}\\ &=\int^1_0 ~\mathrm dx \int_{-\infty}^{\infty} \frac{\mathrm d^dk}{(2\pi)^d}\left(\frac{1}{((k+px)^2+m^2x^2)^2}+\frac{((k+p)\cdot\gamma)(2x(k+px)\cdot\gamma)}{((k+px)^2+m^2x^2)^3}\right)\end{align}
Now, I shift $k=k'-px$ again, and I get a different answer.
Why are they different from each other, and if I want to get $\frac{\mathrm d}{\mathrm d p\cdot\gamma} I$, which one should I use? I would assume that second method is correct, if there is difference in answer, but all the textbooks have answers that match with my first method; which seems bizarre.