Solution (source code)

= Solution

Use <Einstein summation convention> and write $\partial_j=\nabla_j$. Since $\partial_jr_i=\delta_{ij}$, where $\delta_{ij}$ is the <Kronecker delta>, the <product rule> gives
$$
\partial_j(r_iw_j)=\delta_{ij}w_j+r_i\partial_jw_j=w_i+P_i.
$$
This proves $\boxed{P_i=\partial_j(r_iw_j)-w_i}$. Now take $w_j=\partial_j\psi$. Integrating this identity and applying the <divergence theorem> to the first term gives
$$
\int_Vr_i\nabla^2\psi\,dV=\int_Sr_i\partial_j\psi\,dS_j-\int_V\partial_i\psi\,dV.
$$
Part (b) changes the last <volume integral> of the <gradient> into a <surface integral>, yielding
$$
\boxed{\int_Vr_i\nabla^2\psi\,dV=\int_Sr_i\partial_j\psi\,dS_j-\int_S\psi\,dS_i.}
$$
Here $dS_i=\hat n_i\,dS$; the <Laplacian> is $\nabla^2\psi=\partial_j\partial_j\psi$.