Professional Documents
Culture Documents
OPERATOR EQUATIONS
L(u) = f, (1)
L1 (L(u)) = L1 (f ) u = L1 (f ), (2)
EXAMPLE 1. Let L : Rn1 Rn1 be the operator with values L(x) = Ax,
where A Rnn . Given data f = b Rn1 , equation (1) is written
Ax = b. (3)
If the rows of A are linearly independent, we say that A has full-rank and
we write rank (A) = n. Recall that the rank of A is the dimension of the image
of L and that the determinant of a full-rank matrix is nonzero. When this is the
case, the inverse matrix A1 exists and is defined by AA1 = In , where In is the
identity matrix of size n. Hence, the solution x is uniquely determined by
x = A1 b. (4)
If rank (A) < n, A is called rank-deficient and det (A) = 0. In this case,
A is said to be singular, meaning that it is not invertible, and there are two pos-
sible scenarios; either b L(Rn1 ) and (3) has infinitely many solutions, or
b / L(Rn1 ) and (3) has no solutions.
A () = det (A In ) = 0. (6)
u = f, (9)
OPERATOR EQUATIONS 3
We prove uniqueness of the solution to the boundary value problem
u = f in ; u=g at (10)
where u/n is the normal derivative of u in the outward pointing normal di-
rection n. Let u1 = u2 , where both u1 and u2 satisfy problem (10); that is,
u1 = f in ; u1 = g at , (12)
u2 = f in ; u2 = g at . (13)
w = 0 in ; w=0 at . (14)
1 u1 + 0 u2 + + 0 un1 + 0 un = 0, (22)
0 u1 + 0 u2 + + 0 un1 + 1 un = 0. (23)
Equations (21), (22), and (23) can be written as
1 0 0 0 0 u1 f1
1 2 1 0 0 u2 f2
1 0 1 2 1 0 u3
f3
. . . . . . . = .. , (24)
h 2 . . . . . . . . .
. .
. . . .
0 0 0 1 2 1 f
un1 n1
0 0 0 0 0 1 un fn
OPERATOR EQUATIONS 5
where fi = f (xi ) = 1 when i = 2, 3, . . . , n 1 and f1 = fn = 0; the
first and last rows of the coefficient matrix ensure that the Dirichlet conditions
u(0) = u(1) = 0 are satisfied by the computed solution.
There are two ways to generate the points xi , either by choosing the number
n of these points, or by choosing the step h. Recall that
xn = x1 + (n 1)h; (25)
hence, in Matlab, we can obtain the vector x with components xi with the fol-
lowing code snippet;
h = 0.001;
n = 1/h + 1;
x = linspace(0, 1, n);
f = -ones(n, 1);
f(1) = 0; f(n) = 0;
To construct the coefficient matrix A of the linear system (24), we note that A is
a Toeplitz matrix with modified first and last rows, so that the boundary condi-
tions are satisfied, and it is dominated by zeros. Matrices dominated by zeros are
called sparse and Matlab stores them by squeezing out the zero elements, when
the sparse function is used;
0.15
Exact
Numerical
0.1
u(x)
0.05
0
0 0.2 0.4 0.6 0.8 1
x
11 22 33 44 55 66 77 88 99 110 121
1
10 21 32 43 54 65 76 87 98 109 120
9 20 31 42 53 64 75 86 97 108 119
0.8
8 19 30 41 52 63 74 85 96 107 118
7 18 29 40 51 62 73 84 95 106 117
0.6
6 17 28 39 50 61 72 83 94 105 116
y
5 16 27 38 49 60 71 82 93 104 115
0.4
4 15 26 37 48 59 70 81 92 103 114
3 14 25 36 47 58 69 80 91 102 113
0.2
2 13 24 35 46 57 68 79 90 101 112
1 12 23 34 45 56 67 78 89 100 111
0
0 0.2 0.4 0.6 0.8 1
x
OPERATOR EQUATIONS 7
and hence,
uin + ui1 4ui + ui+1 + ui+n
u . (28)
h2
To impose the boundary conditions, we first label the boundaries at x = 0, y =
1, x = 1, y = 0 as W, N, E, S, respectively, and we identify the corresponding
indices vectors
iW = 1, 2, . . . , n, (29)
iN = 2n, 3n, . . . , (n 1)n, (30)
iE = (n 1)n + 1, (n 1)n + 2, . . . , n2 , (31)
iS = n + 1, 2n + 1, . . . , (n 2)n + 1, (32)
where the corner points are included only at iW and iE . Combining iW , iN , iE , iS
in one vector iB.C. , denoted in Matlab ibc, the following code snippet constructs
the right-hand-side vector f and the coefficient matrix A.
f = -ones(n^2, 1);
f(ibc) = 0;
A = (1/h^2)*sparse(toeplitz([-4, 1, zeros(1, n-2),1,...
zeros(1, (n-1)*n-1)]));
A(ibc,:) = 0;
A(ibc,ibc) = speye(4*(n-1));
After solving the resulting system by typing u=A\f, the vector u is reshaped and
then plotted using the contour function.
0.8
0.6
y
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1
x