6.5.
Finite
elements
and
Neumann
conditions
271
then
is
piecewise linear
and has
value
one at
each mesh node.
It
follows
that
(6.50)
is
the
constant
function
one,
and
hence
has
derivative zero. Therefore
(Ku
c
)j
= 0 for
each
ij
which shows
that
Ku
c
= 0 and
hence
that
K is
singular. Moreover,
it can
be
shown
that
u
c
spans
the
null space
of K;
that
is, if
Ku
= 0,
then
u
is a
multiple
of
u
c
(see Exercise
5].
The
fact
that
K is
singular means
that
we
must give special
attention
to the
process
of
solving
Ku = f. In
particular,
if we
ignore
the
singularity
of K and
solve
Kii = f
using computer software,
we
will
get
either
a
meaningless solution
or
an
error message.
To
solve this singular system correctly,
we
must
add
another
equation (one additional equation, correctly chosen,
will
be
sufficient,
because
the
null
space
of K is
one-dimensional).
A
simple choice
is the
equation
u
n
= 0;
this
is
equivalent
to
choosing,
out of the
infinitely
many solutions
to
(6.44),
the one
with
u(i]
— 0.
Moreover,
we can
impose this additional equation
by
simply removing
the
last
row and
column
from
K, and the
last
entry
from
f.
The
last
column
of K
consists
of the
coefficients
of the
terms
in the
equations involving
u
n
;
if we
insist
that
u
n
= 0,
then
we can
remove these terms
from
all n + 1
equations.
We
then
have
n
+
l
equations
in the n
unknowns
WQ,
Wi,...,
w
n
_i.
This
is one
more equation
than
we
need,
so we
remove
one
equation,
the
last,
to
obtain
a
square system.
It
can be
proved
that
the
resulting
n x n
system
is
nonsingular (see Exercise
11).
Of
course,
we
could have removed
a
different
row and
column.
If we
remove
the
iih
row and
column,
we are
selecting
the
approximate solution
v
n
satisfying
V
n
(Xi)
= 0.
Example
6.10. Consider
the
Neumann problem
It is
easy
to
show
(by
direct
integration) that
But
6.5. Finite elements
and
Neumann conditions 271
then
But
(6.50)
j=O
is piecewise linear and has value one
at
each mesh node.
It
follows
that
(6.50)
is
the
constant function one, and hence has derivative zero. Therefore
CKUe)i
= 0 for
each
i,
which shows
that
KU
e
= 0 and hence
that
K
is
singular. Moreover,
it
can
be shown
that
U
e
spans
the
null space of
K;
that
is, if
Kii
=
0,
then
ii
is
a multiple
of
U
e
(see Exercise
5}
The
fact
that
K
is
singular means
that
we
must give special attention to the
process of solving
Kii
=
f.
In particular, if
we
ignore the singularity of K and
solve
Kii
= f using computer software,
we
will get either a meaningless solution
or
an
error message. To solve this singular system correctly,
we
must add another
equation (one additional equation, correctly chosen, will be sufficient, because the
null space of
K
is
one-dimensional). A simple choice
is
the equation
Un
=
0;
this
is
equivalent
to
choosing, out of
the
infinitely many solutions
to
(6.44), the one with
u(C)
=
O.
Moreover,
we
can
i~pose
this additional equation by simply removing;
the last row and column from
K,
and the last entry from
f.
The last column of K
consists of
the
coefficients of the terms in
the
equations involving
un;
if
we
insist
that
Un
= 0,
then
we
can remove these terms from all n + 1 equations.
We
then
have
n + 1 equations in the n unknowns
uo,
ut,
... ,
Un-l.
This
is
one more equation
than
we
need,
so
we
remove one equation, the last,
to
obtain a square system.
It
can be proved
that
the resulting n x n system
is
nonsingular (see Exercise 11).
Of course,
we
could have removed a different row and column.
If
we
remove
the
ith
row and column,
we
are selecting the approximate solution
Vn
satisfying
Vn(Xi)
=
O.
Example
6.10.
Consider the Neumann problem
d
2
u 1
--
= x - - 0 < x < 1
dX2
2'
,
~:
(0)
=
0,
(6.51 )
~:
(1) = 0.
It
is
easy
to
show (by direct integration) that
X3 X2
u(x) =
-"6
+
4"
+ C