Exercise 1.7.2. Given the differential equation
what is the finite difference matrix for (corresponding to a 3 by 3 matrix)?
Answer: We have
so that the equation above can be expressed in finite-difference terms as
replacing continuous values of by a set of discrete values , so tht is the approximation of at the point .
In this case we have and are thus considering meshpoints . The above equation can then be rewritten as
This equation can be simplified as follows:
We already know that so that we have . For the above equation becomes
For the above equation becomes
and for the above equation becomes
The corresponding 3 by 3 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.