matlab代写-128C

Math 128C: Practice Midterm
Name:
Question Points Score
1
2
3
Total
Start Time: 11:00 am
End Time: 11:50 am
Instructions: You have 50 minutes to complete this exam. No calculators or other electronic devices
1. (a) (5 points) Let u(x) be a function, and suppose h > 0. Determine the constants a, b, and c such
that the following expression is a second order approximation to u′(x):
au(x− h) + bu(x) + cu(x+ 3h)
h
Page 2
(b) (5 points) Consider the third order differential equation
y′′′ + 4y′′ + 3y′ + 6y = et
with initial conditions
y(0) = 1, y′(0) = 0, y′′(0) = 1.
Convert this equation an equivalent system of first order differential equations, and specify the
initial conditions.
Page 3
2. Consider the following multistep method for solving
dy
dt
= f(t, y):
yn+1 = −yn + 2yn−1 + h
(
5
2
f(tn, yn) +
1
2
f(tn−1, yn−1)
)
.
(a) (4 points) Is this method consistent?
(b) (4 points) Is this method zero-stable?
(c) (2 points) Is this method convergent?
Page 4
3. Consider the following three stage method for solving the initial value problem dydt = f(t, y) with
initial condition y(0) = α:
k1 = f(tn, yn)
k2 = f(tn + h, yn + hk1)
k3 = f(tn + h, yn + hk2)
yn+1 = yn +
h
4
(2k1 + k2 + k3)
(a) (5 points) If f(t, y) = λy, write down a formula for yn+1 in terms of yn, h, and λ.
Page 5
(b) (5 points) Determine the condition in terms of h and λ that define the region of absolute
stability.
Page 6 