The MATH was originally created as open-source software to help in education process of undergraduate and graduate students to better understand numerical methods and to speed up the learning process as itself. Throughout its development process shows up many new capabilities that can be achieved with it. MATH application was designed to achieve several goals:
- – Provide all calculation steps of each numerical method with easy to use graphical interface;
- – Enable graphical visualisation of calculated data as well as option of exporting gathered data and graphs in suitable formats.
There are several open-source web-based applications with similar capabilities (that the author is aware of), but they are usually not designed for understanding the very basics of various numerical methods which are very important and so not well suited for education process. MATH provides so far these numerical methods [6, 7, 8, 9]:
- Nonlinear equations
- – Bisection method
- – Regula Falsi method
- – Secant method
- – Newton method
- – Iteration method
- Definite integration
- – Rectangular method
- – Trapezoid method
- – Simpson’s method
- – Monte Carlo hit or miss method
- – Monte Carlo average method
- Double definite integration
- Numerical differentiation – up to 4. Degree of differentiation
- System of linear equations – Jacobi iteration method
- Matrix calculation – basic numerical operations, transpose, inverse, etc.
- Least square approximation
Numerical analysis is a subject of extreme interest to mathematicians, computer scientists and engineers who will welcome this software application. For engineers there is often a question which method will be the best to use, the most accurate, the fastest etc. To be able to decide, there is important to know the basics and core of chosen methods. MATH is designed to help engineering students to better understand how it works and to learn faster and more easily.
At this time MATH is still in an early stage of development. However it is being already used as an education tool by various professors at Technical University Košice and is spreading further. There are still many numerical methods and graphical capabilities that will be implemented throughout the time.
Implementation and architecture
MATH is written in Qt 4.8.1 , which is a C++ graphical toolkit for cross – platform application development. Qt uses two more libraries MuParser  and Gsl  for parsing expressions and matrix calculations. For plotting is used Qwt library . The graphical user interface (GUI) shown in Figure 1 provides users to choose from presented numerical methods, visualize chosen numerical method and data export. Data and graphs can be exported in most common formats (PDF, PNG, JPEG, TXT, etc.). Plotting tool has most of commonly used options like changing line’s color, width, zooming, grids, axis, title, labels, etc.
As you can see on Fig. 1, you can choose from 14 numerical methods implemented so far, with graphical representation of definite integration. LMS method has its own graphical representation that will help students to understand what necessary steps need to be done to correctly solve the problem, what is the final result, and compare the performance of similar numerical methods.
All numerical methods are implemented in a way of numerical analysis, to study of algorithms that use numerical approximation for the numerical analysis problems with arbitrary-precision arithmetic. The goal of numerical analysis is to give approximate but accurate solutions to hard problems. Iterative methods are not expected to terminate in a finite number of steps. Starting from initial guess, iterative methods form successive approximations that converge to the exact solution only in the limit. Convergence test is specified in order to decide when a sufficiently accurate solution has been found. Examples include Bisection method, Newton’s method or Jacobi iteration method. MATH implements more of them. These iterative methods are generally needed for large problems. The regression takes into account that data are imprecise, and given some points (mainly measured data) we determine the unknown function in a way of minimalization of squared distance between point and function (Least mean square – LMS method). Numerical differentiation is a process of finding the numerical value of a derivative of a given function at a given point. MATH supports numerical differentiation up to 4. degree so far, and are implemented in a way of defining limit function as follows:
With raising degree of numerical differentiation, the limit function gets slightly more difficult. More detailed implementation of each separate numerical method and how to use it can be found in MATH documentation at: http://sourceforge.net/projects/nummath/files/Math_documentation/
Of course, one can use already created, well documented and robust libraries for scientific applications like SciPy, Maxima, Octave, Matlab, and many others, but these libraries or applications offers only final results and plotting.
Main goal of this application is to help understand (not explain) how those numerical methods work. That means, MATH implements the exact procedure and steps as one would do it in the process of learning. The main reason, why was MATH developed is to allow comparing the whole procedure with final result and graphs needed to solve this type of problems. After all, student can compare his own procedure, result, estimated error calculations and find out if a mistake was made and if, where exactly.
Example of use (LMS – Least Mean Square method): For approximation of measured data with polynomial of 4th order, one has to choose the LS method from toolbar, then select “polynomial approximation” and set 4 as the order of approximation. In the input/output matrix should be written or loaded desired data and then executed, what leads to approximation matrix and after visualization, one can see the data approximated as selected.
On Fig. 2 one can see the implementation of LMS method and its output in graphical form on Fig. 3. Each of implemented method work in a similar way. With this output, students can compare their partial and final results with MATH results to ensure the correct procedure of calculation.
Functionality has been tested on Microsoft Windows (7 and XP) where everything worked as expected. Qt provides also easy cross – platform compatibility, and MATH can be compiled on Linux or MacOS as well.
Before publishing a trial run with students from Technical University was performed using input data (problems to solve) from lectures of Applied Mathematics in order to test its usability and detect any bugs. All final results were compared with results from Matlab to ensure the precision of all used methods, as Matlab includes many more advanced methods with higher precision outputs. With Matlab we performed tests of all numerical methods available in MATH also for limit values that could cause problems based on the principle of individual algorithms methods. These tests verify that all methods work correctly with desired precision. Although various limit cases were tested, there still may occur some bugs considering special cases. For such occasion, there is support available through mail or MATH website.
MATH has been tested on Microsoft Windows (7 and XP). On Linux it can run using Wine tool.
Qt 4.8.1 (should work also with Qt 5 – depends on addition libraries – currently untested).
Additional system requirements
– Qwt 6.1.0.
– MuParser 2.2.3.
– Gsl 1.8.
– MinGW 4.8.1.
List of contributors
– Henrich Glaser – Opitz: coding, testing.
– Kristína Budajová: testing.
– Leonard Glaser – Opitz: artwork.
Archive (e.g. institutional repository, general repository) (required)
Persistent identifier: http://sourceforge.net/projects/nummath/files
Licence: GNU General Public Licence version 3
Publisher: Henrich Glaser – Opitz
Date published: 25/05/2014
Code repository (e.g. SourceForge, GitHub etc.) (optional)
Licence: GNU General Public Licence version 3
Date published: 17/07/2014
(3) Reuse potential
MATH as an application provides easy to use tool for calculating roots of nonlinear equations, roots of system of linear equations, differentiate, integrate, approximation, matrix calculation using mentioned numerical methods for calculating results, estimated errors and much more. MATH is completed with graphical visualization capable of producing publication-quality figures. Future development will be aimed on expanding new numerical methods and graphical capabilities. Code can be expanded in an easy way, because application is constructed in a way where each method has separate source code which is then implemented in mainwindow source code.
In order to build from source code, the mingw compiler must be used, following the instructions at: http://sourceforge.net/p/nummath/code/ci/master/tree/README.txt.
Application has already been implemented into education process on Technical University Košice and we are trying to spread it further away. So far there has been published publication with examples from numerical mathematics using MATH as a tool . MATH’s reuse potential lies in every university where undergraduate or graduate students need to understand how all these numerical methods work from a fundamental level and not just how to use them. Engineers, computer scientists and others often need to know which method will be most effective.
With MATH it is possible to compare their performance very quickly and easy. Graph dialog window can be used also as an individual tool, which is providing plotting options as any other plotting tool that can and will be extended throughout further development process.
The authors declare that they have no competing interests.