0% found this document useful (0 votes)
39 views

APFE Notes April6

This document discusses obtaining a finite element solution to a clamped rod under axial load problem with three linear elements. 1) The weak form of the governing differential equation is obtained. 2) A trial solution is assumed using three linear basis functions over three elements of uniform length. 3) The weak form is used to develop four equations in matrix form relating the stiffness matrix, load vector, and unknown coefficients of the trial solution. Solving this system provides the finite element solution.

Uploaded by

Triet Truong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

APFE Notes April6

This document discusses obtaining a finite element solution to a clamped rod under axial load problem with three linear elements. 1) The weak form of the governing differential equation is obtained. 2) A trial solution is assumed using three linear basis functions over three elements of uniform length. 3) The weak form is used to develop four equations in matrix form relating the stiffness matrix, load vector, and unknown coefficients of the trial solution. Solving this system provides the finite element solution.

Uploaded by

Triet Truong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Recall clamped rod under an axial load:

q( X ) = q0 = const .

X
L

𝑑𝑑 2 𝑈𝑈
𝐴𝐴𝐴𝐴 𝑑𝑑𝑋𝑋 2 + 𝑞𝑞 𝑋𝑋 = 0 ; U = axial deflection

𝑑𝑑𝑈𝑈
𝑈𝑈 0 = 0 (essential BC) 𝐴𝐴𝐴𝐴 𝑑𝑑𝑋𝑋 |𝑋𝑋=𝐿𝐿 = 0 (natural BC)

Want: Obtain a finite element solution with three linear elements by minimizing
the domain residual 𝑅𝑅𝑑𝑑 𝑋𝑋 using the weak form of the Galerkin
weighted residual statement. Develop the solution in matrix form.
GWR = Galerkin weighted residual

Step 0: Obtain weak form

trial solution
𝐿𝐿

𝑑𝑑 2 𝑈𝑈
GWR statement: � 𝑤𝑤(𝑋𝑋) 𝐴𝐴𝐴𝐴 + 𝑞𝑞𝑜𝑜 𝑑𝑑𝑑𝑑 = 0
𝑑𝑑𝑋𝑋 2
0
domain residual, 𝑅𝑅𝑑𝑑 𝑋𝑋
weighting
function

𝐿𝐿 𝐿𝐿 𝑋𝑋=𝐿𝐿

𝑑𝑑𝑑𝑑 𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈
Weak form of GWR: 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 + 𝑤𝑤 𝑋𝑋 𝐴𝐴𝐴𝐴
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0

0 (natural BC)

𝐿𝐿 𝐿𝐿

𝑑𝑑𝑑𝑑 𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈
𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 + 𝑤𝑤 𝑋𝑋 = 𝐿𝐿 𝐴𝐴𝐴𝐴 − 𝑤𝑤 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=𝐿𝐿
𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0
Step 1: Assume a trial solution (three linear pieces in this case)

trial soln. with three


linear pieces
�4
𝑈𝑈
�3
𝑈𝑈
�2
𝑈𝑈 assume finite elements are
of uniform length for simplicity

�1 element 1 element 2 element 3


𝑈𝑈 𝑋𝑋
node 1 node 2 node 3 node 4
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿

𝑈𝑈 �1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
� 𝑋𝑋 = 𝑈𝑈 �2 𝑁𝑁𝑏𝑏2 𝑋𝑋 + 𝑈𝑈
�3 𝑁𝑁𝑏𝑏3 𝑋𝑋 +𝑈𝑈
�4 𝑁𝑁𝑏𝑏4 𝑋𝑋

where the trial functions 𝑁𝑁𝑏𝑏𝑏 , 𝑁𝑁𝑏𝑏2 , 𝑁𝑁𝑏𝑏3 and 𝑁𝑁𝑏𝑏4 are the linear basis functions

𝑈𝑈 �2 , 𝑈𝑈
�1 , 𝑈𝑈 �3 and 𝑈𝑈
�4 are the constant coefficients to be determined.
In this case, the linear basis functions are defined as

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿

Normally, at this point we would enforce the essential boundary condition leading to
1 0 0

𝑈𝑈 �1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 = 0 + 𝑈𝑈
� 𝑋𝑋 = 0 = 𝑈𝑈 �2 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 = 0 +𝑈𝑈
�3 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 = 0 + 𝑈𝑈
�4 𝑁𝑁𝑏𝑏4 𝑋𝑋 = 0 = 0

�1 = 0. However we will wait to enforce this BC at the end of the problem


and thus 𝑈𝑈
Step 2: Minimize domain residual via weak form to get trial solution coefficients
𝑈𝑈 �3 and 𝑈𝑈
�2 , 𝑈𝑈 �4

𝐿𝐿 𝐿𝐿

𝑑𝑑𝑑𝑑 𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈
Recall weak form: 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0

We may get three equations from this weak form by first setting 𝑤𝑤 = 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋),
re-setting 𝑤𝑤 = 𝑁𝑁𝑏𝑏2 𝑋𝑋 , re-setting 𝑤𝑤 = 𝑁𝑁𝑏𝑏3 𝑋𝑋 and then re-setting 𝑤𝑤 = 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋):

𝐿𝐿 𝐿𝐿

𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈
(1) 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0

𝐿𝐿 𝐿𝐿

𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈
(2) 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0

𝐿𝐿 𝐿𝐿

𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈
(3) 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0

𝐿𝐿 𝐿𝐿

𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈
(4) 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0
The previous four eqns. may be re-written in column vector form as follows:

𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏1 (𝑋𝑋 = 0)
𝑑𝑑𝑑𝑑 �
𝑑𝑑𝑈𝑈 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏2 (𝑋𝑋 = 0) �
𝑑𝑑𝑈𝑈
(*) 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑑𝑑𝑑𝑑 − 𝐴𝐴𝐴𝐴
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋 = 0) 𝑑𝑑𝑑𝑑
0 0 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏4 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋 = 0)
𝑑𝑑𝑁𝑁𝑏𝑏4
𝑑𝑑𝑑𝑑
The previous four eqns. may be re-written in column vector form as follows:

𝑑𝑑𝑁𝑁𝑏𝑏𝑏 1
𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏1 (𝑋𝑋 = 0)
𝑑𝑑𝑑𝑑 �
𝑑𝑑𝑈𝑈 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏2 (𝑋𝑋 = 0) �
𝑑𝑑𝑈𝑈
(*) 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑑𝑑𝑑𝑑 − 𝐴𝐴𝐴𝐴
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋 = 0) 𝑑𝑑𝑑𝑑
0 0 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏4 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋 = 0)
𝑑𝑑𝑁𝑁𝑏𝑏4
0
𝑑𝑑𝑑𝑑
The previous four eqns. may be re-written in column vector form as follows:

𝑑𝑑𝑁𝑁𝑏𝑏𝑏 1
𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏1 (𝑋𝑋 = 0)
𝑑𝑑𝑑𝑑 �
𝑑𝑑𝑈𝑈 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏2 (𝑋𝑋 = 0) �
𝑑𝑑𝑈𝑈
(*) 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑑𝑑𝑑𝑑 − 𝐴𝐴𝐴𝐴
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋 = 0) 𝑑𝑑𝑑𝑑
0 0 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏4 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋 = 0)
𝑑𝑑𝑁𝑁𝑏𝑏4
0
𝑑𝑑𝑑𝑑

𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑁𝑁𝑏𝑏𝑏 1

𝑑𝑑𝑈𝑈 𝑁𝑁𝑏𝑏𝑏 0 �
𝑑𝑑 𝑈𝑈
𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑑𝑑𝑑𝑑 − 𝐴𝐴𝐴𝐴
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏𝑏 0 𝑑𝑑𝑑𝑑
0 0 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏4 0
𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑
(4𝑥𝑥𝑥) (4𝑥𝑥𝑥) (4𝑥𝑥𝑥)

First row of vector eqn. (*) gives eqn. (1) on previous slide and so on.
Recall trial solution without enforcing essential BC:

