Excel spreadsheet in teaching numerical methods

One of the important objectives in teaching numerical methods for undergraduates’ students is to bring into the comprehension of numerical methods algorithms. Although, manual calculation is important in understanding the procedure, it is time consuming and prone to error. This is specifically the case when considering the iteration procedure used in many numerical methods. Currently, many commercial programs are useful in teaching numerical methods such as Matlab, Maple, and Mathematica. These are usually not user-friendly by the uninitiated. Excel spreadsheet offers an initial level of programming, which it can be used either in or off campus. The students will not be distracted with writing codes. It must be emphasized that general commercial software is required to be introduced later to more elaborated questions. This article aims to report on a teaching numerical methods strategy for undergraduates engineering programs. It is directed to students, lecturers and researchers in engineering field.


Introduction
Numerical analysis is a subject of extreme importance to engineers in many applications. Numerical methods are the study of set of procedure that uses numerical approximation for the solution of the problems in mathematical analysis. This is by considering approximate error estimates. Numerical methods became an independent mathematical discipline in the 20th Century. However, numerical analysis originated in ancient times and slowly progressed and flourished when computers became available in the late 1940s and early 1950s [1]. Currently numerical analysis is linked with computing machines. At present, in various engineering courses, students are required to solve engineering problems using numerical methods. This is important in acquiring useful engineering implications [2]. A course in numerical methods is also important in learning finite element method. In fact, a finite element problem requires matrix using numerical methods. A mathematical software such Matlab provides a platform for the students for fast learning by altering initial data without repeating all the computations [2,3].
Currently, many books on numerical methods using Matlab are available to the students such [4,5,6,7] and many others. However, Matlab and other commercial software are costly. Further many software are not user-friendly for uninitiated [8]. An attractive alternative for the students who are not majoring in computer science is Excel spreadsheets. This alternative allows ready experimentation with numerical algorithms [9]. In fact, this strategy is already used for learning finite element methods [10]. Therefore, the objective of this article is to report on a teaching strategy, which could be implemented for teaching numerical methods for undergraduates in Civil and Mechanical Engineering degree programs. This article will illustrate the usefulness in using Excel spreadsheet for finding roots using numerical methods. The spreadsheet approach helps the students to concentrate most of their efforts on thinking about the methods at hand, instead of turning their efforts to the need for programming [10]. The developed strategy will not only benefit the student but also the lecturer. The developed strategy is about learning by observation. Each time the student change for instance the numerical problem, the student will acquire new knowledge by observations. The developed strategy helps the lecturers to detect the evolution of the thinking process of their students when applying numerical methods. The students also will certainly reach the conviction of the importance of continuous learning in the future. Further, their Excel files will be useful for small engineering applications or at least for checking the solution obtained via their own Matlab program when possible or needed. The present illustration is based only on finding roots numerically; the developed concept can be applied for other chapters with slight adjustment to the procedure used in each chapter

Illustrative Example
The purpose of the selected example is to illustrate a new strategy in teaching numerical methods. This strategy will be useful for both the lecturers and to the students. By using this strategy, the lecturers will not only refer to the books for the preparation of their notes. They will be also learning about the methods by observation while teaching their students. For the suggested strategy, the lecturers are required to develop their own questions to be solved using numerical methods. These questions will be solved using Excel spreadsheet. Such procedure will helps in questioning for instance the advantages and limitation of the learned methods. Thus, the lecturer will be the author for his/her own tutorials. Thus, the lecturer will be independently learning by observation. Further, this procedure will also help the students to produce useful knowledge instead of consuming knowledge from books only. This is important when the lecturers are at the beginning of their carriers specifically with engineering backgrounds. For illustration purpose, the chapter roots of equation were selected. The aim in teaching numerical methods is not only learning numerical methods. It is also important that the students should be involved in the thinking process when solving problems. For instance when using a bisection method, the student can easily observe that the root can be found when the function cross the x-axis. Now the lecturer may ask further question to the students how to write this information in an easy language, which may be accepted by a computer. The computer has no eyes to observe the situation. The lecturer can further inform the students that in many cases, when there is a root, the function cross the x-axis, the function will change the sign from positive to negative value and vis versa. Thus if we randomly select two initial values, x l located before the root and xu located after the root, in many cases f(xl).f(xu) <0. Of course, there are exceptions, those are supposed to be given later to the student. The procedure of thinking prior application of any numerical method is very important in grasping the concepts and in understanding how the methods were developed. The strategy is for opening the students' creativity by observing first the simplicity of many numerical methods specifically at undergraduate level. Probably, by following this strategy, a few students may suggest additional requirements from any learned method in class or suggesting new methods.
Returning to our illustrative example, let us found the roots of a polynomial f(x)= -10x 2 + 200x + 210. Any polynomial function of second order is recommended to be used firstly for illustration purpose. This is to let most of students comfortable with the procedure. The students are expected also to learn the difference between the exact and approximate solution. Additionally, they are supposed to learn advantages and limitation of each method. The plot of the selected function is shown in Figure 1. It is apparent from the figure that the present function has two real roots: (-1) and (21). It is important to emphasise that the example was suggested without referring to any textbook and without an initial knowledge of the expected results when using numerical methods. The suggested equation was only checked to make sure that the function has two real roots to avoid exceptions. In the present illustration, four basic numerical methods for finding roots were considered. These are Bisection method, False-position method, Newton-Raphson method and Secant method. For the development of the algorithm, the author referred to Chapra and Canale [11] Book. The first known drawback of numerical methods in finding roots is that, only one root can be estimated at a time within the selected range. The solution will be mostly approximate. It is apparent from figure 1 that the two roots are located within the interval [-6, 22].

