## Transcribed Text

1. Verify that the the backward-time central scheme for the heat equation is accurate of order
(1,2) and the Crank-Nicolson scheme is (2,2).
2. For the forward-time central scheme for the heat equation, show that the scheme satisfies the
maximum principle
if only if 2bu < 1.
3. Use the method of Schur and von Neumann polynomial to verify that the scheme:
2A
is unconditionally stable.
4. Consider the modified Crank-Nicolson scheme as
-00+ =
show that the above scheme is dissipative of order 4stableifoe<2.
5. (Coding problem) Impliment Crank-Nicolson scheme for the IVP:
for -
for - 1u(t,-1) = for OSISI.
The exact solution is u(t, x) = sin T(I - t). Take A = 1, h = 1/10.1/20,1/40. For the numerical
boundary condtion on . = 1, use
=
(a) In each time step, use the Thomas algorithm to solve the tridiagonal system.
(b) Plot the exact solution and the numerical solution at t = 1.
(c) Compute the error En = ||a - walls at time t = 1 for h = 1/10,1/20,1/40. The order of the
accuracy of the numerical solution is approximated by looking at the number:
order =
Verify the order of accuracy of the solution by taking (hr,h2) = (1/10,1/20), (1/20,1/40) re-
spectively.
1

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction
of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.

function q5Rc()

% wave running to the right

tend = 1; % time when to end integration, can be varied

% here are the three versions of integration:

[u1, x1] = CranckNic(1/10, tend);

[u2, x2] = CranckNic(1/20, tend);

[u3, x3] = CranckNic(1/40, tend);

% The three errors:

Eh1 = max(abs(u1 - sin(pi*(x1-tend))))

Eh2 = max(abs(u2 - sin(pi*(x2-tend))))

Eh3 = max(abs(u3 - sin(pi*(x3-tend))))

% requested at the end

order = [log(Eh1/Eh2)/log(2), log(Eh2/Eh3)/log(2)]

% Plots requested in 5(b)

plot(x1,u1,x2,u2,x3,u3,x3,sin(pi*(x3-tend)));

xlabel('x');

ylabel('u(x,t_end)')...