Math 104C Homework #3 Instructor: Xu Yang General Instructions: Please write your homework papers neatly. You need to turn in both your codes and descriptions on the appropriate runs you made by following Grader’s instructions. Write your own code, individually. Do not copy codes! 1. Consider the linear multistep method xk+2 + αxk+1 (1 + α)xk = 1 2 h [ αfk+2 + (4 + 3α)fk+1] . Determine the range of α so that the method is zero-stable, consistent, convergent, A-stable, and of the second-order, respectively. 2. Consider the initial value problem{ ~x′(t) = A~x(t), t ∈ [0, 3] ~x(0) = ~x0; where A = ( 33.4 66.6 33.3 66.7 ) , ~x0 = ( 3 0 ) . The exact solution is ~x(t) = { e 100t + 2e t/10 e 100t + e t/10 (a). Graph the two components of the exact solution in the same picture. (b). Write and test a code to numerical solve the linear system using the forward Euler method with h = 110 . Graph the two component of the numerical solution in the same picture. (c). Repeat the same procedure with h = 120 . (d). Repeat the same procedure with h = 140 . (e). Repeat the same procedure with h = 180 . All course materials (class lectures and discussions, handouts, homework assignments, examinations, web ma- terials) and the intellectual content of the course itself are protected by United States Federal Copyright Law, the California Civil Code. The UC Policy 102.23 expressly prohibits students (and all other persons) from recording lectures or discussions and from distributing or selling lectures notes and all other course materials without the prior written permission of the instructor. 1 (f). Repeat the same procedure with h = 1160 . (g). Compare the graphs obtained in parts (a) – (f) and write what you observed. Explain this by computing the eigenvalues of A. 3. Consider the boundary value problem of the heat equation ut(t, x) uxx(t, x) = 0, u(0, x) = e 100×2 , u(t, 1) = u(t, 1) = 0. (a) Write and test a code to solve the boundary value problem of the above heat equa- tion using discretization of central difference in space and forward Euler/Backward Eu- ler/Trapzoidal Rule (Crank-Nicolson) in time. Take the time step k = 0.1 and mesh size h = 0.02, and plot u(1, x). (b) Repeat the same procedure with k = 0.01 and h = 0.02. (c) Repeat the same procedure with k = 0.001 and h = 0.02. (d) Repeat the same procedure with k = 0.0001 and h = 0.02. (e) Compare the graphs obtained in parts (a) – (d) and explain what you observe using the arguments of stability and local truncation error. 2