Documente Academic
Documente Profesional
Documente Cultură
Prof. Suvranu De
Numerical Integration in 1D
Reading assignment:
Summary:
dN i ( x)
where Bi
dx
Only for a linear finite element
x1
x2
B EB Adx
T 1
x 2 x1
2
1 1 x2
1 1 x1 AEdx
x1
x2
AEdx x x
2
1
1
2
1 1
1 1
f1
f
-1 1
1 1
g ( ) f (1) f (1)
2 2
1 1
I f ( ) d g ( ) d f (1) f (1)
1 1
•Requires the function f(x) to be evaluated at 2 points
(-1, 1)
• Constants and linear functions are exactly integrated
• Not good for quadratic and higher order polynomials
1
i 1
• Divide the interval (-1,1) into M-1 equal intervals using M points
• Pass a polynomial of degree M-1 through these M points (the
value of this polynomial will be equal to the value of the function
at these M-1 points)
• Integrate this polynomial to obtain an approximate value of the
integral
f1
f
f1
g
-1 1
With „M‟ points we may integrate a polynomial of degree „M-1‟
exactly.
1
i 1
But we want
1
1
f ( ) d W1 f (1 ) a0W1 a0W1
Hence, we obtain the identity
i.e., W1 2; 1 0
1
For M=1 I f ( ) d 2 f (0)
1
f
f0
g
-1 1
Midpoint quadrature rule:
• Only one evaluation of f is required at the midpoint of the
interval.
• Scheme is accurate for constants and linear polynomials
(compare with Trapezoidal rule)
Example: M=2
1
I f ( ) d W1 f (1 ) W2 f ( 2 )
1
2 2
a0 W1 W2 a1 W11 W2 2 a2 W11 W2 2 a3 W11 W2 2
3 3
Hence, we obtain the 4 conditions to determine the 4 unknowns
(W1 ,W2 1 and 2 )
Condition 1 : W1 W2 2
Condition2 : W11 W2 2 0
2
Condition3 : W11 W2 2
2 2
3
Condition4 : W11 W2 2 0
3 3
* *
-1 1
1
Exact integration
2
I Integrate and check!
3
Newton-Cotes
To exactly integrate this I need a 4-point Newton-Cotes
formula. Why?
Gauss
To exactly integrate this I need a 2-point Gauss formula.
Why?
Gauss quadrature:
I f( )d
1
1
1 1
f(- ) f( )
3 3
2
Exact answer!
3
Comparison of Gauss quadrature and Newton-Cotes for the
integral 1
I cos(2x) dx
1
Newton-Cotes
Gauss quadrature
In FEM we ALWAYS use Gauss quadrature
Linear Element
1 2
1 1
Stiffness matrix
1
1
T 1 1 1 1
k B EB Ad
4 1 1 1
AEd 1
1 1 1
1 AEd 4 1 1
Nodal load vector
1
f b i N i b d
1
f b N b d
T
1 1
k B EB Ad AE B B d
1 T 1 T
Assuming E and A are constants
1 1
d N dN1 dN 2 dN3 1
2 1
1
B 2 1 2
d d d d 2 2
k B EB Ad AE B B d
1 T 1 T
1 1
1
1/ 2 2 2 1/ 2
2 1/ 4
AE 2 1/ 2 4 2
2 1/ 2 d
1
1/ 4
2
2 1/ 2 1/ 2
2