The solution to the 2-dimensional heat equation (in rectangular coordinates) deals with two spatial and a time dimension,
u
(
x
,
y
,
t
)
{\displaystyle u(x,y,t)}
. The heat equation, the variable limits, the Robin boundary conditions, and the initial condition are defined as:
u
t
=
k
[
u
x
x
+
u
y
y
]
+
h
(
x
,
y
,
t
)
(
x
,
y
,
t
)
∈
[
0
,
L
]
×
[
0
,
M
]
×
[
0
,
∞
)
α
1
u
(
0
,
y
,
t
)
−
β
1
u
x
(
0
,
y
,
t
)
=
b
1
(
y
,
t
)
α
2
u
(
L
,
y
,
t
)
+
β
2
u
x
(
L
,
y
,
t
)
=
b
2
(
y
,
t
)
α
3
u
(
x
,
0
,
t
)
−
β
3
u
y
(
x
,
0
,
t
)
=
b
3
(
x
,
t
)
α
4
u
(
x
,
M
,
t
)
+
β
4
u
y
(
x
,
M
,
t
)
=
b
4
(
x
,
t
)
u
(
x
,
y
,
0
)
=
f
(
x
,
y
)
{\displaystyle {\begin{aligned}u_{t}=k\left[u_{xx}+u_{yy}\right]+h(x,y,t)\\(x,y,t)\in [0,L]\times [0,M]\times [0,\infty )\\\alpha _{1}u(0,y,t)-\beta _{1}u_{x}(0,y,t)=b_{1}(y,t)\\\alpha _{2}u(L,y,t)+\beta _{2}u_{x}(L,y,t)=b_{2}(y,t)\\\alpha _{3}u(x,0,t)-\beta _{3}u_{y}(x,0,t)=b_{3}(x,t)\\\alpha _{4}u(x,M,t)+\beta _{4}u_{y}(x,M,t)=b_{4}(x,t)\\u(x,y,0)=f(x,y)\end{aligned}}}
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
edit
Just as in the 1-D solution, we partition the solution into a "steady-state" and a "variable" portion:
u
(
x
,
y
,
t
)
=
s
(
x
,
y
,
t
)
⏟
steady-state
+
v
(
x
,
y
,
t
)
⏟
variable
{\displaystyle u(x,y,t)=\underbrace {s(x,y,t)} _{\text{steady-state}}+\underbrace {v(x,y,t)} _{\text{variable}}}
We substitute this equation into the initial boundary value problem (IBVP):
{
s
t
+
v
t
=
k
[
s
x
x
+
v
x
x
+
s
y
y
+
v
y
y
]
+
h
(
x
,
y
,
t
)
α
1
s
(
0
,
y
,
t
)
+
α
1
v
(
0
,
y
,
t
)
−
β
1
s
x
(
0
,
y
,
t
)
−
β
1
v
x
(
0
,
y
,
t
)
=
b
1
(
y
,
t
)
α
2
s
(
0
,
y
,
t
)
+
α
2
v
(
L
,
y
,
t
)
+
β
2
s
x
(
L
,
y
,
t
)
+
β
2
v
x
(
L
,
y
,
t
)
=
b
2
(
y
,
t
)
α
3
s
(
x
,
0
,
t
)
+
α
3
v
(
x
,
0
,
t
)
−
β
3
s
y
(
x
,
0
,
t
)
−
β
3
v
y
(
x
,
0
,
t
)
=
b
3
(
x
,
t
)
α
4
s
(
x
,
M
,
t
)
+
α
4
v
(
x
,
M
,
t
)
+
β
4
s
y
(
x
,
M
,
t
)
+
β
4
v
y
(
x
,
M
,
t
)
=
b
4
(
x
,
t
)
s
(
x
,
y
,
0
)
+
v
(
x
,
y
,
0
)
=
f
(
x
,
y
)
{\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}}}
We want to set some conditions on s and v:
Let
s
{\displaystyle s}
satisfy the Laplace equation :
s
x
x
+
s
y
y
=
0
.
{\displaystyle s_{xx}+s_{yy}=0~.}
Let
s
{\displaystyle s}
satisfy the non-homogeneous boundary conditions.
Let v satisfy the non-homogeneous equation and homogeneous boundary conditions.
We end up with 2 separate IBVPs:
{
s
x
x
+
s
y
y
=
0
α
1
s
(
0
,
y
,
t
)
−
β
1
s
x
(
0
,
y
,
t
)
=
b
1
(
y
,
t
)
α
2
s
(
0
,
y
,
t
)
+
β
2
s
x
(
L
,
y
,
t
)
=
b
2
(
y
,
t
)
α
3
s
(
x
,
0
,
t
)
−
β
3
s
y
(
x
,
0
,
t
)
=
b
3
(
x
,
t
)
α
4
s
(
x
,
M
,
t
)
+
β
4
s
y
(
x
,
M
,
t
)
=
b
4
(
x
,
t
)
{\displaystyle {\begin{cases}s_{xx}+s_{yy}=0\\\alpha _{1}s(0,y,t)-\beta _{1}s_{x}(0,y,t)=b_{1}(y,t)\\\alpha _{2}s(0,y,t)+\beta _{2}s_{x}(L,y,t)=b_{2}(y,t)\\\alpha _{3}s(x,0,t)-\beta _{3}s_{y}(x,0,t)=b_{3}(x,t)\\\alpha _{4}s(x,M,t)+\beta _{4}s_{y}(x,M,t)=b_{4}(x,t)\\\end{cases}}}
{
v
t
=
k
[
v
x
x
+
v
y
y
]
+
h
(
x
,
y
,
t
)
−
s
t
(
x
,
y
,
t
)
α
1
v
(
0
,
y
,
t
)
−
β
1
v
x
(
0
,
y
,
t
)
=
0
α
2
v
(
L
,
y
,
t
)
+
β
2
v
x
(
L
,
y
,
t
)
=
0
α
3
v
(
x
,
0
,
t
)
−
β
3
v
y
(
x
,
0
,
t
)
=
0
α
4
v
(
x
,
M
,
t
)
+
β
4
v
y
(
x
,
M
,
t
)
=
0
v
(
x
,
y
,
0
)
=
f
(
x
,
y
)
−
s
(
x
,
y
,
0
)
{\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}}}
Step 2: Solve Steady-State Portion
edit
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
edit
Step 3.1: Solve Associated Homogeneous BVP
edit
The associated homogeneous BVP equation is:
v
t
=
k
[
v
x
x
+
v
y
y
]
{\displaystyle v_{t}=k\left[v_{xx}+v_{yy}\right]}
The boundary conditions for v are the ones in the IBVP above.
v
(
x
,
y
,
t
)
=
X
(
x
)
Y
(
y
)
T
(
t
)
{\displaystyle v(x,y,t)=X(x)Y(y)T(t)}
⇒
X
Y
T
′
=
k
[
X
″
Y
T
+
X
Y
″
T
]
{\displaystyle \Rightarrow XYT'=k\lbrack X''YT+XY''T\rbrack }
⇒
T
′
k
T
=
X
″
X
+
Y
″
Y
=
μ
{\displaystyle \Rightarrow {\frac {T'}{kT}}={\frac {X''}{X}}+{\frac {Y''}{Y}}=\mu }
By similar methods, you obtain the following ODEs:
{
T
′
−
μ
k
T
=
0
X
″
−
ρ
X
=
0
Y
″
−
δ
Y
=
0
μ
=
ρ
+
δ
(coupling equation)
{\displaystyle {\begin{cases}T'-\mu kT=0\\X''-\rho X=0\\Y''-\delta Y=0\\\mu =\rho +\delta \quad {\text{ (coupling equation) }}\end{cases}}}
Translate Boundary Conditions
edit
[
α
1
X
(
0
)
−
β
1
X
′
(
0
)
]
Y
(
y
)
T
(
t
)
=
0
[
α
2
X
(
L
)
+
β
2
X
′
(
L
)
]
Y
(
y
)
T
(
t
)
=
0
[
α
3
Y
(
0
)
−
β
3
Y
′
(
0
)
]
X
(
x
)
T
(
t
)
=
0
[
α
4
Y
(
M
)
+
β
4
Y
′
(
M
)
]
X
(
x
)
T
(
t
)
=
0
}
⇒
α
1
X
(
0
)
−
β
1
X
′
(
0
)
=
0
α
2
X
(
L
)
+
β
2
X
′
(
L
)
=
0
α
3
Y
(
0
)
−
β
3
Y
′
(
0
)
=
0
α
4
Y
(
M
)
+
β
4
Y
′
(
M
)
=
0
{\displaystyle \left.{\begin{aligned}\left[\alpha _{1}X(0)-\beta _{1}X'(0)\right]Y(y)T(t)&=0\\\left[\alpha _{2}X(L)+\beta _{2}X'(L)\right]Y(y)T(t)&=0\\\left[\alpha _{3}Y(0)-\beta _{3}Y'(0)\right]X(x)T(t)&=0\\\left[\alpha _{4}Y(M)+\beta _{4}Y'(M)\right]X(x)T(t)&=0\end{aligned}}\right\}\Rightarrow {\begin{aligned}\alpha _{1}X(0)-\beta _{1}X'(0)=0\\\alpha _{2}X(L)+\beta _{2}X'(L)=0\\\alpha _{3}Y(0)-\beta _{3}Y'(0)=0\\\alpha _{4}Y(M)+\beta _{4}Y'(M)=0\end{aligned}}}
X
″
−
ρ
X
=
0
α
1
X
(
0
)
−
β
1
X
′
(
0
)
=
0
α
2
X
(
L
)
+
β
2
X
′
(
L
)
=
0
}
−
ρ
=
λ
2
Eigenvalues
λ
n
: solutions to equation
(
α
1
α
2
−
β
1
β
2
λ
2
)
sin
(
λ
L
)
+
(
α
1
β
2
+
α
2
β
1
)
λ
cos
(
λ
L
)
=
0
X
n
(
x
)
=
β
1
λ
n
cos
(
λ
n
x
)
+
α
1
sin
(
λ
n
x
)
,
n
=
0
,
1
,
2
,
⋯
{\displaystyle \left.{\begin{aligned}X''-\rho X=0\\\alpha _{1}X(0)-\beta _{1}X'(0)=0\\\alpha _{2}X(L)+\beta _{2}X'(L)=0\end{aligned}}\right\}{\begin{aligned}&-\rho =\lambda ^{2}\\&{\text{Eigenvalues }}\lambda _{n}{\text{: solutions to equation }}(\alpha _{1}\alpha _{2}-\beta _{1}\beta _{2}\lambda ^{2})\sin(\lambda L)+(\alpha _{1}\beta _{2}+\alpha _{2}\beta _{1})\lambda \cos(\lambda L)=0\\&X_{n}(x)=\beta _{1}\lambda _{n}\cos(\lambda _{n}x)+\alpha _{1}\sin(\lambda _{n}x),n=0,1,2,\cdots \end{aligned}}}
Y
″
−
δ
Y
=
0
α
3
Y
(
0
)
−
β
3
Y
′
(
0
)
=
0
α
4
Y
(
M
)
+
β
4
Y
′
(
M
)
=
0
}
−
δ
=
λ
^
2
Eigenvalues
λ
^
m
: solutions to equation
(
α
3
α
4
−
β
3
β
4
λ
^
2
)
sin
(
λ
^
M
)
+
(
α
3
β
4
+
α
4
β
3
)
λ
^
cos
(
λ
^
M
)
=
0
Y
m
(
x
)
=
β
3
(
λ
^
m
)
cos
(
λ
^
m
y
)
+
α
3
sin
(
λ
^
m
y
)
,
m
=
0
,
1
,
2
,
⋯
{\displaystyle \left.{\begin{aligned}Y''-\delta Y=0\\\alpha _{3}Y(0)-\beta _{3}Y'(0)=0\\\alpha _{4}Y(M)+\beta _{4}Y'(M)=0\end{aligned}}\right\}{\begin{aligned}&-\delta ={\hat {\lambda }}^{2}\ \\&{\text{Eigenvalues }}{\hat {\lambda }}_{m}{\text{: solutions to equation }}(\alpha _{3}\alpha _{4}-\beta _{3}\beta _{4}{\hat {\lambda }}^{2})\sin({\hat {\lambda }}M)+(\alpha _{3}\beta _{4}+\alpha _{4}\beta _{3}){\hat {\lambda }}\cos({\hat {\lambda }}M)=0\\&Y_{m}(x)=\beta _{3}({\hat {\lambda }}_{m})\cos({\hat {\lambda }}_{m}y)+\alpha _{3}\sin({\hat {\lambda }}_{m}y),m=0,1,2,\cdots \end{aligned}}}
We have obtained eigenfunctions that we can use to solve the nonhomogeneous IBVP.
Step 3.2: Solve Non-homogeneous IBVP
edit
Just like in the 1-D case , we define v(x,y,t) and q(x,y,t) as infinite sums:
v
(
x
,
y
,
t
)
:=
∑
m
,
n
=
0
∞
T
m
n
(
t
)
X
n
(
x
)
Y
m
(
y
)
{\displaystyle v(x,y,t):=\sum _{m,n=0}^{\infty }T_{mn}(t)X_{n}(x)Y_{m}(y)}
q
(
x
,
y
,
t
)
:=
∑
m
,
n
=
0
∞
Q
m
n
(
t
)
X
n
(
x
)
Y
m
(
y
)
,
Q
m
n
(
t
)
=
∫
0
L
∫
0
M
q
(
x
,
y
,
t
)
X
n
(
x
)
Y
m
(
y
)
d
y
d
x
∫
0
L
X
n
2
(
x
)
d
x
∫
0
M
Y
m
2
(
y
)
d
y
{\displaystyle q(x,y,t):=\sum _{m,n=0}^{\infty }Q_{mn}(t)X_{n}(x)Y_{m}(y)~,~Q_{mn}(t)={\frac {\int \limits _{0}^{L}\int \limits _{0}^{M}q(x,y,t)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}}}
Determine Coefficients
edit
We then substitute expansion into the PDE:
∂
∂
t
[
∑
T
m
n
(
t
)
X
n
(
x
)
Y
m
(
y
)
]
=
k
{
∂
∂
x
2
[
∑
T
m
n
(
t
)
X
n
(
x
)
Y
m
(
y
)
]
+
∂
∂
y
2
[
∑
T
m
n
(
t
)
X
n
(
x
)
Y
m
(
y
)
]
}
+
∑
Q
m
n
(
t
)
X
n
(
x
)
Y
m
(
y
)
{\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)}
⇒
∑
T
m
n
′
(
t
)
X
n
(
x
)
Y
m
(
y
)
=
k
{
∑
T
m
n
(
t
)
X
n
″
(
x
)
Y
m
(
y
)
+
∑
T
m
n
(
t
)
X
n
(
x
)
Y
m
″
(
y
)
}
+
∑
Q
m
n
(
t
)
X
n
(
x
)
Y
m
(
y
)
{\displaystyle \Rightarrow \sum T_{mn}'(t)X_{n}(x)Y_{m}(y)=k\left\{\sum T_{mn}(t)X_{n}''(x)Y_{m}(y)+\sum T_{mn}(t)X_{n}(x)Y_{m}''(y)\right\}+\sum Q_{mn}(t)X_{n}(x)Y_{m}(y)}
⇒
∑
T
m
n
′
(
t
)
X
n
(
x
)
Y
m
(
y
)
=
∑
k
{
T
m
n
(
t
)
[
−
λ
n
2
X
n
(
x
)
]
Y
m
(
y
)
+
∑
T
m
n
(
t
)
X
n
(
x
)
[
−
λ
^
m
2
Y
m
(
y
)
]
}
+
∑
Q
m
n
(
t
)
X
n
(
x
)
Y
m
(
y
)
{\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)}
⇒
∑
[
T
m
n
′
(
t
)
+
k
(
λ
n
2
+
λ
^
m
2
)
]
X
n
(
x
)
Y
m
(
y
)
=
∑
Q
m
n
(
t
)
X
n
(
x
)
Y
m
(
y
)
{\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)}
This implies that
X
n
(
x
)
⊗
Y
m
(
y
)
{\displaystyle X_{n}(x)\otimes Y_{m}(y)~}
forms an orthogonal basis. This means that we can write the following:
⇒
T
m
n
′
(
t
)
+
k
(
λ
n
2
+
λ
^
m
2
)
=
Q
m
n
(
t
)
{\displaystyle \Rightarrow T_{mn}'(t)+k(\lambda _{n}^{2}+{\hat {\lambda }}_{m}^{2})=Q_{mn}(t)}
This is a first-order ODE which can be solved using the integration factor :
μ
(
t
)
=
e
∫
k
(
λ
n
2
+
λ
^
m
2
)
d
t
=
e
k
(
λ
n
2
+
λ
^
m
2
)
t
{\displaystyle \mu (t)=e^{\int k(\lambda _{n}^{2}+{\hat {\lambda }}_{m}^{2})dt}=e^{k(\lambda _{n}^{2}+{\hat {\lambda }}_{m}^{2})t}}
Solving for our coefficient we get:
T
m
n
(
t
)
=
e
−
k
(
λ
n
2
+
λ
^
m
2
)
t
∫
0
t
e
k
(
λ
n
2
+
λ
^
m
2
)
s
Q
m
n
(
s
)
d
s
+
C
m
n
e
−
k
(
λ
n
2
+
λ
^
m
2
)
t
{\displaystyle T_{mn}(t)=e^{-k(\lambda _{n}^{2}+{\hat {\lambda }}_{m}^{2})t}\int \limits _{0}^{t}e^{k(\lambda _{n}^{2}+{\hat {\lambda }}_{m}^{2})s}Q_{mn}(s)ds+C_{mn}e^{-k(\lambda _{n}^{2}+{\hat {\lambda }}_{m}^{2})t}}
Satisfy Initial Condition
edit
We apply the initial condition to our equation above:
v
(
x
,
y
,
0
)
=
f
(
x
,
y
)
−
s
(
x
,
y
,
0
)
=
∑
T
m
n
(
0
)
X
n
(
x
)
Y
m
(
y
)
=
∑
C
m
n
X
n
(
x
)
Y
m
(
y
)
{\displaystyle {\begin{aligned}v(x,y,0)&=f(x,y)-s(x,y,0)\\&=\sum T_{mn}(0)X_{n}(x)Y_{m}(y)\\&=\sum C_{mn}X_{n}(x)Y_{m}(y)\end{aligned}}}
The Fourier coefficients can be solved using the inner product definition:
C
m
n
=
∫
0
L
∫
0
M
[
f
(
x
,
y
)
−
s
(
x
,
y
,
0
)
]
X
n
(
x
)
Y
m
(
y
)
d
y
d
x
∫
0
L
X
n
2
(
x
)
d
x
∫
0
M
Y
m
2
(
y
)
d
y
{\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}}}
We have all the necessary information about the variable portion of the function.
Step 4: Combine Solutions
edit
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.