𝑈𝑈 �1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
� 𝑋𝑋 = 𝑈𝑈 �2 𝑁𝑁𝑏𝑏2 𝑋𝑋 + 𝑈𝑈
�3 𝑁𝑁𝑏𝑏3 𝑋𝑋 +𝑈𝑈
�4 𝑁𝑁𝑏𝑏4 𝑋𝑋

This may be re-expressed in vector form as:

�1
𝑈𝑈
�2
𝑈𝑈
� 𝑋𝑋 = 𝑁𝑁𝑏𝑏1
𝑈𝑈 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏4 �1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
= 𝑈𝑈 �2 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
�3 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
�4 𝑁𝑁𝑏𝑏4 𝑋𝑋

𝑈𝑈3
(1𝑥𝑥𝑥)
�4
𝑈𝑈 (1𝑥𝑥𝑥)

(4𝑥𝑥𝑥)
Recall trial solution without enforcing essential BC:

𝑈𝑈 �1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
� 𝑋𝑋 = 𝑈𝑈 �2 𝑁𝑁𝑏𝑏2 𝑋𝑋 + 𝑈𝑈
�3 𝑁𝑁𝑏𝑏3 𝑋𝑋 +𝑈𝑈
�4 𝑁𝑁𝑏𝑏4 𝑋𝑋

This may be re-expressed in vector form as:

�1
𝑈𝑈
�2
𝑈𝑈
� 𝑋𝑋 = 𝑁𝑁𝑏𝑏1
𝑈𝑈 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏4 �1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
= 𝑈𝑈 �2 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
�3 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
�4 𝑁𝑁𝑏𝑏4 𝑋𝑋

𝑈𝑈3
(1𝑥𝑥𝑥)
�4
𝑈𝑈 (1𝑥𝑥𝑥)

(4𝑥𝑥𝑥)

Similarly

�1
𝑈𝑈

𝑑𝑑 𝑈𝑈 𝑑𝑑𝑁𝑁𝑏𝑏1 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏3 𝑑𝑑𝑁𝑁𝑏𝑏4 �2
𝑈𝑈
= �1 𝑑𝑑𝑁𝑁𝑏𝑏1 + 𝑈𝑈
= 𝑈𝑈 �2 𝑑𝑑𝑁𝑁𝑏𝑏2
�3
+ 𝑈𝑈
𝑑𝑑𝑁𝑁𝑏𝑏3
�4
+𝑈𝑈
𝑑𝑑𝑁𝑁𝑏𝑏4
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 �
𝑈𝑈3 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
�4
𝑈𝑈
Recall equation (*):
𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑁𝑁𝑏𝑏𝑏 1
𝑑𝑑 �
𝑈𝑈 𝑁𝑁𝑏𝑏𝑏 0 �
𝑑𝑑 𝑈𝑈
(*) 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑑𝑑𝑑𝑑 − 𝐴𝐴𝐴𝐴
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏𝑏 0 𝑑𝑑𝑑𝑑
0 0 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏4 0
𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑
Recall equation (*):
𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑁𝑁𝑏𝑏𝑏 1
𝑑𝑑 �
𝑈𝑈 𝑁𝑁𝑏𝑏𝑏 0 �
𝑑𝑑 𝑈𝑈
(*) 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑑𝑑𝑑𝑑 − 𝐴𝐴𝐴𝐴
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏𝑏 0 𝑑𝑑𝑑𝑑
0 0 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏4 0
𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑

�1
𝑈𝑈

𝑑𝑑 𝑈𝑈 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 �2
𝑈𝑈
Inserting = we get
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 �3
𝑈𝑈
�4
𝑈𝑈
Recall equation (*):
𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑁𝑁𝑏𝑏𝑏 1
𝑑𝑑 �
𝑈𝑈 𝑁𝑁𝑏𝑏𝑏 0 �
𝑑𝑑 𝑈𝑈
(*) 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑑𝑑𝑑𝑑 − 𝐴𝐴𝐴𝐴
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏𝑏 0 𝑑𝑑𝑑𝑑
0 0 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑁𝑁𝑏𝑏4 0
𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑

�1
𝑈𝑈

𝑑𝑑 𝑈𝑈 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 �2
𝑈𝑈
Inserting = we get
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 �3
𝑈𝑈
�4
𝑈𝑈

𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑
�1
𝑈𝑈
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑁𝑁𝑏𝑏𝑏 1
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 �
𝑈𝑈2 𝑁𝑁𝑏𝑏𝑏 0 �
𝑑𝑑 𝑈𝑈
𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑑𝑑𝑑𝑑 − 𝐴𝐴𝐴𝐴
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 �3
𝑈𝑈 𝑁𝑁𝑏𝑏𝑏 0 𝑑𝑑𝑑𝑑
0 0 𝑋𝑋=0
𝑑𝑑𝑑𝑑 �4
𝑈𝑈 𝑁𝑁𝑏𝑏4 0
𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑑𝑑𝑑𝑑
(4𝑥𝑥𝑥) (1𝑥𝑥𝑥)
Multiplying the (4x1) and (1x4) vectors containing the derivatives of the basis functions
and moving the integrals inside of the matrices we get:

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏4 𝐿𝐿


∫0 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 ∫0 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 �1
𝑈𝑈
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏3 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏4 𝐿𝐿 1
∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 �
𝑈𝑈2 ∫ 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 0 �
𝑑𝑑𝑈𝑈
𝐴𝐴𝐴𝐴 = 𝑞𝑞𝑜𝑜 0𝐿𝐿 − 𝐴𝐴𝐴𝐴
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁
∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁
∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏2 𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁
∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁
∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑 �3
𝑈𝑈 ∫0 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑋𝑋=0
�4
𝑈𝑈 𝐿𝐿
0
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁
∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏2 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑 𝑁𝑁
∫0 𝑏𝑏4 𝑑𝑑𝑑𝑑

(4𝑥𝑥𝑥) (4𝑥𝑥𝑥) (4𝑥𝑥𝑥)


(4𝑥𝑥𝑥)
Integrals may be evaluated as follows

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 2𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏
∫0 𝑑𝑑𝑑𝑑 = ∫0 𝑑𝑑𝑑𝑑 + ∫𝐿𝐿/3 𝑑𝑑𝑑𝑑 + ∫2𝐿𝐿/3 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

ℎ 1 1 2ℎ 3ℎ
= ∫0 − − 𝑑𝑑𝑑𝑑 + ∫ℎ (0)(0) 𝑑𝑑𝑑𝑑 + ∫2ℎ (0)(0) 𝑑𝑑𝑑𝑑
ℎ ℎ

1
=

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋 element length = ℎ = 𝐿𝐿/3


node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿
0 ℎ 2ℎ 3ℎ
Integrals may be evaluated as follows

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏2 2𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏2
∫0 𝑑𝑑𝑑𝑑 = ∫0 𝑑𝑑𝑑𝑑 + ∫𝐿𝐿/3 𝑑𝑑𝑑𝑑 + ∫2𝐿𝐿/3 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

ℎ 1 1 2ℎ 1 3ℎ
= ∫0 − 𝑑𝑑𝑑𝑑 + ∫ℎ (0) − 𝑑𝑑𝑑𝑑 + ∫2ℎ (0)(0) 𝑑𝑑𝑑𝑑
ℎ ℎ ℎ

1
=−

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋 element length = ℎ = 𝐿𝐿/3


node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿
0 ℎ 2ℎ 3ℎ
Integrals may be evaluated as follows

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏3 𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏3 2𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏3 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏3
∫0 𝑑𝑑𝑑𝑑 = ∫0 𝑑𝑑𝑑𝑑 + ∫𝐿𝐿/3 𝑑𝑑𝑑𝑑 + ∫2𝐿𝐿/3 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

ℎ 1 2ℎ 1 3ℎ 1
= ∫0 − 0 𝑑𝑑𝑑𝑑 + ∫ℎ (0) 𝑑𝑑𝑑𝑑 + ∫2ℎ (0) − 𝑑𝑑𝑑𝑑
ℎ ℎ ℎ

=0

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋 element length = ℎ = 𝐿𝐿/3


