Area = ½ (1/16) [3 + 2(49.84375) + 4]
Area = 3.333984375 a.u.
Comparing the results from all the figures:
It is clearly observed that as the number of trapeziums increase, the uncertainty in approximating the area decreases since increasing number of segments of area under the curve are being taken into account. Thereof the value gets closer and closer to the actual value of the integral which is: 3.333333333 (from integration).
In order to find a general expression for the area under the curve of g(x) = x2 + 3 from x = 0 to x = 1, the following diagram is considered with n trapeziums:
As mentioned earlier, area according to composite trapezoidal rule is:
Area = ½ (width of strips) [first height + 2(sum of all middle heights) + last height]
So the general expression in this case for n trapeziums is:
Area = ½ (x) [g (0) + 2(g (x1) + g (x2) +…………….+ g (xn-1)) + g (1)]
[OBS! Width of every strip is x. g (0) = g (x0) and g (1) = g (xn)
Using the results, the general statement that will estimate the area under any curve y = f (x), from x = a to x = b, using n trapeziums could be developed.
Assuming that the following graph is y = f (x):
Composite trapezoidal rule: Area = ½ (width of strips) [first height + 2(sum of all middle heights) + last height]
So the general statement for approximating the area under any curve according to fig 1.7:
Area = ½ (c) [f (a) + 2( f (x+c) + f (x+2c) +……………..+ f (x+(nc-1)) + f (b)]
[OBS! Width of every strip is c. f (a) = f (x) since (a = x) and f (b) = f (x+nc) since (b = x+nc)]
Using the general statement with eight trapeziums the area under the following three curves from x = 1 x = 3 could be found:
-
y =
-
y = 4x3 – 23x2 + 40x – 18
-
y =
Area = ½ (c) [f (a) + 2( f (x+c) + f (x+2c) +……………..+ f (x+(nc-1)) + f (b)]
Where: c = 2/8 = 1/4 = 0.25, a = 1 and b= 3 in this case. [a = x and b = (x +nc) from fig 1.7]
Area = ½ (1/4) [0.6299605249 +2 (0.7310044346 + 0.8254818122 + 0.9148264275 + 1 + 1.081687178 + 1.160397208 + 1.236521861) + 1.310370697]
Area = 1.980021133 a.u.
Area = ½ (c) [f (a) + 2(f (x+c) + f (x+2c) +……………..+ f (x+(nc-1)) + f (b)]
Where: c = 2/8 = 1/4 = 0.25, a = 1 and b= 3 in this case. [a = x and b = (x +nc) from fig 1.7]
Area = ½ (1/4) [2.846049894 + 2(3.474792043 + 3.837612894 + 4.156356486 + 4.365641251 + 4.484455912 + 4.534134497 + 4.534086944) + 4.5]
Area = 8.265026244 a.u.
-
y = 4x3 – 23x2 + 40x – 18
Area = ½ (c) [f (a) + 2(f (x+c) + f (x+2c) +……………..+ f (x+(nc-1)) + f (b)]
Where: c = 2/8 = 1/4 = 0.25, a = 1 and b= 3 in this case. [a = x and b = (x +nc) from fig 1.7]
Area = ½(1/4) [3 + 2(3.875 + 3.75 + 3 + 2 + 1.125 + 0.75 + 1.25) + 3]
Area = 4. 6875 a.u.
In order to compare the above three area approximations by composite trapezoidal rule with the actual values, the three functions are integrated:
= 1.98069094 (true value)
Approximated value (from fig 2.1) = 1.980021133
The true error (Et) is:
Et = 1.98069094 - 1.980021133 = 0.000669807
Absolute relative true error = |Et / true value| × 100
= (0.000669807/1.98069094) × 100
= 0.0338 %
= 8.259731224 (true value)
Approximated value (from fig 2.2) = 8.265026244
Et = 8.265026244 - 8.259731224 = 0.00529502
Absolute relative true error = (0.00529502/8.259731224) × 100
= 0.0641 %
(true value)
Approximated value (from fig.2.3) = 4. 6875
Et = 4. 6875 - 4.666666667 = 0.020833333
Absolute relative true error = (0.020833333/4.666666667) × 100
= 0.4464 %
It is clearly observed that the accuracy of approximation by the composite trapezoidal rule decreases from a to c.
In order to explore the scope and limitations of the general statement, some other functions are tested:
-
The area under the curve of y = x + 2 from x = 0 to x= 1 is investigated using five trapeziums:
Area = ½ (c) [f (a) + 2(f (x+c) + f (x+2c) +……………..+ f (x+(nc-1)) + f (b)]
Where: c = 1/5, a = 0 and b = 1. [a = x and b = (x +nc) from fig 1.7]
Area = ½ (1/5) [2 + 2(2.2 + 2.4 + 2.6 + 2.8) + 3]
= 2.5 a.u. (approximated value)
= 2.5 (True value). Absolute relative true error = 0%
-
The area under the curve of x2 + 2x + 1 from x = 0 to x = 1 is investigated using five trapeziums:
Area = ½ (c) [f (a) + 2(f (x+c) + f (x+2c) +……………..+ f (x+(nc-1)) + f (b)]
Where: c = 1/5, a = 0 and b = 1. [a = x and b = (x +nc) from fig 1.7]
Area = ½ (1/5) [1 + 2(1.44 + 1.96 + 2.56 + 3.24) + 4]
= 2.34 a.u. (approximated value)
= 2.333333333 (true value)
Et = 2.34 – 2.333333333
= 0.006666667
Absolute relative true error = (0.006666667/2.333333333) × 100
= 0.2857%
-
Area under the curve of x5 – x + 1 from x = 0 to x = 1 is investigated using five trapeziums.
Area = ½ (c) [f (a) + 2(f (x+c) + f (x+2c) +……………..+ f (x+(nc-1)) + f (b)]
Where: c = 1/5, a = 0 and b = 1. [a = x and b = (x +nc) from fig 1.7]
Area = ½ (1/5) [1 + 2(0.80032 + 0.61024 + 0.47776 + 0.52768) + 1]
= 0.6832 a.u (approximate value)
= 0.6666666667 (true value)
Et = 0.6832 – 0.6666666667
= 0.0165
Absolute relative true error = (0.0165/0.6666666667) × 100
= 2.47 %
Comparing the results from a to c:
From the above written data, it is evident that the accuracy of approximation using the general statement for finding the area under a curve decreases as we move from first order functions upwards. Simultaneously the shape of the graph tends to become more haphazard and complicated as the degree (order) of the function increases. The graph of a liner function(fig 3.1), for instance, is more straight and geometrical compared to the graph of a quadratic equation(fig 3.2) and the graph of latter is more geometrical compared to the graph of a fifth degree polynomial(fig 3.3). Hence the shape of a graph influences the approximation to a great extent and therefore the more geometrical and linear the shape of a graph the more accurate will be the approximation. The relationship between the shape of a graph and the accuracy of approximation is also evident in figures: 2.1, 2.2, 2.3 and the data related to them. The accuracy decreases in b (fig 2.2) compared to a (fig 2.1) as the shape of the graph becomes less linear and more curved. Similarly the accuracy decreases in c (fig 2.3) compared to b (fig 2.2) as the shape of the graph becomes more haphazard and less linear.
The accuracy of approximation also depends upon the number of trapeziums used. This is evident in figures (1.1 – 1.7) and the data related to them. As the number of trapeziums increases, the approximate value gets closer and closer to the true value of the area.
It could be concluded that the composite trapezoidal rule is exact for polynomials of degree less than or equal to one.
Math Portfolio SL type 1
Shiba Younus IB 2
Date: 23-04-09
Katedralskolan