Professional Documents
Culture Documents
Ce007 Ce31s2 Guerrero Me4.1
Ce007 Ce31s2 Guerrero Me4.1
x f(x)
0 5.176
0.1 15.471
0.2 45.887
0.3 96.5
0.4 47.488
0.5 19
0.6 11.692
0.7 12.382
0.8 17.846
0.9 21.703
1 16
A)
Using first forward difference approximation of order 0(h)
FORMULAS:
At x= 0
h= 0.1
102.95
𝑓"(0)=(𝑓(0.2)−2𝑓(0.1)+𝑓(0))/ 𝑓"(0.5)=(𝑓(0.5)−2𝑓(0.4)+𝑓(0.3
〖 0.1 〗 ^2
At x= 0.5
h= 0.1
-73.08
𝑓"(00.5)=(𝑓(0.7)−2𝑓(0.6)+𝑓(0.5))/ 𝑓"(1)=(𝑓(1)−2𝑓(0.9)+𝑓(0.8))/
〖 0.1 〗 ^2
h p=2,3,and 4
ge polynomial)
FORMULAS:
At x= 0.5
h= 0.1
-284.88
𝑓^′ (0.5)=(𝑓(0.5)−𝑓(0.4))/0.1
2052.4
(0.5)=(𝑓(0.5)−2𝑓(0.4)+𝑓(0.3))/ 〖 0.1 〗 ^2
At x= 1
h= 0.1
-57.03
𝑓^′ (1)=(𝑓(1)−𝑓(0.9))/0.1
-956
1)=(𝑓(1)−2𝑓(0.9)+𝑓(0.8))/ 〖 0.1 〗 ^2
B)Finite difference approximation of order O(h2)
x f(x)
0 5.176
0.1 15.471
0.2 45.887
0.3 96.5
0.4 47.488
0.5 19
0.6 11.692
0.7 12.382
0.8 17.846
0.9 21.703
1 16
FORMULAS:
At x= 0
h= 0.2
FORMULAS:
At x= 0.5
h= 0.2
FORMULAS:
At x= 1
h= 0.2
x f(x)
0 5.176
0.1 15.471
0.2 45.887
0.3 96.5
0.4 47.488
0.5 19
0.6 11.692
0.7 12.382
0.8 17.846
0.9 21.703
1 16
At x= 0
h= 0.1
At x= 0.5
h= 0.1
At x= 0.5 At x=
h= 0.1 h=
At x=
h=
𝑓^′ (1)=(3𝑓(1)−4𝑓(0.9)+𝑓(0.8
𝑓"(1)=(2𝑓(1)−5𝑓(0.9)+4𝑓(0.8)
Using second backward difference approximation of order 0(h 2)
FORMULAS:
0.5
0.1
(1)=(3𝑓(0.5)−4𝑓(0.4)+𝑓(0.3))/(2(0.1)) -182.26
1
0.1
(1)=(3𝑓(1)−4𝑓(0.9)+𝑓(0.8))/(2(0.1)) -104.83
d)Richardson's extrapolation (with initial approximations made from (b) and (c), with p=2,3,and 4
p= 2 h1= 0.1
p= 3 h2= 0.2
p= 4
Solution: Apply Richardson Extrapolation to finite difference approximations. Start with two forward difference
At x= 0
h= 0.2
301.33
𝑔(0.2)=(−𝑓(0.4)+4𝑓(0.2)−3𝑓(0))/(2(0.2))
-1020.575
𝑔′(0.2)=(−𝑓(0.6)+4𝑓(0.4)−5𝑓(0.2)+2𝑓(0))/ 〖 0.2 〗 ^2
h 0.1
2.345
𝑔(0.1)=(−𝑓(0.2)+4𝑓(0.1)−3𝑓(0))/(2(0.1))
2004.5
𝑔′(0.1)=(−𝑓(0.3)+4𝑓(0.2)−5𝑓(0.1)+2𝑓(0))/ 〖 0.1 〗 ^2
p= 2
at x = 0 at x = 0
-97.3166667
𝑓^′ (0)=𝐺=(2^2 𝑔(0.1)−𝑔(0.2))/(2^2−1) 𝑓^′ (0)=𝐺=(2^3 𝑔(0.1)−𝑔(0.
3012.858333
𝑓"(0)=𝐺=(2^2 𝑔′(0.1)−𝑔′(0.2))/(2^2−1) 𝑓"(0)=𝐺=(2^3 𝑔′(0.1)−𝑔′(0.
at x = 0.5 at x = 0.5
-168.541667
𝑓^′ (0)=𝐺=(2^2 𝑔(0.1)−𝑔(0.2))/(2^2−1) 𝑓^′ (0)=𝐺=(2^3 𝑔(0.1)−𝑔(0.2
2233.316667
𝑓"(0)=𝐺=(2^2 𝑔′(0.1)−𝑔′(0.2))/(2^2−1) 𝑓"(0)=𝐺=(2^3 𝑔′(0.1)−𝑔′(0.2
at x = 1 at x = 1
𝑓^′ (0)=𝐺=(2^2 𝑔(0.1)−𝑔(0.2))/(2^2−1) -130.03 𝑓^′ (0)=𝐺=(2^3 𝑔(0.1)−𝑔(0.2
At x= 0.5
h= 0.2
-210.295
𝑔(0.2)=(𝑓(0.7)−𝑓(0.3))/(2(0.2))
1772.05
𝑔′(0.2)=(𝑓(0.7)−2𝑓(0.5)+𝑓(0.3))/ 〖 0.2 〗 ^2
h 0.1
-178.98
𝑔(0.1)=(𝑓(0.6)−𝑓(0.4))/(2(0.1))
2118
𝑔′(0.1)=(𝑓(0.6)−2𝑓(0.5)+𝑓(0.4))/ 〖 0.1 〗 ^2
p= 3 p= 4
at x = 0
-40.367143
(0)=𝐺=(2^3 𝑔(0.1)−𝑔(0.2))/(2^3−1) 𝑓^′ (0)=𝐺=(2^4 𝑔(0.1)−𝑔(0.2))/(2^4−1)
2436.6536
(0)=𝐺=(2^3 𝑔′(0.1)−𝑔′(0.2))/(2^3−1) 𝑓"(0)=𝐺=(2^4 𝑔′(0.1)−𝑔′(0.2))/(2^4−1)
at x = 0.5
-174.50643
(0)=𝐺=(2^3 𝑔(0.1)−𝑔(0.2))/(2^3−1) 𝑓^′ (0)=𝐺=(2^4 𝑔(0.1)−𝑔(0.2))/(2^4−1)
2167.4214
0)=𝐺=(2^3 𝑔′(0.1)−𝑔′(0.2))/(2^3−1) 𝑓"(0)=𝐺=(2^4 𝑔′(0.1)−𝑔′(0.2))/(2^4−1)
at x = 1
(0)=𝐺=(2^3 𝑔(0.1)−𝑔(0.2))/(2^3−1) -115.63 𝑓^′ (0)=𝐺=(2^4 𝑔(0.1)−𝑔(0.2))/(2^4−1)
-29.23
𝑔(0.2)=(3𝑓(1)−4𝑓(0.8)+𝑓(0.6))/(2(0.2))
-1448.75
𝑔′(0.2)=(2𝑓(1)−5𝑓(0.8)+4𝑓(0.6)−𝑓(0.4))/ 〖 0.2 〗 ^2
h 0.1
-104.83
𝑔(0.1)=(3𝑓(1)−4𝑓(0.9)+𝑓(0.8))/(2(0.1))
-1751.3
𝑔′(0.1)=(2𝑓(1)−5𝑓(0.9)+4𝑓(0.8)−𝑓(0.7))/ 〖 0.1 〗 ^2
-17.587333
2206.1717
-176.89233
2141.0633
-109.87
-1771.47
LAGRANGE INTERPOLATION:
Solving for a0
FORMULA:
-0.9 -1 = 14263.66843
-0.8 -0.9 = -426339.2857
-0.7 -0.8 = 5690352.1825
-0.6 -0.7 = -31911375.66
-0.5 -0.6 = 27481481.481
-0.4 -0.5 = -13194444.44
-0.3 -0.4 = 6766203.7037
-0.2 -0.3 = -4094576.72
-0.1 -0.2 = 2213045.6349
0.1 -0.1 = -598076.4991
-1.846 -5.703 = 7.492947E-08
-1 -0.000726 THEREFORE:
-1 0 x=0 f'(x)= 11583.46
-1 0 x=0.5 f'(x)= -115.3695
-1 0 x=1 f'(x)= -4053.087
-1 0
-1 0 Note: To obtain the value of x at 0.5 and 1 just change
-1 0
-1 0
-1 0
-0.9 0
9576
0.007258 THEREFORE:
0 x=0 f''(x)= -109149
0 x=0.5 f''(x)= 3605.833
0 x=1 f''(x)= -29679.37
0
0 Note: To obtain the value of x at 0.5 and 1 just change
0
0
0
-95760
-0.4 -0.5 -0.7 -0.8 -0.9 -1 -0.000605
-0.4 -0.5 -0.7 -0.8 -0.9 -1 0
-0.4 -0.5 -0.7 -0.8 -0.9 -1 0
-0.4 -0.5 -0.7 -0.8 -0.9 -1 0
-0.3 -0.5 -0.7 -0.8 -0.9 -1 0
-0.3 -0.4 -0.7 -0.8 -0.9 -1 0
-0.3 -0.4 -0.5 -0.8 -0.9 -1 0
-0.3 -0.4 -0.5 -0.7 -0.9 -1 0
-0.3 -0.4 -0.5 -0.7 -0.8 -1 0
-0.3 -0.4 -0.5 -0.7 -0.8 -0.9 0
-4092.2
0.842008716616823
COMPOSITE SIMPSONS RULE:
FORMULA:
Determine erf(1)
Given: a= 0 b= 1
= = 0.8427006639
TOLERANCE 0.5%
6.48516002999256
1.56313520117069
0.386331932718202
0.175970088742015
GAUSS -LEGENDRE QUADRATURE
at n= 4
Given: a= 0 b= 1
x= (𝑏+𝑎)/2+(𝑏−𝑎)/2ξ
(1+0)/2+(1−0)/2
x= ξ
x= 0.5+0.5ξ
I= 0.5[f(0.5)+f(0.2307655)+f(0.7692345)+f(0.04691)+f(0.95309)]
I= 0.842701215309