node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿
0 ℎ 2ℎ 3ℎ
Integrals may be evaluated as follows

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏4 𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏4 2𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏4 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏4
∫0 𝑑𝑑𝑑𝑑 = ∫0 𝑑𝑑𝑑𝑑 + ∫𝐿𝐿/3 𝑑𝑑𝑑𝑑 + ∫2𝐿𝐿/3 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

ℎ 1 2ℎ 3ℎ 1
= ∫0 − 0 𝑑𝑑𝑑𝑑 + ∫ℎ (0) 0 𝑑𝑑𝑑𝑑 + ∫2ℎ (0) 𝑑𝑑𝑑𝑑
ℎ ℎ

=0

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋 element length = ℎ = 𝐿𝐿/3


node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿
0 ℎ 2ℎ 3ℎ
Integrals may be evaluated as follows

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏1 𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏1 2𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏1 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏1
∫0 𝑑𝑑𝑑𝑑 = ∫0 𝑑𝑑𝑑𝑑 + ∫𝐿𝐿/3 𝑑𝑑𝑑𝑑 + ∫2𝐿𝐿/3 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

ℎ 1 1 2ℎ 1 3ℎ
= ∫0 − 𝑑𝑑𝑑𝑑 + ∫ℎ − 0 𝑑𝑑𝑑𝑑 + ∫2ℎ (0) 0 𝑑𝑑𝑑𝑑
ℎ ℎ ℎ

1
=−

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋 element length = ℎ = 𝐿𝐿/3


node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿
0 ℎ 2ℎ 3ℎ
Integrals may be evaluated as follows

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏2 2𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏2
∫0 𝑑𝑑𝑑𝑑 = ∫0 𝑑𝑑𝑑𝑑 + ∫𝐿𝐿/3 𝑑𝑑𝑑𝑑 + ∫2𝐿𝐿/3 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

ℎ 1 1 2ℎ 1 1 3ℎ
= ∫0 𝑑𝑑𝑑𝑑 + ∫ℎ − − 𝑑𝑑𝑑𝑑 + ∫2ℎ (0) 0 𝑑𝑑𝑑𝑑
ℎ ℎ ℎ ℎ

2
=

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋 element length = ℎ = 𝐿𝐿/3


node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿
0 ℎ 2ℎ 3ℎ
Integrals may be evaluated as follows

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏3 𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏3 2𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏3 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏3
∫0 𝑑𝑑𝑑𝑑 = ∫0 𝑑𝑑𝑑𝑑 + ∫𝐿𝐿/3 𝑑𝑑𝑑𝑑 + ∫2𝐿𝐿/3 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

ℎ 1 2ℎ 1 1 3ℎ 1
= ∫0 0 𝑑𝑑𝑑𝑑 + ∫ℎ − 𝑑𝑑𝑑𝑑 + ∫2ℎ (0) − 𝑑𝑑𝑑𝑑
ℎ ℎ ℎ ℎ

1
=−

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋 element length = ℎ = 𝐿𝐿/3


node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿
0 ℎ 2ℎ 3ℎ
Integrals may be evaluated as follows

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏4 𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏4 2𝐿𝐿/3 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏4 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏4
∫0 𝑑𝑑𝑑𝑑 = ∫0 𝑑𝑑𝑑𝑑 + ∫𝐿𝐿/3 𝑑𝑑𝑑𝑑 + ∫2𝐿𝐿/3 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

ℎ 1 2ℎ 1 3ℎ 1
= ∫0 0 𝑑𝑑𝑑𝑑 + ∫ℎ − 0 𝑑𝑑𝑑𝑑 + ∫2ℎ (0) 𝑑𝑑𝑑𝑑
ℎ ℎ ℎ

=0

and so on

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋 element length = ℎ = 𝐿𝐿/3


node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿
0 ℎ 2ℎ 3ℎ
𝐿𝐿

Integrals may be evaluated as follows � 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑋𝑋 = (area under 𝑁𝑁𝑏𝑏𝑏)
0 2

𝐿𝐿
� 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑋𝑋 = ℎ (area under 𝑁𝑁𝑏𝑏2)
0

𝐿𝐿
� 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑋𝑋 = ℎ (area under 𝑁𝑁𝑏𝑏3)
0

𝐿𝐿

� 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑋𝑋 = (area under 𝑁𝑁𝑏𝑏4)
0 2

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋 element length = ℎ = 𝐿𝐿/3


node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿
0 ℎ 2ℎ 3ℎ
So our matrix system

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏4 𝐿𝐿


∫0 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 ∫0 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 �1
𝑈𝑈
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏3 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏4 𝐿𝐿 1
∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 �
𝑈𝑈2 ∫ 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 0 �
𝑑𝑑𝑈𝑈
𝐴𝐴𝐴𝐴 = 𝑞𝑞𝑜𝑜 0𝐿𝐿 − 𝐴𝐴𝐴𝐴
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁
∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁
∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏2 𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁
∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁
∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑 �3
𝑈𝑈 ∫0 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑋𝑋=0

�4
𝑈𝑈 𝐿𝐿
0
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁
∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏2 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑 𝑁𝑁
∫0 𝑏𝑏4 𝑑𝑑𝑑𝑑

(4𝑥𝑥𝑥) (4𝑥𝑥𝑥) (4𝑥𝑥𝑥)


(4𝑥𝑥𝑥)


becomes 1 −1 0 0 𝑈𝑈1 1/2 1
𝐴𝐴𝐴𝐴 −1 2 1 �2
0 𝑈𝑈 1 0 �
𝑑𝑑 𝑈𝑈
= 𝑞𝑞𝑜𝑜 ℎ 1 − 𝐴𝐴𝐴𝐴
ℎ 0 −1 2 −1 𝑈𝑈
�3 0 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 −1 1 𝑈𝑈
�4 1/2 0
�1 = 0:
From the essential BC, 𝑈𝑈


1 −1 0 0 𝑈𝑈1 1/2 1
𝐴𝐴𝐴𝐴 −1 �
2 −1 0 𝑈𝑈2 1 0 �
𝑑𝑑 𝑈𝑈
= 𝑞𝑞𝑜𝑜 ℎ 1 − 𝐴𝐴𝐴𝐴
ℎ 0 −1 2 −1 𝑈𝑈
�3 0 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 −1 1 𝑈𝑈
�4 1/2 0
�1 = 0:
From the essential BC, 𝑈𝑈
0

1 −1 0 0 𝑈𝑈1 1/2 1
𝐴𝐴𝐴𝐴 −1 �
2 −1 0 𝑈𝑈2 1 0 �
𝑑𝑑 𝑈𝑈
= 𝑞𝑞𝑜𝑜 ℎ 1 − 𝐴𝐴𝐴𝐴
ℎ 0 −1 2 −1 𝑈𝑈
�3 0 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 −1 1 𝑈𝑈
�4 1/2 0
�1 = 0:
From the essential BC, 𝑈𝑈
0

1 −1 0 0 𝑈𝑈1 1/2 1
𝐴𝐴𝐴𝐴 −1 �
2 −1 0 𝑈𝑈2 1 0 �
𝑑𝑑 𝑈𝑈
= 𝑞𝑞𝑜𝑜 ℎ 1 − 𝐴𝐴𝐴𝐴
ℎ 0 −1 2 −1 𝑈𝑈
�3 0 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 −1 1 𝑈𝑈
�4 1/2 0

So 2nd, 3rd, and 4th row of system above yields �2


𝑈𝑈 1
𝐴𝐴𝐴𝐴 2 −1 0
�3 = 𝑞𝑞𝑜𝑜 ℎ 1
−1 2 −1 𝑈𝑈
ℎ 1/2
0 −1 1 𝑈𝑈
�4
�1 = 0:
From the essential BC, 𝑈𝑈
0

1 −1 0 0 𝑈𝑈1 1/2 1
𝐴𝐴𝐴𝐴 −1 �
2 −1 0 𝑈𝑈2 1 0 �
𝑑𝑑 𝑈𝑈
= 𝑞𝑞𝑜𝑜 ℎ 1 − 𝐴𝐴𝐴𝐴
ℎ 0 −1 2 −1 𝑈𝑈
�3 0 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 −1 1 𝑈𝑈
�4 1/2 0