Prediction of the first root of an equation using various numerical methods
For the estimation of the first root which is (-1) by using the bisection method, two initial guesses [-6,4] were selected. It is apparent that the root is located within the selected interval. These two values are initial guesses. Although, the bisection method is known to converge very slowly to the solution, for the present case (figure 2), the method converged to the exact solution after one iteration only. This situation occurred because the two selected initial guesses when using Bisection method produced exact solution.   For the next step, the derivative of the equation was determined. This was required for estimating the root by using the Newton-Raphson method. The method requires only one initial guess. For estimating the approximate root, the first selected initial guess was (-6). The procedure was also repeated with an initial guess equal to (4). These two initial guesses were selected from the Bisection method. This is without any consideration of other factors. Newton-Raphson method is a popular method for finding the roots of an equation. It is widely known to converge fast to the solution. However, it is an open method, so it may diverge in some cases; thus, no solution will be found. Usually, when using the Newton-Raphson method, the initial guess is recommended to be close to the root when possible. The obtained results from the present cases are illustrated in figure 4. It is apparent that the Newton-Raphson method converged faster than the False-position method. The situation is different with the Bisection method. For the next step, the Secant method was selected to find the root within the range of [-6, 4]. The main difference between Secant and Newton method is this; the derivative of the function in Newton-Raphson method is replaced by numerical differentiation equation. This is very useful when the derivative of a function is difficult. Although, Secant method is an open method, it requires two initial guesses. The method may not necessary converge to the solution. The obtained results are shown in figure 5. From the figure, it is apparent that this method converged to the exact solution after 7 iteration.

Prediction of the second root of an equation using various numerical methods
The procedure of calculation is repeated for finding the second root of the equation, which is (21). The Bisection method was firstly used. The selected initial guesses are [8,22]. The obtained results are shown in figure 6. This time, the method was only close to the solution. It required several iterations. Given that, the approximate absolute percent relative error is only an approximate estimation of the error, it is important to check that the function f(x) value is close to 0 at the final approximate root. After completing the Bisection method, the procedure of calculation using the False-position method was repeated with the selected interval [8,22]. The obtained results are shown in figure 7. Five iterations were required to reach the solution. In this illustration, the False-position method reached the exact solution. This was not the case of the Bisection method.   Figure 7. False-position method within the Interval [8,22].
The procedure for finding the root (21) was also made with the Newton-Raphson method. For the first calculation, the selected initial guess was (8). The second selected initial guess was (22). The results of both cases are plotted in figure 8. When the value of the initial guess was (8), the method failed to find the expected root which (21). However, the first root was found. This case is widely known when using Newton-Raphson method. Interestingly, the approximate error converged to (0) after 8 th iteration. When an initial guess of (22) was selected, the Newton-Raphson method required little iteration to converge to the exact expected solution. The selected initial guess in this case was close to the root. The approximate root was (21). It is worth making comparison between False-position and Newton-Raphson methods by considering the approximate error. It is apparent that the Newton-Raphson method with an initial guess of (22) reached faster the root than the False-position method. So, what will be the case with the Secant method? The procedure was repeated to determine the root by using two initial guesses. Those are (8) and (22). The results are plotted in figure 9. It is apparent that the method converge to the exact solution after 6 iteration. It is obvious that the initial guess (22) is closer to the solution than (8). The convergence was faster than the Newton-Raphson method with an initial guess equal to (8) but slower than the Newton-Raphson method with an initial guess equal to (22).

Further numerical analysis
In the last section, two initial guesses were selected to bracket both roots. This is by using Bisection and False position methods. The selected range was [-2, 22]. The results are plotted in figures 10 and 11. Although, the Bisection method converged slowly to the first root, the situation was different with False-position method. For this last case, it was expected that the method will converge to either (-1) or (21). However, this was not the case. The f(x) values of the two selected initial guesses were the same. Therefore, it was not possible to find out the approximate solution given there is a division by zero.   For the case of Newton-Raphson, the method converged to the root which was closer to the initial guess, which is (-1). The results are plotted in figure 12. For the Secant method, similar problem occurred as for False-position method. There is a division by zero. This is illustrated also in figure 12. Therefore, further calculation was not possible. It is important to mention such cases cannot be necessary learned from book. The benefit in using Excel is clearly shown in the present illustrative example which is learning by observation. At this stage, students are ready for more advanced numerical methods in finding roots and for writing their first Matlab codes. For any unexpected issue with their Matlab program, the student can always refer back to Excel file to check carefully the solution.

Conclusion
This article focuses on using Excel spreadsheet in numerical methods as a teaching strategy for undergraduate students. The strategy is about learning many methods using one single equation to observe the advantages and limitations of each numerical method. The developed strategy helps the lecturers to detect the evolution of the thinking process of their students when applying numerical methods. An illustrative example about finding roots using four numerical methods was suggested.
The developed concept can be applied for other chapters with slight adjustment to the procedure used in each chapter. The developed strategy goes beyond learning from textbooks only. The students will learn from their own experience with the first application used in numerical methods. The developed strategy will be of great help to the new lecturers by acquiring new knowledge with each application. The students also will certainly reach the conviction of the importance of long life learning. Further, their Excel files will be useful for small engineering applications or at least for checking the solution obtained via their own Matlab program when needed.