Vamos a suponer n=3 para reducir el tamaño de las matrices.

Empezamos suponiendo que conocemos:

\frac{\partial}{\partial x}|_{0,0,}u, \frac{\partial}{\partial x}|_{0,1}u, \frac{\partial}{\partial x}|_{0,2}u

\frac{\partial}{\partial y}|_{0,0}u, \frac{\partial}{\partial y}|_{1,0}u

\frac{\partial}{\partial y}|_{0,2}u, \frac{\partial}{\partial y}|_{1,2}u

u|_{2,0}, u|_{2,1}, u|_{2,2}

Discretizamos:

\frac{u_{-1,0}-2u_{0,0}+u_{1,0}}{h^2} + \frac{u_{0,-1}-2u_{0,0}+u_{0,1}}{h^2} = f_{0,0}

\frac{u_{-1,1}-2u_{0,1}+u_{1,1}}{h^2} + \frac{u_{0,0}-2u_{0,1}+u_{0,2}}{h^2} = f_{0,1}

\frac{u_{-1,2}-2u_{0,2}+u_{1,2}}{h^2} + \frac{u_{0,1}-2u_{0,2}+u_{0,3}}{h^2} = f_{0,2}

\frac{u_{0,0}-2u_{1,0}+u_{2,0}}{h^2} + \frac{u_{1,-1}-2u_{1,0}+u_{1,1}}{h^2} = f_{1,0}

\frac{u_{0,1}-2u_{1,1}+u_{2,1}}{h^2} + \frac{u_{1,0}-2u_{1,1}+u_{1,2}}{h^2} = f_{1,1}

\frac{u_{0,2}-2u_{1,2}+u_{2,2}}{h^2} + \frac{u_{1,1}-2u_{1,2}+u_{1,3}}{h^2} = f_{1,2}

En las fronteras, sabemos que:

\frac{u_{1,0}-u_{-1,0}}{2h} = \frac{\partial}{\partial x}|_{0,0}u \Leftrightarrow u_{-1,0}=u_{1,0}-2h \frac{\partial}{\partial x}|_{0,0}u

\frac{u_{1,1}-u_{-1,1}}{2h} = \frac{\partial}{\partial x}|_{0,1}u \Leftrightarrow u_{-1,1}=u_{1,1}-2h \frac{\partial}{\partial x}|_{0,1}u

\frac{u_{1,2}-u_{-1,2}}{2h} = \frac{\partial}{\partial x}|_{0,2}u \Leftrightarrow u_{-1,2}=u_{1,2}-2h \frac{\partial}{\partial x}|_{0,2}u

\frac{u_{0,1}-u_{0,-1}}{2h} = \frac{\partial}{\partial y}|_{0,0}u \Leftrightarrow u_{0,-1}=u_{0,1}-2h \frac{\partial}{\partial y}|_{0,0}u

\frac{u_{1,1}-u_{1,-1}}{2h} = \frac{\partial}{\partial y}|_{1,0}u \Leftrightarrow u_{1,-1}=u_{1,1}-2h \frac{\partial}{\partial y}|_{1,0}u

\frac{u_{0,3}-u_{0,1}}{2h} = \frac{\partial}{\partial y}|_{0,2}u \Leftrightarrow u_{0,3}=u_{0,1}+2h \frac{\partial}{\partial y}|_{0,2}u

\frac{u_{1,3}-u_{1,1}}{2h} = \frac{\partial}{\partial y}|_{1,2}u \Leftrightarrow u_{1,3}=u_{1,1}+2h \frac{\partial}{\partial y}|_{1,2}u

La matriz queda:

\left(  \begin{array}{ccc|ccc}  -4 & 2 & 0 & 2 & 0 & 0 \\  1 & -4 & 1 & 0 & 2 & 0 \\  0 & 2 & -4 & 0 & 0 & 2 \\ \hline  1 & 0 & 0 & -4 & 2 & 0 \\  0 & 1 & 0 & 1 & -4 & 1 \\  0 & 0 & 1 & 0 & 2 & -4  \end{array}  \right)

Simetrizable como:

