Constructing molecular integrals with derivative on the r_inv operator by partial integration

In quantum chemstry integrals of the following form are sometimes needed: \[F_x = \left<\phi_i\left|\nabla^x r^{-1}\right|\phi_j\right>\] But these integrals are often not directly available. What instead is available is integrals of the form: \[f_x = \left<\nabla^x\phi_i\left|r^{-1}\right|\phi_j\right>\] \[f_{x,y} = \left<\nabla^x\phi_i\left|r^{-1}\right|\nabla^y\phi_j\right>\] Let us...

Multipole fit with Lagrangian multipliers

Consider the electrostatic potential due to multipoles places at the position of atoms: \[E_{i}=\sum_{j}^{atom}\sum_{n}^{multipole}\frac{\left(-1\right)^{n}}{n!}T_{ij}^{(n)}m_{j}^{(n)}\] If the quantum mechanical electrostatic potential is to be minimized, a cost function can written of the form: \[z=\sum_{i}^{point}\left(V_{i,\mathrm{QM}}-E_{i}\right)^{2}+\sum_{l}^{constraints}\lambda_{l}g_{l}\] Expanding the square: \[z=\sum_{i}^{point}\left(V_{i,\mathrm{QM}}^{2}+E_{i}^{2}-2E_{i}V_{i,\mathrm{QM}}\right)+\sum_{l}^{constraints}\lambda_{l}g_{l}\] It is known...

Second order partial derivative for multivariate function, derivation

Consider a function: \[f\left(x_{1}\left(\lambda_{1},\lambda_{2},..,\lambda_{M}\right),x_{2}\left(\lambda_{1},\lambda_{2},..,\lambda_{M}\right),..,x_{N}\left(\lambda_{1},\lambda_{2},..,\lambda_{M}\right)\right)\] The first partial derivative is given as: \[\frac{\partial}{\partial\lambda_{i}}f\left(x_{1},x_{2},..,x_{N}\right)=\frac{\partial f}{\partial x_{1}}\frac{\partial x_{1}}{\partial\lambda_{i}}+\frac{\partial f}{\partial x_{2}}\frac{\partial x_{2}}{\partial\lambda_{i}}+...+\frac{\partial f}{\partial x_{N}}\frac{\partial x_{N}}{\partial\lambda_{i}}\] The above equation can be formulated as: \[\frac{\partial}{\partial\lambda_{i}}f\left(x_{1},x_{2},..,x_{N}\right)=\sum_{k}^{N}\frac{\partial f}{\partial x_{k}}\frac{\partial x_{k}}{\partial\lambda_{i}}\] Now consider the second derivative: \[\frac{\partial^{2}}{\partial\lambda_{j}\partial\lambda_{i}}f\left(x_{1},x_{2},..,x_{N}\right)=\frac{\partial}{\partial\lambda_{j}}\left(\frac{\partial f}{\partial x_{1}}\frac{\partial...