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.

Thanks in advance for your help.

  • 2
    $\begingroup$ 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. $\endgroup$ Commented Jan 26, 2021 at 3:12
  • $\begingroup$ @MaximUmansky, would you mind expanding your comment as an answer? $\endgroup$
    – nicoguaro
    Commented Jan 26, 2021 at 14:33

2 Answers 2


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.

  • $\begingroup$ I'll check that out as well, thanks! $\endgroup$
    – Max_89
    Commented Jan 27, 2021 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)$


$$\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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.