\left(  \begin{array}{ccc|ccc}  -1 & \frac{1}{2} & 0 & \frac{1}{2} & 0 & 0 \\  \frac{1}{2} & -2 & \frac{1}{2} & 0 & 1 & 0 \\  0 & \frac{1}{2} & -1 & 0 & 0 & \frac{1}{2} \\ \hline  \frac{1}{2} & 0 & 0 & -2 & 1 & 0 \\  0 & 1 & 0 & 1 & -4 & 1 \\  0 & 0 & \frac{1}{2} & 0 & 1 & -2  \end{array}  \right)

Tenemos 6 ecuaciones con 6 incognitas y la matriz tiene rango 6, por lo que la solución es única.

En el segundo caso, suponemos que todas las fronteras son Neumann:

\frac{\partial}{\partial x}|_{0,0}u, \frac{\partial}{\partial x}|_{0,1}u, \frac{\partial}{\partial x}|_{0,2}u

\frac{\partial}{\partial y}|_{0,0}u, \frac{\partial}{\partial y}|_{1,0}u, \frac{\partial}{\partial y}|_{2,0}u

\frac{\partial}{\partial y}|_{0,2}u, \frac{\partial}{\partial y}|_{1,2}u, \frac{\partial}{\partial y}|_{2,2}u

\frac{\partial}{\partial x}|_{2,0}u, \frac{\partial}{\partial x}|_{2,1}u, \frac{\partial}{\partial x}|_{2,2}u

Si discretizamos:

\frac{u_{-1,0}-2u_{0,0}+u_{1,0}}{h^2} + \frac{u_{0,-1}-2u_{0,0}+u_{0,1}}{h^2} = f_{0,0}

\frac{u_{-1,1}-2u_{0,1}+u_{1,1}}{h^2} + \frac{u_{0,0}-2u_{0,1}+u_{0,2}}{h^2} = f_{0,1}

\frac{u_{-1,2}-2u_{0,2}+u_{1,2}}{h^2} + \frac{u_{0,1}-2u_{0,2}+u_{0,3}}{h^2} = f_{0,2}

\frac{u_{0,0}-2u_{1,0}+u_{2,0}}{h^2} + \frac{u_{1,-1}-2u_{1,0}+u_{1,1}}{h^2} = f_{1,0}

\frac{u_{0,1}-2u_{1,1}+u_{2,1}}{h^2} + \frac{u_{1,0}-2u_{1,1}+u_{1,2}}{h^2} = f_{1,1}

\frac{u_{0,2}-2u_{1,2}+u_{2,2}}{h^2} + \frac{u_{1,1}-2u_{1,2}+u_{1,3}}{h^2} = f_{1,2}

\frac{u_{1,0}-2u_{2,0}+u_{3,0}}{h^2} + \frac{u_{2,-1}-2u_{2,0}+u_{2,1}}{h^2} = f_{2,0}

\frac{u_{1,1}-2u_{2,1}+u_{3,1}}{h^2} + \frac{u_{2,0}-2u_{2,1}+u_{2,2}}{h^2} = f_{2,1}

\frac{u_{1,2}-2u_{2,2}+u_{3,2}}{h^2} + \frac{u_{2,1}-2u_{2,2}+u_{2,3}}{h^2} = f_{2,2}

En las fronteras, sabemos que:

\frac{u_{1,0}-u_{-1,0}}{2h} = \frac{\partial}{\partial x}|_{0,0}u \Leftrightarrow u_{-1,0}=u_{1,0}-2h \frac{\partial}{\partial x}|_{0,0}u

\frac{u_{1,1}-u_{-1,1}}{2h} = \frac{\partial}{\partial x}|_{0,1}u \Leftrightarrow u_{-1,1}=u_{1,1}-2h \frac{\partial}{\partial x}|_{0,1}u

\frac{u_{1,2}-u_{-1,2}}{2h} = \frac{\partial}{\partial x}|_{0,2}u \Leftrightarrow u_{-1,2}=u_{1,2}-2h \frac{\partial}{\partial x}|_{0,2}u

\frac{u_{0,1}-u_{0,-1}}{2h} = \frac{\partial}{\partial y}|_{0,0}u \Leftrightarrow u_{0,-1}=u_{0,1}-2h \frac{\partial}{\partial y}|_{0,0}u