So 2nd, 3rd, and 4th row of system above yields �2


𝑈𝑈 1
𝐴𝐴𝐴𝐴 2 −1 0
�3 = 𝑞𝑞𝑜𝑜 ℎ 1
−1 2 −1 𝑈𝑈
ℎ 1/2
0 −1 1 𝑈𝑈
�4

5 𝑞𝑞𝑜𝑜 ℎ2 5 𝑞𝑞𝑜𝑜 𝐿𝐿2


Solving and recalling h = L/3, we get �2 =
𝑈𝑈 =
2 𝐴𝐴𝐴𝐴 18 𝐴𝐴𝐴𝐴

𝑞𝑞𝑜𝑜 ℎ2 4 𝑞𝑞𝑜𝑜 𝐿𝐿2


�3 = 4
𝑈𝑈 =
𝐴𝐴𝐴𝐴 9 𝐴𝐴𝐴𝐴

9 𝑞𝑞𝑜𝑜 ℎ2 1 𝑞𝑞𝑜𝑜 𝐿𝐿2


�4 =
𝑈𝑈 =
2 𝐴𝐴𝐴𝐴 2 𝐴𝐴𝐴𝐴
�1 = 0:
From the essential BC, 𝑈𝑈
0

1 −1 0 0 𝑈𝑈1 1/2 1
𝐴𝐴𝐴𝐴 −1 �
2 −1 0 𝑈𝑈2 1 0 �
𝑑𝑑 𝑈𝑈
= 𝑞𝑞𝑜𝑜 ℎ 1 − 𝐴𝐴𝐴𝐴
ℎ 0 −1 2 −1 𝑈𝑈
�3 0 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 −1 1 𝑈𝑈
�4 1/2 0

So 2nd, 3rd, and 4th row of system above yields �2


𝑈𝑈 1
𝐴𝐴𝐴𝐴 2 −1 0
�3 = 𝑞𝑞𝑜𝑜 ℎ 1
−1 2 −1 𝑈𝑈
ℎ 1/2
0 −1 1 𝑈𝑈
�4

5 𝑞𝑞𝑜𝑜 ℎ2 5 𝑞𝑞𝑜𝑜 𝐿𝐿2


Solving and recalling h = L/3, we get �2 =
𝑈𝑈 =
2 𝐴𝐴𝐴𝐴 18 𝐴𝐴𝐴𝐴

𝑞𝑞𝑜𝑜 ℎ2 4 𝑞𝑞𝑜𝑜 𝐿𝐿2


�3 = 4
𝑈𝑈 =
𝐴𝐴𝐴𝐴 9 𝐴𝐴𝐴𝐴

9 𝑞𝑞𝑜𝑜 ℎ2 1 𝑞𝑞𝑜𝑜 𝐿𝐿2


�4 =
𝑈𝑈 =
2 𝐴𝐴𝐴𝐴 2 𝐴𝐴𝐴𝐴

Finally, from the 1st row of system



𝑑𝑑 𝑈𝑈 𝑞𝑞𝑜𝑜 ℎ 𝐴𝐴𝐴𝐴 𝑞𝑞𝑜𝑜 ℎ 𝐴𝐴𝐴𝐴 5 𝑞𝑞𝑜𝑜 ℎ2
at the top of the slide we get the 𝐴𝐴𝐴𝐴 = + �
𝑈𝑈 = + = 3𝑞𝑞𝑜𝑜 ℎ = 𝑞𝑞𝑜𝑜 𝐿𝐿
𝑑𝑑𝑑𝑑 2 ℎ 2 2 ℎ 2 𝐴𝐴𝐴𝐴
reaction at the clamped end of rod: 𝑋𝑋=0
Comment (Hint): May quickly obtain the matrix system Ax = b by
inspecting the weak form
Comment (Hint): May quickly obtain the matrix system Ax = b by
inspecting the weak form

𝑑𝑑2 𝑈𝑈
ODE: 𝐴𝐴𝐴𝐴 + 𝑞𝑞𝑜𝑜 = 0
𝑑𝑑𝑋𝑋 2
𝐿𝐿

𝑑𝑑 2 𝑈𝑈
GWR statement: � 𝑤𝑤(𝑋𝑋) 𝐴𝐴𝐴𝐴 + 𝑞𝑞𝑜𝑜 𝑑𝑑𝑑𝑑 = 0
𝑑𝑑𝑋𝑋 2
0
Comment (Hint): May quickly obtain the matrix system Ax = b by
inspecting the weak form

𝑑𝑑2 𝑈𝑈
ODE: 𝐴𝐴𝐴𝐴 + 𝑞𝑞𝑜𝑜 = 0
𝑑𝑑𝑋𝑋 2
𝐿𝐿

𝑑𝑑 2 𝑈𝑈
GWR statement: � 𝑤𝑤(𝑋𝑋) 𝐴𝐴𝐴𝐴 + 𝑞𝑞𝑜𝑜 𝑑𝑑𝑑𝑑 = 0
𝑑𝑑𝑋𝑋 2
0

Weak form of GWR statement:

𝐿𝐿 𝐿𝐿

𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈 �
𝑑𝑑𝑑𝑑 𝑑𝑑𝑈𝑈
𝑤𝑤 𝑋𝑋 = 𝐿𝐿 𝐴𝐴𝐴𝐴 − 𝑤𝑤 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴 − 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 + 𝑞𝑞𝑜𝑜 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 = 0
𝑑𝑑𝑑𝑑 𝑋𝑋=𝐿𝐿
𝑑𝑑𝑑𝑑 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
0 0
Comment (Hint): May quickly obtain the matrix system Ax = b by
inspecting the weak form

𝑑𝑑2 𝑈𝑈
ODE: 𝐴𝐴𝐴𝐴 + 𝑞𝑞𝑜𝑜 = 0
𝑑𝑑𝑋𝑋 2
𝐿𝐿

𝑑𝑑 2 𝑈𝑈
GWR statement: � 𝑤𝑤(𝑋𝑋) 𝐴𝐴𝐴𝐴 + 𝑞𝑞𝑜𝑜 𝑑𝑑𝑑𝑑 = 0
𝑑𝑑𝑋𝑋 2
0

Weak form of GWR statement:

0 (natural BC)
𝐿𝐿 𝐿𝐿

𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈 �
𝑑𝑑𝑑𝑑 𝑑𝑑𝑈𝑈
𝑤𝑤 𝑋𝑋 = 𝐿𝐿 𝐴𝐴𝐴𝐴 − 𝑤𝑤 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴 − 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 + 𝑞𝑞𝑜𝑜 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 = 0
𝑑𝑑𝑑𝑑 𝑋𝑋=𝐿𝐿
𝑑𝑑𝑑𝑑 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
0 0
Comment (Hint): May quickly obtain the matrix system Ax = b by
inspecting the weak form

𝑑𝑑2 𝑈𝑈
ODE: 𝐴𝐴𝐴𝐴 + 𝑞𝑞𝑜𝑜 = 0
𝑑𝑑𝑋𝑋 2
𝐿𝐿

𝑑𝑑 2 𝑈𝑈
GWR statement: � 𝑤𝑤(𝑋𝑋) 𝐴𝐴𝐴𝐴 + 𝑞𝑞𝑜𝑜 𝑑𝑑𝑑𝑑 = 0
𝑑𝑑𝑋𝑋 2
0

Weak form of GWR statement:

0 (natural BC)
𝐿𝐿 𝐿𝐿

𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈 �
𝑑𝑑𝑑𝑑 𝑑𝑑𝑈𝑈
𝑤𝑤 𝑋𝑋 = 𝐿𝐿 𝐴𝐴𝐴𝐴 − 𝑤𝑤 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴 − 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 + 𝑞𝑞𝑜𝑜 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 = 0
𝑑𝑑𝑑𝑑 𝑋𝑋=𝐿𝐿
𝑑𝑑𝑑𝑑 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
0 0

