# Two-dimensional heat equation with Neumann boundary conditions: any hope to find an analytical solution?

I am looking for references showing how to analytically solve the heat equation with Neumann boundary conditions in two dimensions. So far, I have found the problem solved analytically in one dimension. I have also found analytical solutions to the heat equation in two dimensions, but with Dirichlet boundary conditions.

• A linear heat conduction equation would have analytical solution as a Fourier series. However for this solution you'd need to know the eigenfunctions and eigenvalues, which is not available for a general shape domain without a numerical calculation. But for a simple domain the eigenfunctions are just trigonometric functions, so it can be all done with a pencil and paper. – Maxim Umansky Jan 26 at 3:12
• @MaximUmansky, would you mind expanding your comment as an answer? – nicoguaro Jan 26 at 14:33

Expanding (sort of) on @MPIchael's answer, you can pick any smooth function you like and plug it into the heat equation to give a problem to then work the other way. In numerical methods, we call this the Method of Manufactured Solutions, and it is used extensively for verifying computer programs designed to simulate PDEs. You'll have to add a forcing function to the right-hand side of your system and group the unknown terms on the left, but that's a pretty common way to write it. You might also check out this question and its answers for links to papers and libraries that might help you code up what you want. Neumann BCs are a matter of choosing different functions at the boundary to enforce once you have your desired solution in hand.

• I'll check that out as well, thanks! – Max_89 Jan 27 at 8:46

TL DR: $$u_1(x_1) = \cos(2\pi~(\frac{x_1}{L_1}) - \pi) + 1$$ $$u_2(x_2) = \cos(2\pi~(\frac{x_2}{L_2}) - \pi) + 1$$ $$u(x,t) = \exp(-a t) u_1(x_1) u_2(x_1)$$

How to construct it:

Sines and cosines are easily differentiable so they make a good starting point to construct such a solution. We chose a section and offset of the cosine which has a derivative of zero at the domain boundaries (which are 0 and 1 if $$L_x=1$$):

$$u_1(x_1) = \cos(2\pi~(\frac{x_1}{L_1}) - \pi) + 1$$

(see visualization)

Conveniently the second spatial derivative of $$u_1(x_1)$$ is:

$$\Delta u_1(x_1) = 4 \pi^2 cos(2 \pi x_1)$$

Now, in higher dimensions, you can construct solutions by multiplying trigonometric functions like this. So you are be able to construct:

$$u(x) = u_1(x_1) u_2(x_2)$$

where u_2 is chosen also as a cosine.

(see 2D visualization)

Finally, the full solution to the heat equation can be guessed by inserting $$u(x)$$

into:

$$\frac{\partial u}{\partial t} = \Delta u(x,y)$$

When you calculate the l.h.s, you find that it is almost identical to the r.h.s except for a factor. So you may guess that there is an exponential decay of the amplitude, with the variable $$t$$ as an argument.

• Nice, thanks!!! – Max_89 Jan 27 at 8:46