## Validity and Scope of Approximate Methods of Integration

Introduction

Addition of discrete numbers is pretty straightforward; more than 80% of the human population can make mental calculations instantly. So when integration was introduced as a kind of addition in a continuous domain, I was not very worried. However, it didn’t take me long to realize that understanding integration is more than solving a bunch of problems using well defined techniques. So in my pursuit to understand the topic well, I decided to research upon how some of these techniques (Trapezium Rule and Simpson’s Rule) came about, how they work, and what they really mean. With this intent, I have compiled my ideas focusing on my motivation, research, analysis and inference.

When a person asks, “You have two oranges and I give you two more, how many do you have now?” the answer is within the boundary of comprehension. This is because there are physical quantities involved that make it easier to relate to. On the other hand, when the same person says, “I give you the function for my car’s velocity, find me its displacement”, things get a little out of hand. First of all, when there is a continuous function, it is like dealing with infinite instances over which a quantity varies. Books say, finding the area of the velocity-time graph is like multiplying the two quantities, which will therefore yield the required displacement. However this is not very convincing – the v-t graph need not even be regular. Thus, over a given period, finding the area or ‘integrating’ the velocity function would yield the displacement function is neither obvious nor fathomable. It is this realization that motivated me to probe into the basics of modern integral calculus.

Before analyzing the Trapezium Rule and the Simpson’s Rule, I thought it best to explore more about integration itself. It is interesting to note that even before Sir Isaac Newton and Leibniz laid the foundation of Integral Calculus as we know today, an approximate method called the ‘method of exhaustion’, that could be used to find the area under a continuous function had been utilized for centuries. Further, most of the formulae that we use to compute integrals within a matter of seconds, actually took a long time to be laid. For example, Cavalieri manually calculated the integral of xn up to n=9, using his quadrature formula. One way to get closer to understanding integral calculus is by evaluating the Riemann integral, which involves computing the Riemann sums, or addition of the function over definite intervals (Boyer, 1949).

With time, modern calculus became an indispensible tool for analysis. From Physics to Economics, using Calculus became mandatory for progress. However, in many of these applications, the exact value of integration was not required. Thus, in order to eliminate the complex process of actual integration, approximate methods evolved, that work well for many applications. Over a period, such methods have evolved into an independent branch of study called Numerical Methods. Two such methods that I will analyze is the Trapezium Rule and the Simpson’s Rule.

## Two Rules for Approximate Integration

Trapezium Rule:

Consider the function represented by the blue line in the graph of Figure 1. Ideally, integrating the function would involve finding the area under the blue line. However, the red line drawn can is a linear approximation of the blue line. Therefore, one could find the area of the trapezium formed by the red line function, and the X axis, and approximate it as the area under the blue function. This is exactly what the Trapezium Rule dictates:

abfxdx is approximately equal to (b-a)[fa+fb2]

## As can be seen from the above equation, complex integration is substituted by a simple mathematical calculation.

Figure 1: Trapezium Rule

## Simpson’s Rule:

Consider the function represented by the blue line in figure 2. This can be approximated to be the quadratic interpolant represented by the red line in the same graph. With this approximation, the area under the blue line equals b-a6[fa+4fa+b2+ fb]

Figure 2: Simpson’s Rule

Though both the methods are approximate and do not equal the actual integral values, errors can be neglected according to the accuracy requirements. For example, the Simpson’s rule has the 1/3rd and 3/8th rules which can be chosen according to the needs.

## Numerical Example

Consider the following function: abfxdx=121xdx

## Now this function will be solved using three methods: 1) Actual integration 2) Trapezium Rule 3) Simpson’s 1/3rd and 3/8th rules

1) Actual integration yield ln x in the interval 1 to 2 = 0.693

2) Trapezium Rule yields: 2-11+0.52= 0.75

3) a) Simpson’s 1/3rd rule yields: 2-161+41.52+ 0.5=0.75

b) Simpson’s 3/8th rule yields: 2-181+346+356+ 0.5=0.75

In this particular example it can be seen that all three methods yield the same result and have the thus have the same error.

Figure 3 represents the given function.

Figure 3: f(x) = 1/x

Figure 4 represents the actual integrated function.

Figure 4: f(x) = ln(x)

Figure 5 represents the approximate integrated function obtained from the three methods

Figure 5: Approximated integration

So when do the two methods differ? In order to find out this, I took up a real time example for analysis. Consider three bodies moving with velocities described functions v1(t), v2(t) and v3(t) respectively as shown. The aim is to find out the displacement of each body within the time interval of t=0s to t=2s. Since the velocity is varying continuously with time, one cannot possibly calculate the displacement in the first two seconds manually (there are infinite velocities). Hence the way to go forward is using integration or finding the area under the curve using different rules. I wanted to see the results yielded by each method (normal, Trapezium and Simpson’s) for each of the bodies. So I carried out the following analysis in Microsoft Excel.