𝐿𝐿 𝐿𝐿
Inspect weak form to �
𝑑𝑑𝑑𝑑 𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈
𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴
re-arrange as: 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
0 0 𝑋𝑋=0
𝐿𝐿 𝐿𝐿

𝑑𝑑𝑑𝑑 𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈
Weak form: 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0

For two linear finite elements, trial solution is

𝑈𝑈 �1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
� 𝑋𝑋 = 𝑈𝑈 �2 𝑁𝑁𝑏𝑏2 𝑋𝑋 + 𝑈𝑈
�3 𝑁𝑁𝑏𝑏3 𝑋𝑋

For two linear finite elements, weak form and trial solution above lead to

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏3 𝐿𝐿


∫0 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 ∫0 �1𝑑𝑑𝑑𝑑 ∫0 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑈𝑈 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋 = 0)
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏3 𝐿𝐿 �
𝑑𝑑𝑈𝑈
𝐴𝐴𝐴𝐴 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑈𝑈�2 = 𝑞𝑞𝑜𝑜 ∫ 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 − 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋 = 0) 𝐴𝐴𝐴𝐴
0 𝑑𝑑𝑑𝑑 𝑋𝑋=0
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏3 𝑑𝑑𝑁𝑁𝑏𝑏3 �
𝑈𝑈3 𝐿𝐿 𝑁𝑁𝑏𝑏𝑏 (𝑋𝑋 = 0)
∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏2 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑁𝑁𝑏𝑏3 𝑑𝑑𝑑𝑑
𝐿𝐿 𝐿𝐿

𝑑𝑑𝑑𝑑 𝑑𝑑 𝑈𝑈 �
𝑑𝑑 𝑈𝑈
Weak form: 𝐴𝐴𝐴𝐴 � 𝑑𝑑𝑑𝑑 = 𝑞𝑞𝑜𝑜 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝐴𝐴𝐴𝐴
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0

For three linear finite elements, trial solution is

𝑈𝑈 �1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑈𝑈
� 𝑋𝑋 = 𝑈𝑈 �2 𝑁𝑁𝑏𝑏2 𝑋𝑋 + 𝑈𝑈
�3 𝑁𝑁𝑏𝑏3 𝑋𝑋 +𝑈𝑈
�4 𝑁𝑁𝑏𝑏4 𝑋𝑋

For three linear finite elements, weak form and trial solution above lead to

𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏4


∫0 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝐿𝐿
∫0 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 �1
𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏2 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏3 𝐿𝐿 𝑑𝑑𝑁𝑁𝑏𝑏2 𝑑𝑑𝑁𝑁𝑏𝑏4 𝑈𝑈 𝑁𝑁𝑏𝑏1 (𝑋𝑋 = 0)
𝐿𝐿
∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 �
𝑈𝑈2 ∫ 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 𝑁𝑁 (𝑋𝑋 = 0) �
𝑑𝑑 𝑈𝑈
𝐴𝐴𝐴𝐴 = 𝑞𝑞𝑜𝑜 0𝐿𝐿 − 𝑏𝑏2 𝐴𝐴𝐴𝐴
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 �3
𝑈𝑈 𝑁𝑁𝑏𝑏3 (𝑋𝑋 = 0) 𝑑𝑑𝑑𝑑 𝑋𝑋=0
∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏2 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑 ∫0 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
�4
𝑈𝑈 𝐿𝐿 𝑁𝑁𝑏𝑏4 (𝑋𝑋 = 0)
𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 𝐿𝐿 𝑑𝑑𝑁𝑁 𝑑𝑑𝑁𝑁 ∫0 𝑁𝑁𝑏𝑏4 𝑑𝑑𝑑𝑑
∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏2 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏3 𝑑𝑑𝑑𝑑 ∫0 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑𝑏𝑏4 𝑑𝑑𝑑𝑑
Comment (Hint): May quickly obtain the matrix system Ax = b by
inspecting the weak form

𝑑𝑑2 𝑇𝑇
Homework ODE: 𝑐𝑐1 + 𝑐𝑐2 𝑇𝑇 + 𝑐𝑐3 = 0
𝑑𝑑𝑋𝑋 2
𝐿𝐿
𝑑𝑑 2 𝑇𝑇�
GWR statement: � 𝑤𝑤(𝑋𝑋) 𝑐𝑐1 2
+ 𝑐𝑐2 𝑇𝑇� + 𝑐𝑐3 𝑑𝑑𝑑𝑑 = 0
𝑑𝑑𝑋𝑋
0

Weak form of GWR statement:

0 (natural BC)
𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑 𝑇𝑇� 𝑑𝑑 𝑇𝑇� 𝑑𝑑𝑑𝑑 𝑑𝑑 𝑇𝑇�
𝑤𝑤 𝑋𝑋 = 𝐿𝐿 𝑐𝑐1 − 𝑤𝑤 𝑋𝑋 = 0 𝑐𝑐1 − 𝑐𝑐1 � �
𝑑𝑑𝑑𝑑 + 𝑐𝑐2 � 𝑤𝑤𝑇𝑇𝑑𝑑𝑑𝑑 + 𝑐𝑐3 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 = 0
𝑑𝑑𝑑𝑑 𝑋𝑋=𝐿𝐿
𝑑𝑑𝑑𝑑 𝑋𝑋=0
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
0 0 0

𝐿𝐿 𝐿𝐿 𝐿𝐿
Inspect weak form to 𝑑𝑑𝑑𝑑 𝑑𝑑 𝑇𝑇� 𝑑𝑑 𝑇𝑇�
𝑐𝑐1 � �
𝑑𝑑𝑑𝑑 − 𝑐𝑐2 � 𝑤𝑤 𝑇𝑇𝑑𝑑𝑑𝑑 = 𝑐𝑐3 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝑐𝑐1
re-arrange as: 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
0 0 0 𝑋𝑋=0
For two linear finite elements, trial solution is

𝑇𝑇� 𝑋𝑋 = 𝑇𝑇�1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑇𝑇�2 𝑁𝑁𝑏𝑏2 𝑋𝑋 + 𝑇𝑇�3 𝑁𝑁𝑏𝑏3 𝑋𝑋

For two linear finite elements, weak form and trial solution above lead to

𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑑𝑑 𝑑𝑑 𝑇𝑇� 𝑑𝑑 𝑇𝑇�
𝑐𝑐1 � �
𝑑𝑑𝑑𝑑 − 𝑐𝑐2 � 𝑤𝑤 𝑇𝑇𝑑𝑑𝑑𝑑 = 𝑐𝑐3 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝑐𝑐1
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 0

𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏
� 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑
0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
𝐿𝐿 𝐿𝐿 𝐿𝐿 𝑇𝑇�1
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑐𝑐1 � 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 𝑇𝑇�2
0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
𝐿𝐿 𝐿𝐿
0
𝐿𝐿 𝑇𝑇�3
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏
� 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑
0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
For two linear finite elements, trial solution is

𝑇𝑇� 𝑋𝑋 = 𝑇𝑇�1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑇𝑇�2 𝑁𝑁𝑏𝑏2 𝑋𝑋 + 𝑇𝑇�3 𝑁𝑁𝑏𝑏3 𝑋𝑋

For two linear finite elements, weak form and trial solution above lead to

𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑑𝑑 𝑑𝑑 𝑇𝑇� 𝑑𝑑 𝑇𝑇�
𝑐𝑐1 � �
𝑑𝑑𝑑𝑑 − 𝑐𝑐2 � 𝑤𝑤 𝑇𝑇𝑑𝑑𝑑𝑑 = 𝑐𝑐3 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝑐𝑐1
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 0

?
For two linear finite elements, trial solution is

𝑇𝑇� 𝑋𝑋 = 𝑇𝑇�1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑇𝑇�2 𝑁𝑁𝑏𝑏2 𝑋𝑋 + 𝑇𝑇�3 𝑁𝑁𝑏𝑏3 𝑋𝑋

For two linear finite elements, weak form and trial solution above lead to

𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑑𝑑 𝑑𝑑 𝑇𝑇� 𝑑𝑑 𝑇𝑇�
𝑐𝑐1 � �
𝑑𝑑𝑑𝑑 − 𝑐𝑐2 � 𝑤𝑤 𝑇𝑇𝑑𝑑𝑑𝑑 = 𝑐𝑐3 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝑐𝑐1
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 0

?
𝐿𝐿 𝐿𝐿 𝐿𝐿
� 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏3 𝑑𝑑𝑑𝑑
0 0 0
𝐿𝐿 𝐿𝐿 𝐿𝐿 𝑇𝑇�1
−𝑐𝑐2 � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏3 𝑑𝑑𝑑𝑑 𝑇𝑇�2
0
𝐿𝐿
0
𝐿𝐿
0
𝐿𝐿 𝑇𝑇�3
� 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏3 𝑑𝑑𝑑𝑑
0 0 0
For two linear finite elements, trial solution is

𝑇𝑇� 𝑋𝑋 = 𝑇𝑇�1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑇𝑇�2 𝑁𝑁𝑏𝑏2 𝑋𝑋 + 𝑇𝑇�3 𝑁𝑁𝑏𝑏3 𝑋𝑋

For two linear finite elements, weak form and trial solution above lead to

𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑑𝑑 𝑑𝑑 𝑇𝑇� 𝑑𝑑 𝑇𝑇�
𝑐𝑐1 � �
𝑑𝑑𝑑𝑑 − 𝑐𝑐2 � 𝑤𝑤 𝑇𝑇𝑑𝑑𝑑𝑑 = 𝑐𝑐3 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝑐𝑐1
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 0

𝐿𝐿
� 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
0
𝐿𝐿
𝑐𝑐3 � 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
0
𝐿𝐿
� 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
0
For two linear finite elements, trial solution is

𝑇𝑇� 𝑋𝑋 = 𝑇𝑇�1 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 + 𝑇𝑇�2 𝑁𝑁𝑏𝑏2 𝑋𝑋 + 𝑇𝑇�3 𝑁𝑁𝑏𝑏3 𝑋𝑋

For two linear finite elements, weak form and trial solution above lead to

𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑑𝑑 𝑑𝑑 𝑇𝑇� 𝑑𝑑 𝑇𝑇�
𝑐𝑐1 � �
𝑑𝑑𝑑𝑑 − 𝑐𝑐2 � 𝑤𝑤 𝑇𝑇𝑑𝑑𝑑𝑑 = 𝑐𝑐3 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝑐𝑐1
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 0

𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 = 0
𝑑𝑑 𝑇𝑇�
− 𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 = 0 𝑐𝑐1
𝑑𝑑𝑑𝑑
𝑁𝑁𝑏𝑏𝑏 𝑋𝑋 = 0 𝑋𝑋=0
Recall the following matrices arising from the two linear finite element solution of
the ODE previously described:

𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑑𝑑 𝑑𝑑 𝑇𝑇� 𝑑𝑑 𝑇𝑇�
𝑐𝑐1 � �
𝑑𝑑𝑑𝑑 − 𝑐𝑐2 � 𝑤𝑤 𝑇𝑇𝑑𝑑𝑑𝑑 = 𝑐𝑐3 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝑐𝑐1
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 0

𝐿𝐿 𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏
� 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0
𝐿𝐿 𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏
𝑐𝑐1 � 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 𝑐𝑐3 � 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0
𝐿𝐿 𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑁𝑁𝑏𝑏𝑏
� 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 0

As we showed earlier, the entries of these matrices may be computed visually from
the sketch of the basis functions 𝑁𝑁𝑏𝑏𝑏, 𝑁𝑁𝑏𝑏2, and 𝑁𝑁𝑏𝑏3 .
- from the slopes of the basis functions’ line segments and the areas
underneath the basis functions
Also recall the following matrix arising from the three linear finite element solution
of the ODE previously described:

𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑑𝑑 𝑑𝑑 𝑇𝑇� 𝑑𝑑 𝑇𝑇�
𝑐𝑐1 � �
𝑑𝑑𝑑𝑑 − 𝑐𝑐2 � 𝑤𝑤 𝑇𝑇𝑑𝑑𝑑𝑑 = 𝑐𝑐3 � 𝑤𝑤 𝑋𝑋 𝑑𝑑𝑑𝑑 − 𝑤𝑤 𝑋𝑋 = 0 𝑐𝑐1
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑋𝑋=0
0 0 0

𝐿𝐿 𝐿𝐿 𝐿𝐿
� 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏3 𝑑𝑑𝑑𝑑
0 0 0
𝐿𝐿 𝐿𝐿 𝐿𝐿 𝑇𝑇�1
−𝑐𝑐2 � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏3 𝑑𝑑𝑑𝑑 𝑇𝑇�2
0
𝐿𝐿
0
𝐿𝐿
0
𝐿𝐿 𝑇𝑇�3
� 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏3 𝑑𝑑𝑑𝑑
0 0 0

In order to facilitate calculation of the entries of the matrix above, we need to


define the mathematical expressions for the basis functions.
Recall the linear basis functions for the two linear finite element solution:
𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
1

𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3
0 element 1 𝐿𝐿/2 element 2 𝐿𝐿

Recall the linear basis functions for the three linear finite element solution:

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3 node 4
element 1 element 2 element 3
0 𝐿𝐿/3 2𝐿𝐿/3 𝐿𝐿
Let’s refer to the location of any node K as 𝑋𝑋𝐾𝐾 , thus

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
1

𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3
element 1 element 2

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3 node 4
element 1 element 2 element 3
Let’s refer to the location of any node K as 𝑋𝑋𝐾𝐾 , thus

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
1

𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3
element 1 element 2
𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3 node 4
element 1 element 2 element 3
Let’s refer to the location of any node K as 𝑋𝑋𝐾𝐾 , thus

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
1

𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3
element 1 element 2
𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3 node 4
element 1 element 2 element 3

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/3 𝑋𝑋3 = 2𝐿𝐿/3 𝑋𝑋4 = 𝐿𝐿


Let’s refer to the location of any node K as 𝑋𝑋𝐾𝐾 , thus

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
1

𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3
element 1 element 2
𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏


1
𝑁𝑁𝑏𝑏𝑏

𝑋𝑋
node 1 node 2 node 3 node 4
element 1 element 2 element 3

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/3 𝑋𝑋3 = 2𝐿𝐿/3 𝑋𝑋4 = 𝐿𝐿


Let’s refer to the location of node K as 𝑋𝑋𝐾𝐾 , and node K’s basis function as 𝑁𝑁𝑏𝑏𝐾𝐾

𝑁𝑁𝑏𝑏𝑏𝑏
1

𝑋𝑋
node K-1 node K node K+1
element K-1 element K
𝑋𝑋𝐾𝐾−1 𝑋𝑋𝐾𝐾 𝑋𝑋𝐾𝐾+1

𝑋𝑋 − 𝑋𝑋𝐾𝐾−1
if 𝑋𝑋𝐾𝐾−1 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾 (over element K-1)
𝑋𝑋𝐾𝐾 − 𝑋𝑋𝐾𝐾−1
Mathematical
expression
𝑁𝑁𝑏𝑏𝑏𝑏 = 𝑋𝑋𝐾𝐾+1 − 𝑋𝑋
for 𝑁𝑁𝑏𝑏𝑏𝑏 is as if 𝑋𝑋𝐾𝐾 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾+1 (over element K)
follows: 𝑋𝑋𝐾𝐾+1 − 𝑋𝑋𝐾𝐾

0 otherwise
For the two-element solution:
𝑋𝑋 − 𝑋𝑋𝐾𝐾−1
if 𝑋𝑋𝐾𝐾−1 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾 (over element K-1)
𝑋𝑋𝐾𝐾 − 𝑋𝑋𝐾𝐾−1

𝑁𝑁𝑏𝑏𝑏𝑏 = 𝑋𝑋𝐾𝐾+1 − 𝑋𝑋
if 𝑋𝑋𝐾𝐾 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾+1 (over element K)
𝑋𝑋𝐾𝐾+1 − 𝑋𝑋𝐾𝐾

