Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b...
Transcript of Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b...
![Page 1: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/1.jpg)
Today
• Diffusion equation -
• derivation (transport eqns in general)
• initial conditions, boundary conditions
• steady state
• separation of variables
![Page 2: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/2.jpg)
Conservation equations
Qab(t) =Z b
ac(x, t) dx
a b
c(x,t) is linear mass density of ink in a long narrow tube.
![Page 3: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/3.jpg)
Conservation equations
Qab(t) =Z b
ac(x, t) dx
a b
c(x,t) is linear mass density of ink in a long narrow tube.
![Page 4: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/4.jpg)
Conservation equations
Qab(t) =Z b
ac(x, t) dx
a b
c(x,t) is linear mass density of ink in a long narrow tube.
dQab
dt
(t) =d
dt
Z b
ac(x, t) dx =
Z b
a
�
�tc(x, t) dx
Define the flux Ja to be the amount of mass crossing the line x=a per unit of time (particles moving right count as positive flux) .
In that case, the change of Q inside the a-b box can also be counted watching flux, that is, flux at a - flux at b:
dQab
dt(t) = �Jb + Ja
JbJa
![Page 5: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/5.jpg)
Conservation equations - Transport equation
Qab(t) =Z b
ac(x, t) dx
a bdQab
dt
(t) =d
dt
Z b
ac(x, t) dx =
Z b
a
�
�tc(x, t) dx
dQab
dt(t) = �Jb + Ja
![Page 6: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/6.jpg)
Conservation equations - Transport equation
Qab(t) =Z b
ac(x, t) dx
a bdQab
dt
(t) =d
dt
Z b
ac(x, t) dx =
Z b
a
�
�tc(x, t) dx
dQab
dt(t) = �Jb + Ja
Need a model for flux. Let’s consider simpler case first (not diffusion yet!)
If fluid in pipe is moving with velocity v, flux is vc:
dQab
dt(t) = �Jb + Ja
Z b
a
�
�tc(x, t) dx )
Ja = vc(a, t)
= �vc(b, t) + vc(a, t) = � vc(x, t)����b
a
= �Z b
av
�c
�xdx
�c
�t= �v
�c
�xCalled Transport equation.
= �Z b
av
�c
�xdx
![Page 7: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/7.jpg)
Conservation equations - Diffusion equation
Qab(t) =Z b
ac(x, t) dx
a bdQab
dt
(t) =d
dt
Z b
ac(x, t) dx =
Z b
a
�
�tc(x, t) dx
Ja
= �D�c
�x
����x=a
Now lets consider diffusion. We can derive this from chemical potential but
it also makes sense that for diffusion:
dQab
dt(t) = �Jb + Ja
![Page 8: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/8.jpg)
Conservation equations - Diffusion equation
Qab(t) =Z b
ac(x, t) dx
a bdQab
dt
(t) =d
dt
Z b
ac(x, t) dx =
Z b
a
�
�tc(x, t) dx
Ja
= �D�c
�x
����x=a
Now lets consider diffusion. We can derive this from chemical potential but
it also makes sense that for diffusion:
dQab
dt(t) = �Jb + Ja
dQab
dt(t) = �Jb + Ja = D
�c
�x
����x=b
�D�c
�x
����x=a
= D�c
�x
����b
a
=Z b
aD
�2c
�x2dx
Z b
a
�
�tc(x, t) dx
�
�tc(x, t) = D
�2
�x2c(x, t))
![Page 9: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/9.jpg)
Conservation equations - Diffusion equation
Qab(t) =Z b
ac(x, t) dx
a bdQab
dt
(t) =d
dt
Z b
ac(x, t) dx =
Z b
a
�
�tc(x, t) dx
Ja
= �D�c
�x
����x=a
Now lets consider diffusion. We can derive this from chemical potential but
it also makes sense that for diffusion:
dQab
dt(t) = �Jb + Ja
dQab
dt(t) = �Jb + Ja = D
�c
�x
����x=b
�D�c
�x
����x=a
= D�c
�x
����b
a
=Z b
aD
�2c
�x2dx
Z b
a
�
�tc(x, t) dx
�
�tc(x, t) = D
�2
�x2c(x, t))
The Diffusion Equation
dc
dt
= D
d
2c
dx
2
![Page 10: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/10.jpg)
Initial and boundary conditions
![Page 11: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/11.jpg)
Initial and boundary conditions
• One derivative in time requires an initial condition in t.
![Page 12: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/12.jpg)
Initial and boundary conditions
• One derivative in time requires an initial condition in t.
• Two derivatives in space require two “initial conditions” in x (i.e. one at x=0 and one at x=L). Called boundary conditions (BCs).
![Page 13: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/13.jpg)
Initial and boundary conditions
• One derivative in time requires an initial condition in t.
• Two derivatives in space require two “initial conditions” in x (i.e. one at x=0 and one at x=L). Called boundary conditions (BCs).
• Initial condition: c(x,0) = f(x) where f(x) gives initial concentration profile.
![Page 14: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/14.jpg)
Initial and boundary conditions
• One derivative in time requires an initial condition in t.
• Two derivatives in space require two “initial conditions” in x (i.e. one at x=0 and one at x=L). Called boundary conditions (BCs).
• Initial condition: c(x,0) = f(x) where f(x) gives initial concentration profile.
• Boundary conditions:
![Page 15: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/15.jpg)
Initial and boundary conditions
• One derivative in time requires an initial condition in t.
• Two derivatives in space require two “initial conditions” in x (i.e. one at x=0 and one at x=L). Called boundary conditions (BCs).
• Initial condition: c(x,0) = f(x) where f(x) gives initial concentration profile.
• Boundary conditions:
• c(0,t) = c0 and c(L,t) = cL Dirichlet conditions
![Page 16: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/16.jpg)
Initial and boundary conditions
• One derivative in time requires an initial condition in t.
• Two derivatives in space require two “initial conditions” in x (i.e. one at x=0 and one at x=L). Called boundary conditions (BCs).
• Initial condition: c(x,0) = f(x) where f(x) gives initial concentration profile.
• Boundary conditions:
• c(0,t) = c0 and c(L,t) = cL
• anddc
dx
(0, t) = m0dc
dx
(L, t) = mL
Dirichlet conditions
Neumann conditions
![Page 17: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/17.jpg)
Initial and boundary conditions
• One derivative in time requires an initial condition in t.
• Two derivatives in space require two “initial conditions” in x (i.e. one at x=0 and one at x=L). Called boundary conditions (BCs).
• Initial condition: c(x,0) = f(x) where f(x) gives initial concentration profile.
• Boundary conditions:
• c(0,t) = c0 and c(L,t) = cL
• anddc
dx
(0, t) = m0dc
dx
(L, t) = mL
Dirichlet conditions
Neumann conditions
Ja = �D
dc
dx
(a, t)Recall flux:Neumann conditions also called flux conditions (no-flux when m0 = mL = 0)
![Page 18: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/18.jpg)
Initial and boundary conditions
• One derivative in time requires an initial condition in t.
• Two derivatives in space require two “initial conditions” in x (i.e. one at x=0 and one at x=L). Called boundary conditions (BCs).
• Initial condition: c(x,0) = f(x) where f(x) gives initial concentration profile.
• Boundary conditions:
• c(0,t) = c0 and c(L,t) = cL
• and
• c(0,t) = c0 and
dc
dx
(0, t) = m0dc
dx
(L, t) = mL
Dirichlet conditions
Neumann conditions
Mixed conditionsdc
dx
(L, t) = mL
(no-flux conditions)
![Page 19: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/19.jpg)
Initial and boundary conditions
• One derivative in time requires an initial condition in t.
• Two derivatives in space require two “initial conditions” in x (i.e. one at x=0 and one at x=L). Called boundary conditions (BCs).
• Initial condition: c(x,0) = f(x) where f(x) gives initial concentration profile.
• Boundary conditions:
• c(0,t) = c0 and c(L,t) = cL
• and
• c(0,t) = c0 and
•
dc
dx
(0, t) = m0dc
dx
(L, t) = mL
Dirichlet conditions
Neumann conditions
Mixed conditionsdc
dx
(L, t) = mL
a
dc
dx
(0, t) + bc(0, t) = m0 Robin conditions
(no-flux conditions)
![Page 20: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/20.jpg)
The Diffusion equation
• What does a steady state of the Diffusion equation look like?
The Diffusion Equation
dc
dt
= D
d
2c
dx
2
![Page 21: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/21.jpg)
The Diffusion equation
• What does a steady state of the Diffusion equation look like?
The Diffusion Equation
dc
dt
= D
d
2c
dx
2
0 = D
d
2c
dx
2
![Page 22: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/22.jpg)
The Diffusion equation
• What does a steady state of the Diffusion equation look like?
The Diffusion Equation
dc
dt
= D
d
2c
dx
2
0 = D
d
2c
dx
2
css(x) = Ax + B
![Page 23: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/23.jpg)
The Diffusion equation
• What does a steady state of the Diffusion equation look like?
• A and B can be determined using the BCs. Getting A from Neumann conditions requires using the IC as well (total mass conservation).
The Diffusion Equation
dc
dt
= D
d
2c
dx
2
0 = D
d
2c
dx
2
css(x) = Ax + B
![Page 24: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/24.jpg)
Separation of variables
![Page 25: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/25.jpg)
Separation of variables
• Doc cam
![Page 26: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/26.jpg)
This pdf is also posted on the lecture slides page.
![Page 27: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/27.jpg)
• Find the Fourier series for f(x) = 2u0(x)-1 on the interval [-1,1].
fFS(x) = A0 + a1 cos
⇣�x
L
⌘+ a2 cos
✓2�x
L
◆+ · · ·
+b1 sin
⇣�x
L
⌘+ c2 sin
✓2�x
L
◆+ · · ·b2
Fourier series
![Page 28: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/28.jpg)
• Find the Fourier series for f(x) = 2u0(x)-1 on the interval [-1,1].
• Our hope is that f(x) = fFS(x) so we calculate coefficients as if they were equal:
fFS(x) = A0 + a1 cos
⇣�x
L
⌘+ a2 cos
✓2�x
L
◆+ · · ·
+b1 sin
⇣�x
L
⌘+ c2 sin
✓2�x
L
◆+ · · ·b2
Fourier series
![Page 29: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/29.jpg)
• Find the Fourier series for f(x) = 2u0(x)-1 on the interval [-1,1].
• Our hope is that f(x) = fFS(x) so we calculate coefficients as if they were equal:
fFS(x) = A0 + a1 cos
⇣�x
L
⌘+ a2 cos
✓2�x
L
◆+ · · ·
+b1 sin
⇣�x
L
⌘+ c2 sin
✓2�x
L
◆+ · · ·
bn =1L
Z L
�Lf(x) sin
⇣n�x
L
⌘dx
an =
1
L
Z L
�Lf(x) cos
⇣n�x
L
⌘dx
A0 =1
2L
Z L
�Lf(x) dx
b2
Fourier series
![Page 30: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/30.jpg)
• Find the Fourier series for f(x) = 2u0(x)-1 on the interval [-1,1].
• Our hope is that f(x) = fFS(x) so we calculate coefficients as if they were equal:
fFS(x) = A0 + a1 cos
⇣�x
L
⌘+ a2 cos
✓2�x
L
◆+ · · ·
+b1 sin
⇣�x
L
⌘+ c2 sin
✓2�x
L
◆+ · · ·
bn =1L
Z L
�Lf(x) sin
⇣n�x
L
⌘dx
an =
1
L
Z L
�Lf(x) cos
⇣n�x
L
⌘dx
A0 =1
2L
Z L
�Lf(x) dx
• To simplify formulas, usually define a0 = 2A0 =
1L
Z L
�Lf(x) dx
b2
Fourier series
![Page 31: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/31.jpg)
• Find the Fourier series for f(x) = 2u0(x)-1 on the interval [-1,1].
• Our hope is that f(x) = fFS(x) so we calculate coefficients as if they were equal:
fFS(x) = A0 + a1 cos
⇣�x
L
⌘+ a2 cos
✓2�x
L
◆+ · · ·
+b1 sin
⇣�x
L
⌘+ c2 sin
✓2�x
L
◆+ · · ·
bn =1L
Z L
�Lf(x) sin
⇣n�x
L
⌘dx
an =
1
L
Z L
�Lf(x) cos
⇣n�x
L
⌘dx
A0 =1
2L
Z L
�Lf(x) dx
• To simplify formulas, usually define a0 = 2A0 =
1L
Z L
�Lf(x) dx
b2
Fourier series
![Page 32: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/32.jpg)
• Find the Fourier series for f(x) = 2u0(x)-1 on the interval [-1,1].
• Our hope is that f(x) = fFS(x) so we calculate coefficients as if they were equal:
bn =1L
Z L
�Lf(x) sin
⇣n�x
L
⌘dx
an =
1
L
Z L
�Lf(x) cos
⇣n�x
L
⌘dx
A0 =1
2L
Z L
�Lf(x) dx
• To simplify formulas, usually define a0 = 2A0 =
1L
Z L
�Lf(x) dx
fFS(x) =
a0
2
+ a1 cos
⇣�x
L
⌘+ a2 cos
✓2�x
L
◆+ · · ·
+b1 sin
⇣�x
L
⌘+ c2 sin
✓2�x
L
◆+ · · ·b2
Fourier series
![Page 33: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/33.jpg)
• Find the Fourier series for f(x) = 2u0(x)-1 on the interval [-1,1].
• Our hope is that f(x) = fFS(x) so we calculate coefficients as if they were equal:
bn =1L
Z L
�Lf(x) sin
⇣n�x
L
⌘dx
an =
1
L
Z L
�Lf(x) cos
⇣n�x
L
⌘dx
A0 =1
2L
Z L
�Lf(x) dx
• To simplify formulas, usually define a0 = 2A0 =
1L
Z L
�Lf(x) dx
fFS(x) =
a0
2
+ a1 cos
⇣�x
L
⌘+ a2 cos
✓2�x
L
◆+ · · ·
+b1 sin
⇣�x
L
⌘+ c2 sin
✓2�x
L
◆+ · · ·b2
A0 is the average value of f(x)!
Fourier series
![Page 34: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/34.jpg)
• Calculate the coefficients.
https://www.desmos.com/calculator/tlvtikmi0y Does f(x) = fFS(x) for all x?Problems at jumps! x=-1, 0, 1
Fourier series
fFS(x) =
a0
2
+ a1 cos
⇣�x
L
⌘+ a2 cos
✓2�x
L
◆+ · · ·
+b1 sin
⇣�x
L
⌘+ c2 sin
✓2�x
L
◆+ · · ·b2
bn =1L
Z L
�Lf(x) sin
⇣n�x
L
⌘dx
an =
1
L
Z L
�Lf(x) cos
⇣n�x
L
⌘dx
A0 =1
2L
Z L
�Lf(x) dx
a0 = 2A0 =1L
Z L
�Lf(x) dxa0 = 2A0 =
1L
Z L
�Lf(x) dx
an = 0
a0 = 0
bn = 2 (1- (-1)n) / nπ
fFS(x) =4
⇡
sin⇣⇡x
L
⌘+
4
3⇡sin
✓3⇡x
L
◆+
4
5⇡sin
✓5⇡x
L
◆
![Page 35: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/35.jpg)
Fourier series
• Theorem Suppose f and f’ are piecewise continuous on [-L,L] and periodic beyond that interval. Then f(x) = fFS(x) at all points at which f is continuous. Furthermore, at points of discontinuity, fFS(x) takes the value of the midpoint of the jump. That is,
fFS(x) =f(x+) + f(x�)
2
![Page 36: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/36.jpg)
Heat/Diffusion equation - example
• Find the solution to the heat/diffusion equation
• subject to BCs
• and with IC
• The “warming up the milk bottle” example.
ut
= 7uxx
u(0, t) = 0 = u(4, t)
u(x, 0) =
⇢1, 0 x 20, 2 < x 4
https://www.desmos.com/calculator/zvowjmu30g
![Page 37: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/37.jpg)
Using Fourier Series to solve the Diffusion Equation
u(0, t) = u(2, t) = 0
u(x, 0) = x
ut
= 4uxx
https://www.desmos.com/calculator/yt7kztckeuhttps://www.desmos.com/calculator/wcdvgrveez
![Page 38: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/38.jpg)
Using Fourier Series to solve the Diffusion Equation
u(0, t) = u(2, t) = 0
u(x, 0) = x
ut
= 4uxx
bn =(�1)n+14
n�
u(x, t) =
a0
2
+
1X
n=1
ane�n2�2tcos
n�x
2
u(x, t) =1X
n=1
bne�n2�2t sinn�x
2
(0 for n odd)
a0 = 1, an = � 8
n2�2for n even
(A)
(B)
https://www.desmos.com/calculator/yt7kztckeuhttps://www.desmos.com/calculator/wcdvgrveez
![Page 39: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/39.jpg)
Using Fourier Series to solve the Diffusion Equation
u(0, t) = u(2, t) = 0
u(x, 0) = x
ut
= 4uxx
bn =(�1)n+14
n�
u(x, t) =
a0
2
+
1X
n=1
ane�n2�2tcos
n�x
2
u(x, t) =1X
n=1
bne�n2�2t sinn�x
2
(0 for n odd)
a0 = 1, an = � 8
n2�2for n even
(A)
(B)
https://www.desmos.com/calculator/yt7kztckeuhttps://www.desmos.com/calculator/wcdvgrveez
![Page 40: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/40.jpg)
Using Fourier Series to solve the Diffusion Equation
u(0, t) = u(2, t) = 0
u(x, 0) = x
ut
= 4uxx
bn =(�1)n+14
n�
u(x, t) =
a0
2
+
1X
n=1
ane�n2�2tcos
n�x
2
u(x, t) =1X
n=1
bne�n2�2t sinn�x
2
(0 for n odd)
a0 = 1, an = � 8
n2�2for n even
(A)
(B)
https://www.desmos.com/calculator/yt7kztckeuhttps://www.desmos.com/calculator/wcdvgrveez
![Page 41: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/41.jpg)
Using Fourier Series to solve the Diffusion Equation
u(0, t) = u(2, t) = 0
u(x, 0) = x
ut
= 4uxx
bn =(�1)n+14
n�
u(x, t) =
a0
2
+
1X
n=1
ane�n2�2tcos
n�x
2
u(x, t) =1X
n=1
bne�n2�2t sinn�x
2
(0 for n odd)
a0 = 1, an = � 8
n2�2for n even
(A)
(B)
https://www.desmos.com/calculator/yt7kztckeuhttps://www.desmos.com/calculator/wcdvgrveez
![Page 42: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/42.jpg)
Using Fourier Series to solve the Diffusion Equation
u(0, t) = u(2, t) = 0
u(x, 0) = x
ut
= 4uxx
bn =(�1)n+14
n�
u(x, t) =
a0
2
+
1X
n=1
ane�n2�2tcos
n�x
2
u(x, t) =1X
n=1
bne�n2�2t sinn�x
2
(0 for n odd)
a0 = 1, an = � 8
n2�2for n even
(A)
(B)
• Show Desmos movies.https://www.desmos.com/calculator/yt7kztckeuhttps://www.desmos.com/calculator/wcdvgrveez
![Page 43: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/43.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
![Page 44: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/44.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
![Page 45: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/45.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
v3(x) = cos
3�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
![Page 46: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/46.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
vn(x) = cos
n�x
2
v3(x) = cos
3�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
![Page 47: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/47.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
vn(x) = cos
n�x
2
v3(x) = cos
3�x
2
un(x, t) = e�ntcos
n�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
![Page 48: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/48.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
vn(x) = cos
n�x
2
v3(x) = cos
3�x
2
un(x, t) = e�ntcos
n�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
⇤
⇤tun(x, t) = �ne�nt
cos
n⇥x
2
![Page 49: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/49.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
vn(x) = cos
n�x
2
v3(x) = cos
3�x
2
un(x, t) = e�ntcos
n�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
⇤
⇤tun(x, t) = �ne�nt
cos
n⇥x
2
⇥2
⇥x2un(x, t) = �n2�2
4
e�ntcos
n�x
2
![Page 50: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/50.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
vn(x) = cos
n�x
2
v3(x) = cos
3�x
2
un(x, t) = e�ntcos
n�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
⇤
⇤tun(x, t) = �ne�nt
cos
n⇥x
2
⇥2
⇥x2un(x, t) = �n2�2
4
e�ntcos
n�x
2
44
![Page 51: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/51.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
vn(x) = cos
n�x
2
v3(x) = cos
3�x
2
un(x, t) = e�ntcos
n�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
⇤
⇤tun(x, t) = �ne�nt
cos
n⇥x
2
⇥2
⇥x2un(x, t) = �n2�2
4
e�ntcos
n�x
2
44
![Page 52: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/52.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
vn(x) = cos
n�x
2
v3(x) = cos
3�x
2
un(x, t) = e�ntcos
n�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
⇤
⇤tun(x, t) = �ne�nt
cos
n⇥x
2
⇥2
⇥x2un(x, t) = �n2�2
4
e�ntcos
n�x
2
44
![Page 53: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/53.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
vn(x) = cos
n�x
2
v3(x) = cos
3�x
2
un(x, t) = e�ntcos
n�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
⇤
⇤tun(x, t) = �ne�nt
cos
n⇥x
2
⇥2
⇥x2un(x, t) = �n2�2
4
e�ntcos
n�x
2
�n = �n2⇥2
44
![Page 54: Today - University of British Columbia€¦ · Conservation equations Q ab(t)= Z b a c(x,t) dx a b c(x,t) is linear mass density of ink in a long narrow tube. dQ ab dt (t)= d dt Z](https://reader035.fdocuments.us/reader035/viewer/2022070707/5ea31db0fd8764000c66178f/html5/thumbnails/54.jpg)
Using Fourier Series to solve the Diffusion Equation
ut
= 4uxx
du
dx
����x=0,2
= 0
u(x, 0) = cos
3�x
2
vn(x) = cos
n�x
2
v3(x) = cos
3�x
2
un(x, t) = e�ntcos
n�x
2
The IC is an eigenvector! Note that it satisfies the BCs.
⇤
⇤tun(x, t) = �ne�nt
cos
n⇥x
2
⇥2
⇥x2un(x, t) = �n2�2
4
e�ntcos
n�x
2
�n = �n2⇥2
44
u(x, t) = e�9�2tcos
3�x
2
So the solution is