Definition
The solution to the 2-dimensional heat equation (in rectangular coordinates) deals with two spatial and a time dimension,
. The heat equation, the variable limits, the Robin boundary conditions, and the initial condition are defined as:
Solution
The solution is just an advanced version of the solution in 1 dimension. If you have questions about the steps shown here, review the 1-D solution.
Step 1: Partition Solution
Just as in the 1-D solution, we partition the solution into a "steady-state" and a "variable" portion:

We substitute this equation into the initial boundary value problem (IBVP):
![{\displaystyle {\begin{cases}s_{t}+v_{t}=k\left[s_{xx}+v_{xx}+s_{yy}+v_{yy}\right]+h(x,y,t)\\\alpha _{1}s(0,y,t)+\alpha _{1}v(0,y,t)-\beta _{1}s_{x}(0,y,t)-\beta _{1}v_{x}(0,y,t)=b_{1}(y,t)\\\alpha _{2}s(0,y,t)+\alpha _{2}v(L,y,t)+\beta _{2}s_{x}(L,y,t)+\beta _{2}v_{x}(L,y,t)=b_{2}(y,t)\\\alpha _{3}s(x,0,t)+\alpha _{3}v(x,0,t)-\beta _{3}s_{y}(x,0,t)-\beta _{3}v_{y}(x,0,t)=b_{3}(x,t)\\\alpha _{4}s(x,M,t)+\alpha _{4}v(x,M,t)+\beta _{4}s_{y}(x,M,t)+\beta _{4}v_{y}(x,M,t)=b_{4}(x,t)\\s(x,y,0)+v(x,y,0)=f(x,y)\end{cases}}}](../08f85e22315bb728e6739091b3ad15a21c911088.svg)
We want to set some conditions on s and v:
- Let
satisfy the Laplace equation: 
- Let
satisfy the non-homogeneous boundary conditions.
- Let v satisfy the non-homogeneous equation and homogeneous boundary conditions.
We end up with 2 separate IBVPs:

![{\displaystyle {\begin{cases}v_{t}=k\left[v_{xx}+v_{yy}\right]+h(x,y,t)-s_{t}(x,y,t)\\\alpha _{1}v(0,y,t)-\beta _{1}v_{x}(0,y,t)=0\\\alpha _{2}v(L,y,t)+\beta _{2}v_{x}(L,y,t)=0\\\alpha _{3}v(x,0,t)-\beta _{3}v_{y}(x,0,t)=0\\\alpha _{4}v(x,M,t)+\beta _{4}v_{y}(x,M,t)=0\\v(x,y,0)=f(x,y)-s(x,y,0)\end{cases}}}](../830da48b7b54ba447f0e42a5fdbba2c0afac9491.svg)
Step 2: Solve Steady-State Portion
Solving for the steady-state portion is exactly like solving the Laplace equation with 4 non-homogeneous boundary conditions. Using that technique, a solution can be found for all types of boundary conditions.
Step 3: Solve Variable Portion
Step 3.1: Solve Associated Homogeneous BVP
The associated homogeneous BVP equation is:
![{\displaystyle v_{t}=k\left[v_{xx}+v_{yy}\right]}](../7c270f9b64a336a850431eb8bd57a3b39c957f5e.svg)
The boundary conditions for v are the ones in the IBVP above.
Separate Variables



By similar methods, you obtain the following ODEs:

Translate Boundary Conditions
Solve SLPs

We have obtained eigenfunctions that we can use to solve the nonhomogeneous IBVP.
Step 3.2: Solve Non-homogeneous IBVP
Setup Problem
Just like in the 1-D case, we define v(x,y,t) and q(x,y,t) as infinite sums:


Determine Coefficients
We then substitute expansion into the PDE:
![{\displaystyle {\frac {\partial }{\partial t}}\left[\sum T_{mn}(t)X_{n}(x)Y_{m}(y)\right]=k\left\{{\frac {\partial }{\partial x^{2}}}\left[\sum T_{mn}(t)X_{n}(x)Y_{m}(y)\right]+{\frac {\partial }{\partial y^{2}}}\left[\sum T_{mn}(t)X_{n}(x)Y_{m}(y)\right]\right\}+\sum Q_{mn}(t)X_{n}(x)Y_{m}(y)}](../676df8faa708d46d4e0ede6b2bf794d455e2836b.svg)

![{\displaystyle \Rightarrow \sum T_{mn}'(t)X_{n}(x)Y_{m}(y)=\sum k\left\{T_{mn}(t)[-\lambda _{n}^{2}X_{n}(x)]Y_{m}(y)+\sum T_{mn}(t)X_{n}(x)[-{\hat {\lambda }}_{m}^{2}Y_{m}(y)]\right\}+\sum Q_{mn}(t)X_{n}(x)Y_{m}(y)}](../c17fd5a9184d237d70e94568bd88af403bbfcc1f.svg)
![{\displaystyle \Rightarrow \sum \left[T_{mn}'(t)+k(\lambda _{n}^{2}+{\hat {\lambda }}_{m}^{2})\right]X_{n}(x)Y_{m}(y)=\sum Q_{mn}(t)X_{n}(x)Y_{m}(y)}](../57234e7bc17a51eb025be75a42ee46e3f331906f.svg)
This implies that
forms an orthogonal basis. This means that we can write the following:

This is a first-order ODE which can be solved using the integration factor:

Solving for our coefficient we get:
Satisfy Initial Condition
We apply the initial condition to our equation above:

The Fourier coefficients can be solved using the inner product definition:
![{\displaystyle C_{mn}={\frac {\int \limits _{0}^{L}\int \limits _{0}^{M}\left[f(x,y)-s(x,y,0)\right]X_{n}(x)Y_{m}(y)dydx}{\int \limits _{0}^{L}X_{n}^{2}(x)dx\int \limits _{0}^{M}Y_{m}^{2}(y)dy}}}](../2e131a1f0f9844a97a12d55fa9cf63e0e004e454.svg)
We have all the necessary information about the variable portion of the function.
Step 4: Combine Solutions
We now have solved for the "steady-state" and "variable" portions, so we just add them together to get the complete solution to the 2-D heat equation.