I was studying the commutator of the Hamiltonian and parity operators in the $L^2$ space from Quantum mechanics and came upon the following:
To show that the two operators commute, assuming we have a symmetric potential $V(x)=V(-x)$, we had that the commutator of a function $\psi(x)$ was;
\begin{align*}[\hat{H},\hat{P}]=&-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}\psi(-x)+V(x)\psi(-x)+\frac{\hbar^2}{2m}\frac{\partial^2}{\partial (-x)^2}\psi(-x)-V(-x)\psi(-x)\\=&-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}\psi(-x)+\frac{\hbar^2}{2m}\frac{\partial^2}{\partial (-x)^2}\psi(-x), \end{align*}
assuming the symmetry of the potential $V(x)$.
Now I struggled to show that the two second derivative terms are the negative of each other. The only possible way I could deduce the were equal was by using the chain rule for the second partial derivative to deduce that:
$$\frac{\partial \psi(-x)}{\partial (-x)}=\frac{\partial \psi(-x)}{\partial x}\frac{\partial x}{\partial (-x)}=-\frac{\partial \psi(-x)}{\partial x},$$ and hence the partial derivative terms both cancel out to show the operators commute.
Now my main issue is struggling with the derivatives, could this be clarified?
As an aside I also had thought about the Lagrange and Leibniz notation, and was wondering whether the following was incorrect or not?
$$\frac{\partial \psi(-x)}{\partial x}=-\psi '(-x) \,\text{ and }\, \frac{\partial \psi(-x)}{\partial (-x)}=\psi'(-x).$$