Problem with change of variables in an integral In calculating the electric potential of a charged line segment of length $2L$ (don't worry, this is pretty much where the physics ends), I encountered the following integral: \begin{equation}V(r,z)=\frac{Q}{8\pi\varepsilon L}\int_{-L}^L\frac{dz'}{\sqrt{r^2+(z-z')^2}}.\end{equation} Based purely on this definition, I think I can assert that $V(r,z)\neq V(r,-z)$.
Trying to solve the integral, I made the substitution $u=z-z'$. This means $du=-dz'$; furthermore $$\begin{cases}\begin{array}{lll}z'=L&\Rightarrow&u=z-L\\z'=-L&\Rightarrow&u=z+L.\end{array}\end{cases}$$ Thus, we obtain $$V(r,z)=\frac{Q}{8\pi\varepsilon L}\int_{z-L}^{z+L}\frac{du}{\sqrt{r^2+u^2}}$$ where I compensated for the minus sign in $du=-dz'$ by interchanging the bounds.
I did the rest of the calculations by hand. I checked my answer with Maple; Maple gives me answers $f(r,z)$ and $g(r,z)$ for the first and second integrals respectively (the actual expressions aren't of much importance). These answers are supposed to be equal if I carried out the change of variables adequatly, but they turn out NOT to be equal. Instead, they have the odd property that $f(r,z)=g(r,-z)$! I assume something went wrong in my substitution, but I wouldn't know where exactly.
I'd very much appreciate any help!

Actually, $V(r,z)=V(r,-z)$, as can be easily seen by the substitution $z'\to -z'$ in the integrand, which has the effect of replacing $z$ with $-z$.
Indeed, letting $y=z'$ for ease of notation we have
$$
V(r,z)=c\int_{-L}^L\frac{dy}{\sqrt{r^2+(z-y)^2}}=c\int_{L}^{-L}\frac{-dy}{\sqrt{r^2+(z+y)^2}}=c\int_{-L}^L\frac{dy}{\sqrt{r^2+(-z-y)^2}}=V(r,-z)
$$
where $c=Q/(8\pi\epsilon L).$
