Question 10.4: MIXED PROBLEM Solve the mixed problem described in Figure 10...
MIXED PROBLEM
Solve the mixed problem described in Figure 10.7 using the grid with h=1.

Learn more on how we answer questions.
Because the Dirichlet boundary conditions are prescribed along the left, lower, and upper edges, no extension of region is needed there. The only extension pertains to the (3,1) mesh point, where u is unknown, resulting in the creation of u_{41}. Application of Equation 10.3
u_{i-1, j}+u_{i+1, j}+u_{i, j-1}+u_{i, j+1}-4 u_{i j}=0 (10.3)
at the two interior mesh points, as well as at (3,1), yields
\begin{array}{ll} (1,1) & u_{01}+u_{10}+u_{21}+u_{12}-4 u_{11}=0 \\ (2,1) & u_{11}+u_{20}+u_{31}+u_{22}-4 u_{21}=0 \\ (3,1) & u_{21}+u_{30}+u_{41}+u_{32}-4 u_{31}=0 \end{array} (10.15)
To eliminate u_{41}, we use the two-point central difference formula at (3,1) :
\left.\frac{\partial u}{\partial x}\right|_{(3,1)}=[2 y]_{(3,1)}=2=\frac{u_{41}-u_{21}}{2} \stackrel{\text { Solve for } u_{41}}{\Rightarrow} \quad u_{41}=u_{21}+4
Substitution of u_{41}=u_{21}+4, as well as the boundary values provided by boundary conditions, into Equation 10.15 yields
\begin{aligned} & u_{21}+2-4 u_{11}=0 \\ & u_{11}+u_{31}+8-4 u_{21}=0 \\ & u_{21}+\left(u_{21}+4\right)+18-4 u_{31}=0 \end{aligned} \stackrel{\text { Matrix form }}{\Rightarrow}\left[\begin{array}{ccc} -4 & 1 & 0 \\ 1 & -4 & 1 \\ 0 & 2 & -4 \end{array}\right]\left\{\begin{array}{l} u_{11} \\ u_{21} \\ u_{31} \end{array}\right\}=\left\{\begin{array}{c} -2 \\ -8 \\ -22 \end{array}\right\} \stackrel{\text { solve }}{\Rightarrow} \begin{aligned} & u_{11}=1.5769 \\ & u_{21}=4.3077 \\ & u_{31}=7.6538 \end{aligned}