- #1
squenshl
- 479
- 4
Consider the diffusion equation:
ut = uxx, 0 < x < 1, t > 0,
u(0,t) = p(t), u(1,t) = q(t), t > 0,
u(x,0) = f(x), 0 < x < 1,
for t < tfinal
Suppose that the boundary condition at x = 0 is now replaced by
[tex]\partial[/tex]u/[tex]\partial[/tex]x(0,t) = 0
Using the forward difference formula
[tex]\partial[/tex]u/[tex]\partial[/tex]x(x,t) = ((-u(x+2[tex]\Delta[/tex]x,t) + 4u(x+[tex]\Delta[/tex]x,t) - 3u(x,t))/2[tex]\Delta[/tex]x) + O([tex]\Delta[/tex]x)2
show that the Euler algorithm needs to be modified to include the formula for U0,k+1:
Uj,k+1 = rUj-1,k + (1-2r)Uj,k + rUj+1,k, j = 1,2,...,N-1,
U0,k+1 = (4U1,k+1 - U2,k+1)/3.
I don't have a clue where to start. Please help.
ut = uxx, 0 < x < 1, t > 0,
u(0,t) = p(t), u(1,t) = q(t), t > 0,
u(x,0) = f(x), 0 < x < 1,
for t < tfinal
Suppose that the boundary condition at x = 0 is now replaced by
[tex]\partial[/tex]u/[tex]\partial[/tex]x(0,t) = 0
Using the forward difference formula
[tex]\partial[/tex]u/[tex]\partial[/tex]x(x,t) = ((-u(x+2[tex]\Delta[/tex]x,t) + 4u(x+[tex]\Delta[/tex]x,t) - 3u(x,t))/2[tex]\Delta[/tex]x) + O([tex]\Delta[/tex]x)2
show that the Euler algorithm needs to be modified to include the formula for U0,k+1:
Uj,k+1 = rUj-1,k + (1-2r)Uj,k + rUj+1,k, j = 1,2,...,N-1,
U0,k+1 = (4U1,k+1 - U2,k+1)/3.
I don't have a clue where to start. Please help.