Step 1: Partition Solution
edit
In order to get a solution, we can partition the function into a "transient" or "variable" solution and a "steady-state" solution:
u
(
x
,
t
)
=
s
(
x
,
t
)
⏟
steady-state
+
v
(
x
,
t
)
⏟
variable
{\displaystyle u(x,t)=\underbrace {s(x,t)} _{\text{steady-state}}+\underbrace {v(x,t)} _{\text{variable}}}
Substitute this relation into our original heat equation, boundary conditions and initial condition:
s
t
+
v
t
=
k
s
x
x
+
k
v
x
x
+
h
(
x
,
t
)
{\displaystyle s_{t}+v_{t}=ks_{xx}+kv_{xx}+h(x,t)}
α
1
s
(
0
,
t
)
+
α
1
v
(
0
,
t
)
−
β
1
s
x
(
0
,
t
)
−
β
1
v
x
(
0
,
t
)
=
b
1
(
t
)
{\displaystyle \alpha _{1}s(0,t)+\alpha _{1}v(0,t)-\beta _{1}s_{x}(0,t)-\beta _{1}v_{x}(0,t)=b_{1}(t)}
α
2
s
(
L
,
t
)
+
α
2
v
(
L
,
t
)
+
β
2
s
x
(
L
,
t
)
+
β
2
v
x
(
L
,
t
)
=
b
2
(
t
)
{\displaystyle \alpha _{2}s(L,t)+\alpha _{2}v(L,t)+\beta _{2}s_{x}(L,t)+\beta _{2}v_{x}(L,t)=b_{2}(t)}
s
(
x
,
0
)
+
v
(
x
,
0
)
=
f
(
x
)
{\displaystyle s(x,0)+v(x,0)=f(x)}
We will also impose conditions on our partitioned solutions. Part of the beauty of partitioning the solution is being able to divide the boundary conditions among both parts. The following conditions will be imposed:
We will choose the steady-state solution to be linear in x, which means that
s
x
x
=
0
.
{\displaystyle s_{xx}=0~.}
We will let the steady-state solution handle the non-homogeneous boundary conditions.
We will let the variable portion satisfy the non-homogeneous equation and homogeneous boundary conditions.
Thus, we have constructed two separate initial boundary value problems (IBVPs):
{
s
x
x
=
0
α
1
s
(
0
,
t
)
−
β
1
s
x
(
0
,
t
)
=
b
1
(
t
)
α
2
s
(
L
,
t
)
+
β
2
s
x
(
L
,
t
)
=
b
2
(
t
)
{\displaystyle {\begin{cases}s_{xx}=0\\\alpha _{1}s(0,t)-\beta _{1}s_{x}(0,t)=b_{1}(t)\\\alpha _{2}s(L,t)+\beta _{2}s_{x}(L,t)=b_{2}(t)\end{cases}}}
{
v
t
=
k
v
x
x
−
s
t
+
h
(
x
,
t
)
α
1
v
(
0
,
t
)
−
β
1
v
x
(
0
,
t
)
=
0
α
2
v
(
L
,
t
)
+
β
2
v
x
(
L
,
t
)
=
0
v
(
x
,
0
)
=
f
(
x
)
−
s
(
x
,
0
)
{\displaystyle {\begin{cases}v_{t}=kv_{xx}-s_{t}+h(x,t)\\\alpha _{1}v(0,t)-\beta _{1}v_{x}(0,t)=0\\\alpha _{2}v(L,t)+\beta _{2}v_{x}(L,t)=0\\v(x,0)=f(x)-s(x,0)\end{cases}}}
Note that the sum
s
(
x
,
t
)
+
v
(
x
,
t
)
{\displaystyle s(x,t)+v(x,t)}
satisfies all conditions of the original IBVP.
Step 2: Solve Steady-state Partition
edit
Assumption 1
edit
We are assuming that S is linear in x, so our equation take the form:
s
(
x
,
t
)
=
m
(
t
)
x
+
b
(
t
)
{\displaystyle s(x,t)=m(t)x+b(t)}
We will see why this is only an assumption because doesn't cover all the different boundary condition types. Applying the boundary conditions, we get:
α
1
b
(
t
)
−
β
1
m
(
t
)
=
b
1
(
t
)
α
2
b
(
t
)
+
(
α
2
L
+
β
2
)
m
(
t
)
=
b
2
(
t
)
{\displaystyle {\begin{aligned}\alpha _{1}&b(t)-\beta _{1}&m(t)=&b_{1}(t)\\\alpha _{2}&b(t)+(\alpha _{2}L+\beta _{2})&m(t)=&b_{2}(t)\end{aligned}}}
Solving for
b
(
t
)
{\displaystyle b(t)}
and
m
(
t
)
{\displaystyle m(t)}
:
b
(
t
)
=
|
b
1
(
t
)
−
β
1
b
2
(
t
)
α
2
L
+
β
2
|
|
α
1
−
β
1
α
2
α
2
L
+
β
2
|
=
(
α
2
L
+
β
2
)
b
1
(
t
)
+
β
1
b
2
(
t
)
α
1
α
2
L
+
α
1
β
2
+
α
2
β
1
{\displaystyle b(t)={\frac {\begin{vmatrix}b_{1}(t)&-\beta _{1}\\b_{2}(t)&\alpha _{2}L+\beta _{2}\end{vmatrix}}{\begin{vmatrix}\alpha _{1}&-\beta _{1}\\\alpha _{2}&\alpha _{2}L+\beta _{2}\end{vmatrix}}}={\frac {(\alpha _{2}L+\beta _{2})b_{1}(t)+\beta _{1}b_{2}(t)}{\alpha _{1}\alpha _{2}L+\alpha _{1}\beta _{2}+\alpha _{2}\beta _{1}}}}
m
(
t
)
=
|
α
1
b
1
(
t
)
α
2
b
2
(
t
)
|
|
α
1
−
β
1
α
2
α
2
L
+
β
2
|
=
α
1
b
2
(
t
)
−
α
2
b
1
(
t
)
α
1
α
2
L
+
α
1
β
2
+
α
2
β
1
{\displaystyle m(t)={\frac {\begin{vmatrix}\alpha _{1}&b_{1}(t)\\\alpha _{2}&b_{2}(t)\end{vmatrix}}{\begin{vmatrix}\alpha _{1}&-\beta _{1}\\\alpha _{2}&\alpha _{2}L+\beta _{2}\end{vmatrix}}}={\frac {\alpha _{1}b_{2}(t)-\alpha _{2}b_{1}(t)}{\alpha _{1}\alpha _{2}L+\alpha _{1}\beta _{2}+\alpha _{2}\beta _{1}}}}
s
(
x
,
t
)
=
α
1
b
2
(
t
)
−
α
2
b
1
(
t
)
α
1
α
2
L
+
α
1
β
2
+
α
2
β
1
x
+
(
α
2
L
+
β
2
)
b
1
(
t
)
+
β
1
b
2
(
t
)
α
1
α
2
L
+
α
1
β
2
+
α
2
β
1
{\displaystyle s(x,t)={\frac {\alpha _{1}b_{2}(t)-\alpha _{2}b_{1}(t)}{\alpha _{1}\alpha _{2}L+\alpha _{1}\beta _{2}+\alpha _{2}\beta _{1}}}x+{\frac {(\alpha _{2}L+\beta _{2})b_{1}(t)+\beta _{1}b_{2}(t)}{\alpha _{1}\alpha _{2}L+\alpha _{1}\beta _{2}+\alpha _{2}\beta _{1}}}}
That means that the coefficients are only defined as long as
α
1
α
2
L
+
α
1
β
2
+
α
2
β
1
≠
0
.
{\displaystyle \alpha _{1}\alpha _{2}L+\alpha _{1}\beta _{2}+\alpha _{2}\beta _{1}\neq 0~.}
This means that the linear assumption of s(x,t) only holds if the boundary conditions are not both Neumann type (i.e.
α
1
,
α
2
≠
0
{\displaystyle \alpha _{1},\alpha _{2}\neq 0}
). Knowing the coefficients
α
1
,
α
2
,
β
1
,
β
2
{\displaystyle \alpha _{1},\alpha _{2},\beta _{1},\beta _{2}}
from the original boundary conditions will yield the coefficients for s(x,t).
Assumption 2
edit
For the case where both boundary conditions are Neumann type, a different assumption must be made. The linear assumption didn't yield any solution, so let's assume s has a quadratic relationship with x:
s
(
x
,
t
)
=
a
(
t
)
x
2
+
b
(
t
)
x
+
c
(
t
)
.
{\displaystyle s(x,t)=a(t)x^{2}+b(t)x+c(t)~.}
For convenience, we choose
c
(
t
)
=
0
.
{\displaystyle c(t)=0~.}
In this Neumann-Neumann condition, the only boundary conditions we have are:
{
s
x
(
0
,
t
)
=
b
1
(
t
)
,
β
1
=
1
for simplicity
s
x
(
L
,
t
)
=
b
2
(
t
)
,
β
2
=
1
for simplicity
{\displaystyle {\begin{cases}s_{x}(0,t)=b_{1}(t),\beta _{1}=1{\text{ for simplicity}}\\s_{x}(L,t)=b_{2}(t),\beta _{2}=1{\text{ for simplicity}}\end{cases}}}
Solving the assumption for the boundary conditions:
s
x
(
0
,
t
)
=
b
1
(
t
)
=
b
(
t
)
s
x
(
L
,
t
)
=
b
2
(
t
)
=
2
a
(
t
)
L
+
b
(
t
)
⇒
{
b
(
t
)
=
b
1
(
t
)
a
(
t
)
=
b
2
(
t
)
−
b
1
(
t
)
2
L
{\displaystyle {\begin{aligned}s_{x}(0,t)&=b_{1}(t)=b(t)\\s_{x}(L,t)&=b_{2}(t)=2a(t)L+b(t)\end{aligned}}\quad \Rightarrow \quad \left\{{\begin{aligned}b(t)&=b_{1}(t)\\a(t)&={\frac {b_{2}(t)-b_{1}(t)}{2L}}\end{aligned}}\right.}
Thus we arrive at the solution to the "steady-state" solution:
s
(
x
,
t
)
=
b
2
(
t
)
−
b
1
(
t
)
2
L
x
2
+
b
1
(
t
)
x
.
{\displaystyle s(x,t)={\frac {b_{2}(t)-b_{1}(t)}{2L}}x^{2}+b_{1}(t)x~.}
Step 3: Solve Variable Partition
edit
The equation for the variable portion is:
v
t
=
k
v
x
x
−
s
t
+
h
(
x
,
t
)
+
k
s
x
x
{\displaystyle v_{t}=kv_{xx}-s_{t}+h(x,t)+ks_{xx}}
For Assumption 1
edit
In order to simplify the equation, we can define a new function:
q
(
x
,
t
)
:=
h
(
x
,
t
)
−
s
t
(
x
,
t
)
{\displaystyle q(x,t):=h(x,t)-s_{t}(x,t)}
For Assumption 2
edit
In order to simplify the equation, we can define a new function:
q
(
x
,
t
)
:=
h
(
x
,
t
)
−
s
t
(
x
,
t
)
+
k
s
x
x
(
x
,
t
)
{\displaystyle q(x,t):=h(x,t)-s_{t}(x,t)+ks_{xx}(x,t)}
Step 3.1: Solve the Associated Homogeneous IBVP
edit
The associated homogeneous IBVP is as follows:
{
v
t
=
k
v
x
x
α
1
v
(
0
,
t
)
−
β
1
v
x
(
0
,
t
)
=
0
α
2
v
(
L
,
t
)
+
β
2
v
x
(
L
,
t
)
=
0
{\displaystyle {\begin{cases}v_{t}=kv_{xx}\\\alpha _{1}v(0,t)-\beta _{1}v_{x}(0,t)=0\\\alpha _{2}v(L,t)+\beta _{2}v_{x}(L,t)=0\end{cases}}}
Separate Variables
edit
v
(
x
,
t
)
=
X
(
x
)
T
(
t
)
⇒
X
T
′
=
k
X
″
T
⇒
T
′
k
T
=
X
″
X
=
μ
{\displaystyle v(x,t)=X(x)T(t)\Rightarrow XT'=kX''T\Rightarrow {\frac {T'}{kT}}={\frac {X''}{X}}=\mu }
Translate Boundary Conditions
edit
0
=
α
1
X
(
0
)
T
(
t
)
−
β
1
X
′
(
0
)
T
(
t
)
=
[
α
1
X
(
0
)
−
β
1
X
′
(
0
)
]
T
(
t
)
∀
t
∈
[
0
,
∞
)
⇒
α
1
X
(
0
)
−
β
1
X
′
(
0
)
=
0
{\displaystyle {\begin{aligned}0&=\alpha _{1}X(0)T(t)-\beta _{1}X'(0)T(t)&\\&=\left[\alpha _{1}X(0)-\beta _{1}X'(0)\right]T(t)&\forall t\in [0,\infty )\\\end{aligned}}\quad \Rightarrow \quad \alpha _{1}X(0)-\beta _{1}X'(0)=0}
0
=
α
2
X
(
L
)
T
(
t
)
+
β
2
X
′
(
L
)
T
(
t
)
=
[
α
2
X
(
L
)
+
β
2
X
′
(
L
)
]
T
(
t
)
∀
t
∈
[
0
,
∞
)
⇒
α
2
X
(
L
)
+
β
2
X
′
(
L
)
=
0
{\displaystyle {\begin{aligned}0&=\alpha _{2}X(L)T(t)+\beta _{2}X'(L)T(t)&\\&=\left[\alpha _{2}X(L)+\beta _{2}X'(L)\right]T(t)&\forall t\in [0,\infty )\\\end{aligned}}\quad \Rightarrow \quad \alpha _{2}X(L)+\beta _{2}X'(L)=0}
Solve the SLP
edit
X
″
−
μ
X
=
0
α
1
X
(
0
)
−
β
1
X
′
(
0
)
=
0
α
2
X
(
L
)
+
β
2
X
′
(
L
)
=
0
}
−
μ
=
λ
2
λ
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
)
{\displaystyle \left.{\begin{aligned}X''-\mu 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}-\mu &=\lambda ^{2}\\\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)\end{aligned}}}
Step 3.2: Solve the Non-homogeneous BVP
edit
The BVP is as follows:
{
v
t
=
k
v
x
x
+
q
(
x
,
t
)
α
1
v
(
0
,
t
)
−
β
1
v
x
(
0
,
t
)
=
0
α
2
v
(
L
,
t
)
+
β
2
v
x
(
L
,
t
)
=
0
v
(
x
,
0
)
=
f
(
x
)
−
s
(
x
,
0
)
{\displaystyle {\begin{cases}v_{t}=kv_{xx}+q(x,t)\\\alpha _{1}v(0,t)-\beta _{1}v_{x}(0,t)=0\\\alpha _{2}v(L,t)+\beta _{2}v_{x}(L,t)=0\\v(x,0)=f(x)-s(x,0)\end{cases}}}
In order to solve the problem, let:
v
(
x
,
t
)
:=
∑
n
=
0
∞
T
n
(
t
)
X
n
(
x
)
{\displaystyle v(x,t):=\sum _{n=0}^{\infty }T_{n}(t)X_{n}(x)}
where the time-dependent Fourier coefficients will be determined later. Also, let:
q
(
x
,
t
)
:=
∑
n
=
0
∞
Q
n
(
t
)
X
n
(
x
)
{\displaystyle q(x,t):=\sum _{n=0}^{\infty }Q_{n}(t)X_{n}(x)}
where the Fourier coefficients are given by the inner product:
Q
n
(
t
)
=
∫
0
L
q
(
x
,
t
)
X
n
(
x
)
d
x
∫
0
L
X
n
(
x
)
⋅
X
n
(
x
)
d
x
.
{\displaystyle Q_{n}(t)={\frac {\int \limits _{0}^{L}q(x,t)X_{n}(x)dx}{\int \limits _{0}^{L}X_{n}(x)\cdot X_{n}(x)dx}}~.}
In order to solve for the coefficients
T
n
(
t
)
{\displaystyle T_{n}(t)}
, we have to substitute the relations above into the original PDE. The term-by-term differentiation of v is legitimate since the partial derivatives of v are continuous. v satisfies the same spatial boundary conditions as the eigenfunction:
∂
∂
t
[
∑
n
=
0
∞
T
n
(
t
)
X
n
(
x
)
]
=
k
∂
2
∂
x
2
[
∑
n
=
0
∞
T
n
(
t
)
X
n
(
x
)
]
+
∑
n
=
0
∞
Q
n
(
t
)
X
n
(
x
)
{\displaystyle {\frac {\partial }{\partial t}}\left[\sum _{n=0}^{\infty }T_{n}(t)X_{n}(x)\right]=k{\frac {\partial ^{2}}{\partial x^{2}}}\left[\sum _{n=0}^{\infty }T_{n}(t)X_{n}(x)\right]+\sum _{n=0}^{\infty }Q_{n}(t)X_{n}(x)}
∑
n
=
0
∞
T
n
′
(
t
)
X
n
(
x
)
=
k
∑
n
=
0
∞
T
n
(
t
)
X
n
″
(
x
)
+
∑
n
=
0
∞
Q
n
(
t
)
X
n
(
x
)
{\displaystyle \sum _{n=0}^{\infty }T_{n}'(t)X_{n}(x)=k\sum _{n=0}^{\infty }T_{n}(t)X_{n}''(x)+\sum _{n=0}^{\infty }Q_{n}(t)X_{n}(x)}
Since the eigenfunction
X
n
(
x
)
{\displaystyle X_{n}(x)}
satisfies the ODE
X
″
+
λ
n
2
X
=
0
⇒
X
n
″
(
x
)
=
−
λ
n
2
X
n
(
x
)
{\displaystyle X''+\lambda _{n}^{2}X=0\Rightarrow X_{n}''(x)=-\lambda _{n}^{2}X_{n}(x)}
,
∑
n
=
0
∞
T
n
′
(
t
)
X
n
(
x
)
=
∑
n
=
0
∞
−
k
λ
n
2
T
n
(
t
)
X
n
(
x
)
+
∑
n
=
0
∞
Q
n
(
t
)
X
n
(
x
)
{\displaystyle \sum _{n=0}^{\infty }T_{n}'(t)X_{n}(x)=\sum _{n=0}^{\infty }-k\lambda _{n}^{2}T_{n}(t)X_{n}(x)+\sum _{n=0}^{\infty }Q_{n}(t)X_{n}(x)}
∑
n
=
0
∞
[
T
n
′
(
t
)
+
k
λ
n
2
T
n
(
t
)
]
X
n
(
x
)
=
∑
n
=
0
∞
Q
n
(
t
)
X
n
(
x
)
{\displaystyle \sum _{n=0}^{\infty }\left[T_{n}'(t)+k\lambda _{n}^{2}T_{n}(t)\right]X_{n}(x)=\sum _{n=0}^{\infty }Q_{n}(t)X_{n}(x)}
Since
X
n
(
x
)
{\displaystyle X_{n}(x)}
forms a basis and is therefore linearly independent:
T
n
′
(
t
)
+
k
λ
n
2
T
n
(
t
)
=
Q
n
(
t
)
{\displaystyle T_{n}'(t)+k\lambda _{n}^{2}T_{n}(t)=Q_{n}(t)}
which is a first order non-homogeneous linear equation. The integrating factor
μ
(
t
)
=
e
∫
k
λ
n
2
d
t
=
e
k
λ
n
2
t
{\displaystyle \mu (t)=e^{\int k\lambda _{n}^{2}dt}=e^{k\lambda _{n}^{2}t}}
. Solving the equation yields:
T
n
(
t
)
=
e
−
k
λ
n
2
t
∫
0
t
e
k
λ
n
2
s
Q
n
(
s
)
d
s
+
C
n
e
−
k
λ
n
2
t
{\displaystyle T_{n}(t)=e^{-k\lambda _{n}^{2}t}\int \limits _{0}^{t}e^{k\lambda _{n}^{2}s}Q_{n}(s)ds+C_{n}e^{-k\lambda _{n}^{2}t}}
The constant
C
n
{\displaystyle C_{n}}
allows us to satisfy the initial condition:
v
(
x
,
0
)
=
f
(
x
)
−
s
(
x
,
0
)
=
∑
n
=
0
∞
T
n
(
0
)
X
n
(
x
)
=
∑
n
=
0
∞
C
n
X
n
(
x
)
.
{\displaystyle v(x,0)=f(x)-s(x,0)=\sum _{n=0}^{\infty }T_{n}(0)X_{n}(x)=\sum _{n=0}^{\infty }C_{n}X_{n}(x)~.}
C
n
=
∫
0
L
[
f
(
x
)
−
s
(
x
,
0
)
]
X
n
(
x
)
d
x
∫
0
L
X
n
(
x
)
⋅
X
n
(
x
)
d
x
.
{\displaystyle C_{n}={\frac {\int \limits _{0}^{L}\left[f(x)-s(x,0)\right]X_{n}(x)dx}{\int \limits _{0}^{L}X_{n}(x)\cdot X_{n}(x)dx}}~.}
We can now substitute all the expressions to get the variable portion
v
(
x
,
t
)
{\displaystyle v(x,t)}
:
Compute and substitute
C
n
{\displaystyle C_{n}}
and
Q
n
(
t
)
{\displaystyle Q_{n}(t)}
into
T
n
(
t
)
.
{\displaystyle T_{n}(t)~.}
Compute and substitute
T
n
(
t
)
{\displaystyle T_{n}(t)}
and
X
n
(
x
)
{\displaystyle X_{n}(x)}
into
v
(
x
,
t
)
:=
∑
n
=
0
∞
T
n
(
t
)
X
n
(
x
)
.
{\displaystyle v(x,t):=\sum _{n=0}^{\infty }T_{n}(t)X_{n}(x)~.}
Step 4: Combine Solutions
edit
The complete solution for
u
(
x
,
t
)
{\displaystyle u(x,t)}
can be found by adding the "steady-state" solution and the "variable" solutions. The result can easily be checked by graphing in a symbolic solver like Mathematica or Maple.