1. We consider the two-point boundary problem uy00(t) + vy0(t) + wy(t) = f(t), where a ≤ t ≤ b and y(a) = α, y(b) = β Here u,v,w, are constants and f(t) is a given function. We assume that u 6= 0.
(a) Using the numerical techniques discussed in the book (or class)
show how an approximation to y(t) on the interval a ≤ t ≤ b may be
generated by solving a tridiagonal system of linear equations of
the form AX = B. What is A; what is B?
(b) Write a Matlab function with prototype [t y] = tpbvp(a, b, n, alpha, beta, u, v, w, f) that implements this numerical technique, where all constants are as discussed above. More specifically, t is an array of n+1 equally spaced values between (and including) a and b; y is the array of n + 1 values to be calculated with y(1) = alpha, y(n+1) = beta.
(c) How did you test your function above for accuracy?
Solution:
Get Answers For Free
Most questions answered within 1 hours.