Exercise 1.7.5. What would the difference matrix in equation (6) look like if the boundary conditions were and (instead of and )?

Answer: The finite difference equation would still be as given in equation (5):

For this equation would become

Since the corresponding 5 by 5 finite-difference matrix is then

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.