# Explanation of relaxation method for Laplace's equation?

Currently reading through Introduction to Electrodynamics (4th Edition) by Griffiths. I'm trying to wrap my head around Laplace's Equation, here are a couple quotes that I'd like to understand a bit better:

"Laplace's equation is a kind of averaging instruction; it tells you to assign to the point $x$ the average of the values to the left and right of $x$. Solutions to Laplace's equation are, in this sense, as boring as they could possibly be, and yet fit the end points properly." (page 115)

So here I understand that Laplace's equation is an averaging instruction, but why is that so? Why does it have this property? Also, what does he mean by "fit the end points properly"?

Another quote:

"The value of $V$ at a point $(x,y)$ is the average of those around the point. More precisely, if you draw a circle of any radius $R$ about the point $(x,y)$, the average value of V on the circle is equal to the value at the center:

$$V(x,y) = \frac{1}{2\pi R} \int V dl$$

This, incidentally, suggests the method of relaxation, on which computer solutions to Laplace's equation are based: Starting with specified values for V at the boundary, and reasonable guesses for $V$ on a grid of interior points, the first pass reassigns to each point the average of its nearest neighbors. The second pass repeats the process, using the corrected values, and so on." (page 117)

So what exactly does this look like, and why does it work? I tried to look up an explanation of this, but got confused (see attached picture). I feel like there's some knowledge of the properties that I'm missing that then prevent my understanding of the math used. For example, how do we get from the partials to the second equation? I understand that an average is being taken, but why is $h^2$ on the bottom, and why the third term in each numerator?

Understanding of these things isn't necessarily required by my course, only how to use them, but I'd still like to try and build an intuitive understanding of Laplace's equation and method of relaxation. You've basically discovered discretization of real space. You of course recall the definition of the derivative, $$f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}\tag{1}$$ Discretization drops the limit and (1) becomes an approximation: $$f'(x)\approx\frac{f(x+h)-f(x)}{h}$$ which is useful for solving PDEs numerically; the $h$ here is mostly the same as the $h$ in (1). With second derivatives, you take the (backward) difference of (forward) difference: \begin{align} f''(x)&\approx\frac{f'(x+h)-f'(x)}{h}\\ &\approx\frac{1}{h}\left[\frac{f(x+h)-f(x)}{h}-\frac{f(x)-f(x-h)}{h}\right]\\ &\approx\frac{1}{h^2}\left[f(x+h)-f(x)-f(x)+f(x-h)\right]\\ &\approx\frac{1}{h^2}\left[f(h+x)-2f(x)+f(h-x)\right] \end{align} Extending to 2D is more or less the same. Equation (4) is then just solving Equation (3) for $\Phi(x,y)$, which shows that the new value of $\Phi(x,y)$ is approximately the average of the 4 values around it.
1. Put initial guess for $\Phi(x,y)\,\forall x,y$
2. Apply boundary conditions on $\Phi(x,y)$
3. For each interior point, update $\Phi(x,y)$ given your Equation (4)