\frac{u_{1,1}-u_{1,-1}}{2h} = \frac{\partial}{\partial y}|_{1,0}u \Leftrightarrow u_{1,-1}=u_{1,1}-2h \frac{\partial}{\partial y}|_{1,0}u

\frac{u_{2,1}-u_{2,-1}}{2h} = \frac{\partial}{\partial y}|_{2,0}u \Leftrightarrow u_{2,-1}=u_{2,1}-2h \frac{\partial}{\partial y}|_{2,0}u

\frac{u_{0,3}-u_{0,1}}{2h} = \frac{\partial}{\partial y}|_{0,2}u \Leftrightarrow u_{0,3}=u_{0,1}+2h \frac{\partial}{\partial y}|_{0,2}u

\frac{u_{1,3}-u_{1,1}}{2h} = \frac{\partial}{\partial y}|_{1,2}u \Leftrightarrow u_{1,3}=u_{1,1}+2h \frac{\partial}{\partial y}|_{1,2}u

\frac{u_{2,3}-u_{2,1}}{2h} = \frac{\partial}{\partial y}|_{2,2}u \Leftrightarrow u_{2,3}=u_{2,1}+2h \frac{\partial}{\partial y}|_{2,2}u

\frac{u_{3,0}-u_{1,0}}{2h} = \frac{\partial}{\partial x}|_{2,0}u \Leftrightarrow u_{3,0}=u_{1,0}+2h \frac{\partial}{\partial x}|_{2,0}u

\frac{u_{3,1}-u_{1,1}}{2h} = \frac{\partial}{\partial x}|_{2,1}u \Leftrightarrow u_{3,1}=u_{1,1}+2h \frac{\partial}{\partial x}|_{2,1}u

\frac{u_{3,2}-u_{1,2}}{2h} = \frac{\partial}{\partial x}|_{2,2}u \Leftrightarrow u_{3,2}=u_{1,2}+2h \frac{\partial}{\partial x}|_{2,2}u

La matriz, por tanto, queda:

\text{A6}=\left(  \begin{array}{ccc|ccc|ccc}  -4 & 2 & 0 & 2 & 0 & 0 & 0 & 0 & 0 \\  1 & -4 & 1 & 0 & 2 & 0 & 0 & 0 & 0 \\  0 & 2 & -4 & 0 & 0 & 2 & 0 & 0 & 0 \\ \hline  1 & 0 & 0 & -4 & 2 & 0 & 1 & 0 & 0 \\  0 & 1 & 0 & 1 & -4 & 1 & 0 & 1 & 0 \\  0 & 0 & 1 & 0 & 2 & -4 & 0 & 0 & 1 \\ \hline  0 & 0 & 0 & 2 & 0 & 0 & -4 & 2 & 0 \\  0 & 0 & 0 & 0 & 2 & 0 & 1 & -4 & 1 \\  0 & 0 & 0 & 0 & 0 & 2 & 0 & 2 & -4  \end{array}  \right)

Simetrizable como:

\text{A6s}=\left(  \begin{array}{ccc|ccc|ccc}  -1 & 1/2 & 0 & 1/2 & 0 & 0 & 0 & 0 & 0 \\  1/2 & -2 & 1/2 & 0 & 1 & 0 & 0 & 0 & 0 \\  0 & 1/2 & -1 & 0 & 0 & 1/2 & 0 & 0 & 0 \\ \hline  1/2 & 0 & 0 & -2 & 1 & 0 & 1/2 & 0 & 0 \\  0 & 1 & 0 & 1 & -4 & 1 & 0 & 1 & 0 \\  0 & 0 & 1/2 & 0 & 1 & -2 & 0 & 0 & 1/2 \\ \hline  0 & 0 & 0 & 1/2 & 0 & 0 & -1 & 1/2 & 0 \\  0 & 0 & 0 & 0 & 1 & 0 & 1/2 & -2 & 1/2 \\  0 & 0 & 0 & 0 & 0 & 1/2 & 0 & 1/2 & -1  \end{array}  \right)

En este caso, tenemos 9 ecuaciones con 9 incognitas pero la matriz tiene rango 8, por lo que tenemos infinitas soluciones. Hay que conservar.

Anuncios