Page 461 - Applied Numerical Methods Using MATLAB
P. 461
450 PARTIAL DIFFERENTIAL EQUATIONS
2
∂ u(x, t) ∂u(x, t)
−5
(b) 10 = for 0 ≤ x ≤ 1, 0 ≤ t ≤ 6000 (P9.4.3)
∂x 2 ∂t
with the initial/boundary conditions
u(x, 0) = 2x + sin(2πx), u(0,t) = 0, u(1,t) = 2 (P9.4.4)
(i) With the solution region divided into M × N = 20 × 40 sections,
does the explicit forward Euler method converge? What is the value
2
of r = A t/( x) ? Does the numerical stability condition (9.2.6)
seem to be so demanding?
(ii) If you increase M and N to make M × N = 40 × 160 for better
accuracy, does the explicit forward Euler method still converge?
2
What is the value of r = A t/( x) ? Does the numerical stability
condition (9.2.6) seem to be so demanding?
(iii) With the solution region divided into M × N = 40 × 200 sections,
does the explicit forward Euler method converge? What is the value
2
of r = A t/( x) ?
2
∂ u(x, t) ∂u(x, t)
(c) 2 = for 0 ≤ x ≤ π, 0 ≤ t ≤ 0.2 (P9.4.5)
∂x 2 ∂t
with the initial/boundary conditions
u(x, 0) = sin(2x), u(0,t) = 0, u(π, t) = 0 (P9.4.6)
(i) By substituting
u(x, t) = sin(2x)e −8t (P9.4.7)
into the above equation (P9.4.5), verify that this is a solution to
the PDE.
(ii) With the solution region divided into M × N = 40 × 100 sections,
does the explicit forward Euler method converge? What is the value
2
of r = A t/( x) ?
(iii) If you increase N (the number of subintervals along the t-axis) to
125 for improving the numerical stability, does the explicit forward
2
Euler method converge? What is the value of r = A t/( x) ?Use
the MATLAB statements in the following box to find the maximum
absolute errors of the numerical solutions obtained by the three
methods. Which method yields the smallest error?
uo = inline(’sin(2*x)*exp(-8*t)’,’x’,’t’); %true analytical solution
Uo = uo(x,t);
err = max(max(abs(u1 - Uo)))