0 otherwise

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
𝑋𝑋2 − 𝑋𝑋
if 𝑋𝑋1 ≤ 𝑋𝑋 ≤ 𝑋𝑋2 (over element 1)
1 𝑁𝑁𝑏𝑏𝑏 = 𝑋𝑋2 − 𝑋𝑋1
𝑁𝑁𝑏𝑏𝑏 0 otherwise

𝑋𝑋 − 𝑋𝑋1
if 𝑋𝑋1 ≤ 𝑋𝑋 ≤ 𝑋𝑋2 (over element 1)
𝑋𝑋 𝑋𝑋2 − 𝑋𝑋1
node 1 node 2 node 3
𝑁𝑁𝑏𝑏𝑏 = 𝑋𝑋3 − 𝑋𝑋
element 1 element 2 if 𝑋𝑋2 ≤ 𝑋𝑋 ≤ 𝑋𝑋3 (over element 2)
𝑋𝑋3 − 𝑋𝑋2
𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿
𝑋𝑋1 = 0 𝑋𝑋3 = 2ℎ 0 otherwise
𝑋𝑋2 = ℎ
𝑋𝑋 − 𝑋𝑋2
if 𝑋𝑋2 ≤ 𝑋𝑋 ≤ 𝑋𝑋3 (over element 2)
ℎ = 𝐿𝐿/2 is the uniform element length 𝑁𝑁𝑏𝑏𝑏 = 𝑋𝑋3 − 𝑋𝑋2
0 otherwise
For the two-element solution:
𝑋𝑋 − 𝑋𝑋𝐾𝐾−1
if 𝑋𝑋𝐾𝐾−1 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾 (over element K-1)
𝑋𝑋𝐾𝐾 − 𝑋𝑋𝐾𝐾−1

𝑁𝑁𝑏𝑏𝑏𝑏 = 𝑋𝑋𝐾𝐾+1 − 𝑋𝑋
if 𝑋𝑋𝐾𝐾 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾+1 (over element K)
𝑋𝑋𝐾𝐾+1 − 𝑋𝑋𝐾𝐾

0 otherwise

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
ℎ − 𝑋𝑋
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
1 𝑁𝑁𝑏𝑏𝑏 = ℎ

𝑁𝑁𝑏𝑏𝑏 0 otherwise

𝑋𝑋 − 0
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
𝑋𝑋 ℎ
node 1 node 2 node 3 𝑁𝑁𝑏𝑏𝑏 = 2ℎ − 𝑋𝑋
element 1 element 2 if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿
0 otherwise
𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ

𝑋𝑋 − ℎ
if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)
𝑁𝑁𝑏𝑏𝑏 = ℎ
ℎ = 𝐿𝐿/2 is the uniform element length
0 otherwise
So for the two-element solution, the entries of

𝐿𝐿 𝐿𝐿 𝐿𝐿
� 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏3 𝑑𝑑𝑑𝑑
0 0 0
𝐿𝐿 𝐿𝐿 𝐿𝐿
� 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏3 𝑑𝑑𝑑𝑑
0 0 0
𝐿𝐿 𝐿𝐿 𝐿𝐿
� 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 � 𝑁𝑁𝑏𝑏3 𝑁𝑁𝑏𝑏3 𝑑𝑑𝑑𝑑
0 0 0

may be found as
𝐿𝐿 ℎ 2ℎ
� 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 = � 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 + � 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
0 0 ℎ

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
ℎ − 𝑋𝑋
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
1 𝑁𝑁𝑏𝑏𝑏 = ℎ

𝑁𝑁𝑏𝑏𝑏 0 otherwise

𝑋𝑋 − 0
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
𝑋𝑋 ℎ
node 1 node 2 node 3 𝑁𝑁𝑏𝑏𝑏 = 2ℎ − 𝑋𝑋
element 1 element 2 if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿
0 otherwise
𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ

𝑋𝑋 − ℎ
if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)
𝑁𝑁𝑏𝑏𝑏 = ℎ
ℎ = 𝐿𝐿/2 is the uniform element length
0 otherwise
𝐿𝐿 ℎ 2ℎ
� 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 = � 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑 + � 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑑𝑑𝑑𝑑
0 0 ℎ

ℎ 2ℎ
ℎ − 𝑋𝑋 ℎ − 𝑋𝑋
=� 𝑑𝑑𝑑𝑑 + � 0 𝑑𝑑𝑑𝑑
0 ℎ ℎ ℎ


=
3

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
ℎ − 𝑋𝑋
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
1 𝑁𝑁𝑏𝑏𝑏 = ℎ

𝑁𝑁𝑏𝑏𝑏 0 otherwise

𝑋𝑋 − 0
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
𝑋𝑋 ℎ
node 1 node 2 node 3 𝑁𝑁𝑏𝑏𝑏 = 2ℎ − 𝑋𝑋
element 1 element 2 if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿
0 otherwise
𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ

𝑋𝑋 − ℎ
if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)
𝑁𝑁𝑏𝑏𝑏 = ℎ
ℎ = 𝐿𝐿/2 is the uniform element length
0 otherwise
𝐿𝐿 ℎ 2ℎ
� 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 = � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 + � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑
0 0 ℎ

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
ℎ − 𝑋𝑋
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
1 𝑁𝑁𝑏𝑏𝑏 = ℎ

𝑁𝑁𝑏𝑏𝑏 0 otherwise

𝑋𝑋 − 0
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
𝑋𝑋 ℎ
node 1 node 2 node 3 𝑁𝑁𝑏𝑏𝑏 = 2ℎ − 𝑋𝑋
element 1 element 2 if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿
0 otherwise
𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ

𝑋𝑋 − ℎ
if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)
𝑁𝑁𝑏𝑏𝑏 = ℎ
ℎ = 𝐿𝐿/2 is the uniform element length
0 otherwise
𝐿𝐿 ℎ 2ℎ
� 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 = � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 + � 𝑁𝑁𝑏𝑏2 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑
0 0 ℎ

ℎ 2ℎ
𝑋𝑋 − 0 𝑋𝑋 − 0 2ℎ − 𝑋𝑋 2ℎ − 𝑋𝑋
=� 𝑑𝑑𝑑𝑑 + � 𝑑𝑑𝑑𝑑
0 ℎ ℎ ℎ ℎ ℎ

ℎ ℎ 2ℎ
= + =
3 3 3

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
ℎ − 𝑋𝑋
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
1 𝑁𝑁𝑏𝑏𝑏 = ℎ

𝑁𝑁𝑏𝑏𝑏 0 otherwise

𝑋𝑋 − 0
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
𝑋𝑋 ℎ
node 1 node 2 node 3 𝑁𝑁𝑏𝑏𝑏 = 2ℎ − 𝑋𝑋
element 1 element 2 if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿
0 otherwise
𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ

𝑋𝑋 − ℎ
if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)
𝑁𝑁𝑏𝑏𝑏 = ℎ
ℎ = 𝐿𝐿/2 is the uniform element length
0 otherwise
𝐿𝐿 ℎ 2ℎ
� 𝑁𝑁𝑏𝑏1 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 = � 𝑁𝑁𝑏𝑏1 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 + � 𝑁𝑁𝑏𝑏1 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑
0 0 ℎ

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
ℎ − 𝑋𝑋
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
1 𝑁𝑁𝑏𝑏𝑏 = ℎ

𝑁𝑁𝑏𝑏𝑏 0 otherwise

𝑋𝑋 − 0
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
𝑋𝑋 ℎ
node 1 node 2 node 3 𝑁𝑁𝑏𝑏𝑏 = 2ℎ − 𝑋𝑋
element 1 element 2 if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿
0 otherwise
𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ

𝑋𝑋 − ℎ
if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)
𝑁𝑁𝑏𝑏𝑏 = ℎ
ℎ = 𝐿𝐿/2 is the uniform element length
0 otherwise
𝐿𝐿 ℎ 2ℎ
� 𝑁𝑁𝑏𝑏1 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 = � 𝑁𝑁𝑏𝑏1 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑 + � 𝑁𝑁𝑏𝑏1 𝑁𝑁𝑏𝑏2 𝑑𝑑𝑑𝑑
0 0 ℎ
and so on

