Laplace's equation is an equation that models many physical phenomena including heat diffusion, electromagnetism, vibrations, and fluid flow. Laplace's equation gives the null space of Poisson's equation. It is the partial differential equation ∇^{2}ψ = 0 (where ∇^{2} denotes the Laplacian operator). Solving Laplace's equation can be difficult to impossible depending on the given initial and/or boundary conditions. There are two main types of boundary conditions (though more do exist and boundary conditions may be a combination of the two) for a boundary value problem:

Dirichlet condition: the function is defined at all boundaries, in 2 dimensions, ψ(x,0), ψ(x,L), ψ(0,y), ψ(L,y) are all specified.

Neumann condition: the directional derivative is defined at the boundaries, ∇ψ∙**n** is defined which generally can be expressed as by specifying ψ_{x}(x,0), ψ_{x}(x,L), ψ_{y}(0,y), and ψ_{y}(L,y) in 2 dimensions.

Laplace's equation can generally be solved by using the method of separation. For example:

Consider a thin square plate of side length π. Let us define a function ψ(x,y) which will give the temperature at a point (x,y) and let's suppose that three sides of this plate are kept at 0 degrees and the top side has a heat distribution given by some function f(x).

This diffusion problem is governed by Laplace's equation, ∇^{2}ψ = 0, with boundary conditions ψ(0,y) = ψ(L_{1},y) = ψ(x,0) = 0 and ψ(x,L_{2}) = f(x), where L_{1} = L_{2} = π.

Let ψ = P(x)Q(y) so Laplace's equation can be rewritten as P''(x)Q(y)+P(x)Q''(y) = 0 rearranging and dividing the whole equation by P(x)Q(y) we get:

P''/P = -Q''/Q and since the left side is dependent only on x and the right only on y, the two can only be equivalent if they are equal to some constant λ.

Taking each equation separately we obtain the second order ODE P'' = λP. Now solving for λ can be done by taking 3 cases (λ>0, λ=0, λ less than 0), solving the ODE and checking the solution at the boundary conditions, or we can recognize this as an eigenvalue equation and recognize that the operator d^{2}/dx^{2} is hermitian if P(0) = P(L) = 0 (where L is in this case π). Either way the solution is the same, in order to obtain a non-trivial solution, λ = -n^{2}π^{2}/L^{2} which in our example is simply -n^{2}. And we obtain a whole bunch of solutions, P_{n}(x) = A_{n}sinnx.

Moving on to the second equation, -Q''/Q = -n^{2} => Q'' = n^{2}Q, Q_{n}(y) = B_{n}coshny + C_{n}sinhny considering the boundary condition ψ(x,0) = P(x)Q(0) = 0 we can state that B_{n} = 0 so Q_{n}(y) = C_{n}sinhny.

So finally, ψ_{n}(x,y) = P_{n}(x)Q_{n}(y) = D_{n}sinhnysinnx. Now consider our last boundary condition ψ(x,π) = f(x), it should be pretty obvious that ψ_{n}(x,y) will not satisfy this condition for pretty much any function except for the sine function, but remember that we essentially have an infinite number of solutions to Laplace's equation by now, and since the differential operator is linear, we can sum these solutions to obtain:

ψ(x,y) = ∑D_{n}sinhnysinnx (with summation from 1 to infinity)

So at the last boundary, ψ(x,π) = ∑D_{n}sinhnπsinnx = f(x). Expanding f(x) in terms of a fourier sine series we can satisfy this boundary condition if:

D_{n}sinnπ = (2/π)∫f(ν)sinnνdν (with integration from 0 to π)

This method works for both types of boundary conditions. In general, the Dirichlet boundary condition gives a general solution ψ(x,y) = ∑D_{n}sinhnysinnx whereas the Neumann condition leads to a general solution in term of cosines: ψ(x,y) = D_{0}/2 + ∑D_{n}coshnycosnx where D_{0} = (2/π)∫f(ν)dν