The Wrath of Khan

Here is the project statement.

part f:
To go from i to x use x=(i-1)*delta x, to go from j to t use t=(j-1)*delta t
The equation in part e, becomes a matrix equation in M[i,j] in terms of M[i-1,j-1], M[i,j-1] and M[i+1,j-1].

Sample picture for part f

Left half for part h

Triangle function

-- Not part of the project.

There are a pair of errors in the handout around part c. First there is a typo, it should be U_1 - U_3/3^2 + U_5/5^2 - U_7/7^2 and not 3^3. Second the series U_1 - U_3/3^2 + U_5/5^2 - U_7/7^2 + ... converges to a triangle function, but it is 1.233700550 times the f(x) given. The next picture illustrates the convergence.

Numerical Instability

-- Not part of the project, but the tag line.

Numerical Instability, delta t = 0.002 the onset.

Numerical Instability, delta t = 0.002 the big picture.

Numerical Instability, delta t = 0.010 the final picture.