Integrating a laplacian over $\mathbb{R}^2$ (related to gravitational lensing) I am reading somebody's notes on gravitational lensing, and I come across the following: 

\begin{equation}
\kappa = \frac{1}{2} \nabla^2_x \Psi
\end{equation}
\begin{equation}
\Rightarrow \Psi = \frac{1}{\pi} \int_{\mathbb{R}^2}\kappa(\vec{x}')\ln|\vec{x}-\vec{x}'| \text{d}^2 x'.
\end{equation}

This is kind of a math question, I guess, but if anyone would care to explain this to me I would appreciate it. 
FYI, here $\Psi$ is effective lensing potential and $\kappa$ is convergence, and $\vec{x}$ is like a nondimensionalized vector in the lens plane, e.g. $\vec{\xi}/\xi_0$ where $\vec{\xi}$ is an actual vector (dimension of length) that lives in the lens plane, and $\xi_0$ can be any length scale.
 A: Let's start with a different problem:  a charge distribution in 3D.  We can write down the electric potential created by this charge distribution by imagining it as a bunch of point charges and integrating over all of them.  The potential of a unit point charge ($q = 1$) at a point $\vec{x}'$ is
$$
V(\vec{x}) = \frac{1}{4 \pi \epsilon_0} \frac{q}{|\vec{x} - \vec{x}'|}.
$$
which implies that the potential due to a charge distribution $\rho(\vec{x})$ is 
$$
V(\vec{x}) = \frac{1}{4 \pi \epsilon_0} \int_{\mathbb{R}^3} \rho(\vec{x}') \frac{1}{|\vec{x} - \vec{x}'|} d^3 x'.  \qquad \qquad (1)
$$
This is because the solution for the potential of a "point charge"
But we also know that the potential and the charge density are related by
$$
\nabla^2 V = - \frac{\rho}{\epsilon_0}.   \qquad \qquad (2)
$$
This implies that if we need to solve an equation of the form (2), we can find the solution by treating the function $\rho(\vec{x})$ as a collection of "point charges" and calculating their combined potential.
In 2-D, the basic idea is the same, but now the "potential" due to a unit point charge is
$$
V(\vec{x}) = -\frac{1}{2 \pi} \ln |\vec{x} - \vec{x}'|.
$$
(You can prove this using Gauss's Law in 2D if you want.) This means that if we want to solve the equation 
$$
\nabla^2 V= 2\kappa(\vec{x}),
$$
then by analogy, the solution to this equation is
$$
V(\vec{x}) = \frac{1}{\pi} \int_{\mathbb{R}^2} \kappa(\vec{x}') \ln |\vec{x} - \vec{x}'| \, d^2 \vec{x}'.
$$
This technique of solving differential equations in this way is known as the method of Green's functions;  essentially, if you have a linear differential equation of the form
$$
\mathcal{D} \phi = \rho(x)
$$
then you can solve the equation for $\rho(\vec{x})$ equal to a delta function $\delta(\vec{x} - \vec{x}')$, and then use superposition to parlay this into a general solution in the form of an integral over the "charge distribution".
A: I found out another way that is more "mathematically straightforward" in my mind. It uses the identity $\nabla^2 \ln|\pmb{x}|=2\pi\delta_2(\pmb{x})$ where $\delta_2()$ is the 2-D Dirac delta function and $\pmb{x}$ is a 2-D vector. It goes like this: 
\begin{align}
\kappa(\pmb{x})&=\int_{\mathbb{R}^2}\kappa(\pmb{x}')\delta_2(\pmb{x}-\pmb{x}')\text{d}^2 x'\\
&=\frac{1}{2\pi}\int_{\mathbb{R}^2}\kappa(\pmb{x}')\nabla^2 \ln|\pmb{x}-\pmb{x}'|\text{d}^2 x'\\
&=\nabla^2\left[\frac{1}{2\pi}\int_{\mathbb{R}^2}\kappa(\pmb{x}') \ln|\pmb{x}-\pmb{x}'|\text{d}^2 x'\right]=\nabla^2\left[\frac{1}{2}\Psi\right]\text{ for all }x,\text{ so}\\
\Psi &= \frac{1}{\pi}\int_{\mathbb{R}^2}\kappa(\pmb{x}') \ln|\pmb{x}-\pmb{x}'|\text{d}^2 x'.
\end{align}
