Professional Documents
Culture Documents
CE50P-2/E01 Date: 05/06/20 CE-2 Numerical Differentiation and Integration Date: 24/07/20
CE50P-2/E01 Date: 05/06/20 CE-2 Numerical Differentiation and Integration Date: 24/07/20
Date:: 24/07/20
Date 05/06/20
Gonzaga, Vinz Scott Pangilinan
NUMERICAL CE-2
2018100253 DIFFERENTIATION AND
INTEGRATION
01/07/2020
13 14
Numerical Differentation
LA3 -S HEE T1
Compute for the derivative of 𝑓(𝑥)=cos𝑥 at 𝑥= /6 by
a) Forward Difference Formula
b) Central Difference Formula
c) Backward Difference Formula
Use the following for the values of
ℎ=0.1
=0.05 Upload Excel file of LA3
Filename: LA3-Surname
=0.025 LA3-Sheet1: Nu m e ri c a l D i ffe re n t i a t i o n
=0.0125 LA3-Sheet2: Nu m e ri c a l In t e g ra t i o n
Formula should be inserted to cells for
=0.00625 each Table presented
15
3
Given:
π
f ( x )=cos (x ) at x=
6
h DhF
0.1
cos ( π6 + 0.1)−cos ( π6 ) =−0.542432281
0.1
0.05
cos ( π6 + 0.05)−cos ( π6 )=−0.521437818
0.05
0.025
cos ( π6 + 0.025)−cos ( π6 )=−0.510772672
0.025
0.0125
cos ( π6 + 0.0125)−cos ( π6 )=−0.505399568
0.0125
0.00625
cos ( π6 + 0.00625)−cos ( π6 )=−0.502703065
0.00625
h D Ch
0.1
cos ( π6 + 0.1)−cos( π6 −0.1) =−0.499167083
2 ( 0.1 )
0.05
cos ( π6 + 0.05)−cos ( π6 −0.05 ) =−0.499791693
2 ( 0.05 )
0.025
cos ( π6 + 0.025)−cos ( π6 −0.025) =−0.499947918
2 ( 0.025 )
0.0125
cos ( π6 + 0.0125)−cos( π6 −0.0125 ) =−0.499986979
2 ( 0.0125 )
0.00625
cos ( π6 + 0.00625)−cos ( π6 −0.00625) =−0.499996745
2( 0.00625)
h D Ch Error Ratio
h DBh
0.1
cos ( π6 )−cos( π6 −0.1) =−0.455901885
0.1
0.05
cos ( π6 )−cos( π6 −0.05) =−0.478145568
0.05
0.025
cos ( π6 )−cos( π6 −0.025) =−0.489123165
0.025
0.0125
cos ( π6 )−cos( π6 −0.0125) =−0.494574391
0.0125
0.00625
cos ( π6 )−cos( π6 −0.00625) =−0.497290424
0.00625
13 14
Numerical Integration
LA3 -S HE E T2
Approximate the integral using
a) Trapezoidal Rule
b) Sim 1/3 Rule
𝑑𝑥
, 𝑛 = 10
0 1+ 𝑥
Upload Excel file of LA3
Filename: LA3-Surname
LA3-Sheet1: Nu m e ri c a l D i f f e re n t i a t i o n
LA3-Sheet2: Nu m e ri c a l In t e g ra t i o n
Formula should be inserted to cells for
each Table presented
15
a. TRAPEZOIDAL RULE
C T N ( f ) ≈T n ( f ) + E Tn ( f )
h
T n ( f )=h ( f ( x ) +2 f ( x 1 ) ⋯+ 2 f ( x n−1 ) + f ( x n ) ] )
2[ 0
b−a
h=
n
T h2 ' ( ) ' ( )
En ≈− [ f b −f a ]
12
i x f(x) wt × f(x)
0 0 1 0.5
1 0.4 0.862068966 0.862068966
2 0.8 0.609756098 0.609756098
3 1.2 0.409836066 0.409836066
4 1.6 0.280898876 0.280898876
5 2 0.2 0.2
6 2.4 0.147928994 0.147928994
7 2.8 0.113122172 0.113122172
8 3.2 0.088967972 0.088967972
9 3.6 0.071633238 0.071633238
10 4 0.058823529 0.029411765
Approx 1.325818747
Error -1.0832E-06
T 1.325449658
E 0.000369089
Actual 1.325817664
1 1
Wt × f ( x 0 ) =
( )2 1+ 02
=0.5
Wt × f ( x )=1
5
( 1+21 )=0.2
2
1 1
2 ( 1+ 4 )
Wt × f ( x )=
10 =0.029411765
2
10
T n ( f )=h × ∑ ( Wt × f ( x ) )i=1.325449658
i=0
ETn ( f )=0.000369089
¿=1.325449658+ 0.000369089=1.325818747
Error= Actual−¿=1.325817664−1.325818747=0.000369089
B. SIMPSONS’S 1/3 RULE
C S N ( f ) ≈ Sn ( f ) + E Sn ( f )
h
Sn ( f ) =h( f ( x 0 ) +4 f ( x odd ) +2 f ( x even ) +f ( x n ) ] )
3[
b−a
h=
n
1 1
Wt × f ( x 0 ) =
( )
3 1+02
=0.333333333
4 1
Wt × f ( x 5 )=
( )3 1+ 22
=0.266666667
2 1
3 ( 1+2 )
Wt × f ( x ) =
6 =0.098619329
2
1 1
3 ( 1+ 4 )
Wt × f ( x )=
10 =0.019607843
2
10
T n ( f )=h × ∑ ( Wt × f ( x ) )i=1.325409223
i=0
ETn ( f )=−2.45208E-06
¿=1.325409223+(−2.45208E-06)=1.325406771
Error= Actual−¿=1.325817664−1.325406771=0.000410893