Introduction to Numerical Methods
Round-Off Errors
The error that is produced when a calculator or computer is used to perform real number calculations is called round-off error. Real numbers are typically represented in computers using floating-point form.
Machine Numbers
Represented in the normalized decimal floating-point form.
Aka. k-digit decimal machine numbers. Any positive real number can be written in the above form.
The floating-point form of
- chopping: chop off the digits
to produce the floating-point form - rounding: when
, add to to obtain and then chop off all but the first k digits.
Measuring Errors
Suppose
Absolute Error
Relative Error
Successive relative error
When
Here
Finite-Digit Arithmetic
Machine arithmetic are done on finite-digits and are not exact. Suppose
Due to this, the accuracy is lost to some extent. The accuracy can be increased by rearranging calculations.
Truncating Error
Occurs because of using approximation in place of an exact mathematical
procedure. For example, the error due to the approximation of
Algorithm
An algorithm is a set of well-defined instructions to solve a problem.
Stable
If a small change in the input causes a small change in the output, the algorithm is stable.
Unstable
When a algorithm is not stable.
Conditionally Stable
When an algorithm is stable only when the input is within a certain range.
Growth of Error
Suppose
Linear growth
When
Exponential growth
When
Rate of convergence
A measure of how fast a sequence is converging.
Suppose
If
Then we say that
For limits
Suppose
If
Then
Numerical solution of non-linear equations
Non-linear function is a function whose graph is not a straight line. A solution
to the equation
In many situations, non-linear equations cannot be solved analytically. In this case, therefore, the solutions of the equations must be approached using iterative methods. The principle of these methods of solving consists in starting from an arbitrary point, the closest possible point to the solution sought, and involves arriving at the solution gradually through successive tests.
The 2 criteria to take into account when choosing a method for solving non-linear equations are:
- Method convergence (conditions of convergence, speed of convergence etc.).
- The cost of calculating of the method.