## Real time Example

1) v1(t) = t5 + t2 + 7

2) v2(t) = t2 + 2

3) v3(t) = t + 2

## The functions are depicted below:

Displacement for each body using the three methods:

It is interesting to note that the two methods converge to the actual values, as the degree of the function is reduced. This is not surprising because, the Trapezium Rule assumes the function to be linear, while the Simpson’s Rule assumes it to be a parabola. Hence the closer the function actually is to the degree of 1 and 2 respectively, the methods of approximation have zero or negligible error. Also, the analysis shows that the Simpson’s method is more accurate than the Trapezium method at higher degrees. In fact the Trapezium method results in gross errors in the result, as can be seen in the first function. Having gained a graphical perspective of how the methods work, I researched into the factors that determine the choice of methods.

Before getting into that, it is interesting to note that the Simpson’s Rule has two sub categories depending on the choice of area. These are called the 1/3rd and 3/8th methods respectively. The accuracy of the 1/3rd rule has been discussed above. The accuracy of the 3/8th rule is analyzed below using the first velocity function to determine the displacement.

## The area under the curve using the 3/8th rule is:

In the above example, the displacement value hence obtained = 27.92. This gives an absolute error of 0.59 which is less than that incurred by the 1/3rd rule.

## Important Factors

The choice of method to choose for each application depends on the kind of accuracy required. There are many established methods to compare accuracy; one of them is by computing the errors generated by each method.

## Error Analysis:

1) For the trapezium Rule:

## This is represented by Figure 6.

2) For the Simpson’s Rule:

Error =

where ε is some value between the limits a and b.

(For the 3/8th method, the error is

)

The overall representation of errors by the two methods, and the log of errors are as shown in Figure 6. It is observed that the slope of the error for the trapezium rule is -1.90 while for the Simpson’s rule, it is -3.28. This is a good means to compare the accuracy of the two methods.

Another method to compare accuracy is by calculating the partition size. In both the methods, the Simpson’s Rule is seen to give a higher accuracy.

Speed: In these methods of approximation, another important factor to consider is the speed of convergence. In other words, how quickly does the iteration come close to the actual value? This is again important for choosing an appropriate method for a given application. Again, analysis show that the Simpson’s method converges faster when compared to the Trapezium Rule. And of the 1/3rd and 3/8th Simpson’s Rules, the latter is more complex, hence more superior.

Figure 6: Error Analysis

## Conclusion

The background research into two methods of approximate integration has been eye opening. During my study, it has become easier to grasp the fact that integration really yields the area under a curve. The approximate methods are not only easier to comprehend; they also give a feeling of what actually happens while integrating. The two methods discussed have been analyzed for accuracy and speed. From my manual computation of integral of three functions of different degrees, it is evident that the two methods work well only when the degree is close to 1 or 2.And of the two, the Simpson’s Rule yields better results at higher degrees. However, the Trapezium Rule is easier to compute. Therefore, a trade-off between ease of computation and accuracy is required for any application.

Through the understanding I’ve gained so far, I’m able to see everything around me as mathematical functions and appreciate what they mean. For instance, work done being the integral of F.ds is a more approachable topic now. I’m able to relate better to why it is easier to pull a lawn mower than to push it.

## Next Phase of Exploration

A more rigorous approach for analysis would be to follow the above procedure for different kinds of functions: exponential, trigonometric, inverse trigonometric and logarithmic (only algebraic functions have been considered). In the other cases, what would be the trend in the two methods in terms of accuracy? Which factor will decide a better approximation? Further, if there is a combination of functions, where normal integration itself becomes more complex, how would the methods of approximation respond? For example, if a function is obtained by multiplying an algebraic and exponential function, will integrating them using the Trapezium and Simpson’s Rules yield good enough results? I believe that finding the answers to these questions will pave the way for a deeper exploration of integration.

## References

Boyer, Carl Benjamin. The history of the calculus and its conceptual development:(The concepts of the calculus). DoverPublications.com, 1949.

Numerical Methods: The Trapezium and Simpson’s Rule. (2013). Retrieved from http://wwwf.imperial.ac.uk/metric/metric_public/numerical_methods/integration/trapezium_simpson.html

Numerical Integration: Some Interesting Examples. (2013). Retrieved from http://www.math.uconn.edu/~heffernan/math1132s13/files/trapezoid_rule.pdf

Error Analysis for Simple Rules of Numerical Integration. (2013). Retrieved from http://pages.cs.wisc.edu/~amos/412/lecture-notes/lecture19.pdf

One Dimensional Integrals. (2013). Retrieved from http://www.r-bloggers.com/one-dimensional-integrals-2/