ℎ 2ℎ
ℎ − 𝑋𝑋 𝑋𝑋 − 0 2ℎ − 𝑋𝑋
=� 𝑑𝑑𝑑𝑑 + � 0 𝑑𝑑𝑑𝑑
0 ℎ ℎ ℎ ℎ


=
6

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏
ℎ − 𝑋𝑋
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
1 𝑁𝑁𝑏𝑏𝑏 = ℎ

𝑁𝑁𝑏𝑏𝑏 0 otherwise

𝑋𝑋 − 0
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
𝑋𝑋 ℎ
node 1 node 2 node 3 𝑁𝑁𝑏𝑏𝑏 = 2ℎ − 𝑋𝑋
element 1 element 2 if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/2 𝑋𝑋3 = 𝐿𝐿
0 otherwise
𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ

𝑋𝑋 − ℎ
if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)
𝑁𝑁𝑏𝑏𝑏 = ℎ
ℎ = 𝐿𝐿/2 is the uniform element length
0 otherwise
For the three-element solution:
𝑋𝑋 − 𝑋𝑋𝐾𝐾−1
if 𝑋𝑋𝐾𝐾−1 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾 (over element K-1)
𝑋𝑋𝐾𝐾 − 𝑋𝑋𝐾𝐾−1

𝑁𝑁𝑏𝑏𝑏𝑏 = 𝑋𝑋𝐾𝐾+1 − 𝑋𝑋
if 𝑋𝑋𝐾𝐾 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾+1 (over element K)
𝑋𝑋𝐾𝐾+1 − 𝑋𝑋𝐾𝐾

0 otherwise
𝑋𝑋2 − 𝑋𝑋
if 𝑋𝑋1 ≤ 𝑋𝑋 ≤ 𝑋𝑋2 (over element 1)
𝑁𝑁𝑏𝑏𝑏 = 𝑋𝑋2 − 𝑋𝑋1

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 0 otherwise

1 𝑋𝑋 − 𝑋𝑋1
if 𝑋𝑋1 ≤ 𝑋𝑋 ≤ 𝑋𝑋2 (over element 1)
𝑋𝑋2 − 𝑋𝑋1
𝑁𝑁𝑏𝑏𝑏
𝑁𝑁𝑏𝑏𝑏 = 𝑋𝑋3 − 𝑋𝑋
if 𝑋𝑋2 ≤ 𝑋𝑋 ≤ 𝑋𝑋3 (over element 2)
𝑋𝑋3 − 𝑋𝑋2
𝑋𝑋
0 otherwise
node 1 node 2 node 3 node 4
element 1 element 2 element 3 𝑋𝑋 − 𝑋𝑋2
if 𝑋𝑋2 ≤ 𝑋𝑋 ≤ 𝑋𝑋3 (over element 2)
𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/3 𝑋𝑋3 = 2𝐿𝐿/3 𝑋𝑋4 = 𝐿𝐿 𝑋𝑋3 − 𝑋𝑋2

𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ 𝑋𝑋4 = 3ℎ 𝑁𝑁𝑏𝑏𝑏 = 𝑋𝑋4 − 𝑋𝑋


if 𝑋𝑋3 ≤ 𝑋𝑋 ≤ 𝑋𝑋4 (over element 3)
𝑋𝑋4 − 𝑋𝑋3
ℎ = 𝐿𝐿/3 is the uniform element length
0 otherwise
For the three-element solution:
𝑋𝑋 − 𝑋𝑋𝐾𝐾−1
if 𝑋𝑋𝐾𝐾−1 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾 (over element K-1)
𝑋𝑋𝐾𝐾 − 𝑋𝑋𝐾𝐾−1

𝑁𝑁𝑏𝑏𝑏𝑏 = 𝑋𝑋𝐾𝐾+1 − 𝑋𝑋
if 𝑋𝑋𝐾𝐾 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾+1 (over element K)
𝑋𝑋𝐾𝐾+1 − 𝑋𝑋𝐾𝐾

0 otherwise
ℎ − 𝑋𝑋
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)
𝑁𝑁𝑏𝑏𝑏 = ℎ

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 0 otherwise

1 𝑋𝑋 − 0
if 0 ≤ 𝑋𝑋 ≤ ℎ (over element 1)

𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 = 2ℎ − 𝑋𝑋
if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)

𝑋𝑋
0 otherwise
node 1 node 2 node 3 node 4
element 1 element 2 element 3 𝑋𝑋 − ℎ
if ℎ ≤ 𝑋𝑋 ≤ 2ℎ (over element 2)
𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/3 𝑋𝑋3 = 2𝐿𝐿/3 𝑋𝑋4 = 𝐿𝐿 ℎ

𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ 𝑋𝑋4 = 3ℎ 𝑁𝑁𝑏𝑏𝑏 = 3ℎ − 𝑋𝑋


if 2ℎ ≤ 𝑋𝑋 ≤ 3ℎ (over element 3)

ℎ = 𝐿𝐿/3 is the uniform element length
0 otherwise
For the three-element solution:
𝑋𝑋 − 𝑋𝑋𝐾𝐾−1
if 𝑋𝑋𝐾𝐾−1 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾 (over element K-1)
𝑋𝑋𝐾𝐾 − 𝑋𝑋𝐾𝐾−1

𝑁𝑁𝑏𝑏𝑏𝑏 = 𝑋𝑋𝐾𝐾+1 − 𝑋𝑋
if 𝑋𝑋𝐾𝐾 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾+1 (over element K)
𝑋𝑋𝐾𝐾+1 − 𝑋𝑋𝐾𝐾

0 otherwise

𝑋𝑋 − 𝑋𝑋3
𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 if 𝑋𝑋3 ≤ 𝑋𝑋 ≤ 𝑋𝑋4 (over element 3)
𝑁𝑁𝑏𝑏𝑏 = 𝑋𝑋4 − 𝑋𝑋3
1
0 otherwise

𝑁𝑁𝑏𝑏𝑏

𝑋𝑋

node 1 node 2 node 3 node 4


element 1 element 2 element 3

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/3 𝑋𝑋3 = 2𝐿𝐿/3 𝑋𝑋4 = 𝐿𝐿

𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ 𝑋𝑋4 = 3ℎ

ℎ = 𝐿𝐿/3 is the uniform element length


For the three-element solution:
𝑋𝑋 − 𝑋𝑋𝐾𝐾−1
if 𝑋𝑋𝐾𝐾−1 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾 (over element K-1)
𝑋𝑋𝐾𝐾 − 𝑋𝑋𝐾𝐾−1

𝑁𝑁𝑏𝑏𝑏𝑏 = 𝑋𝑋𝐾𝐾+1 − 𝑋𝑋
if 𝑋𝑋𝐾𝐾 ≤ 𝑋𝑋 ≤ 𝑋𝑋𝐾𝐾+1 (over element K)
𝑋𝑋𝐾𝐾+1 − 𝑋𝑋𝐾𝐾

0 otherwise

𝑋𝑋 − 2ℎ
𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 𝑁𝑁𝑏𝑏𝑏 ℎ
if 2ℎ ≤ 𝑋𝑋 ≤ 3ℎ (over element 3)
𝑁𝑁𝑏𝑏𝑏 =
1
0 otherwise

𝑁𝑁𝑏𝑏𝑏

𝑋𝑋

node 1 node 2 node 3 node 4


element 1 element 2 element 3

𝑋𝑋1 = 0 𝑋𝑋2 = 𝐿𝐿/3 𝑋𝑋3 = 2𝐿𝐿/3 𝑋𝑋4 = 𝐿𝐿

𝑋𝑋1 = 0 𝑋𝑋2 = ℎ 𝑋𝑋3 = 2ℎ 𝑋𝑋4 = 3ℎ

ℎ = 𝐿𝐿/3 is the uniform element length

You might also like