EM3 Cex 5
EM3 Cex 5
The BVP associated with Laplace’s equation in a square domain with given
boundary data gL , gR , gB , gT is
To compute a 5–point finite difference solution for a problem with the potential
at the top edge set to unity and the three edges set to zero, simply type
You should generate the solution plot shown below and a sparsity plot of the
225 × 225 coefficient matrix. You might also like to try to compute a solution
to a different problem; for example with boundary data gL = y, gR = 1 + 2y,
gB = x, and gT = 1 + 2x.
0.4 0.5
0.4
0.2
0.3
0
1 0.2
1 0.1
0.5
0.5 0
0 0.2 0.4 0.6 0.8 1
0 0