Introduction to Numerical Methods

From Uni Study Guides
Jump to: navigation, search

Numerical methods involves the study of algorithms and finding iterative solutions through the method of approximation. This type of mathematics is commonly undertaken through means of a computer for repeated calculations.

Contents

Analytical v Iterative Solutions

An analytical solution is one that is definite.

Example:
For the solution of a quadratic equation
x=(-b ± √(b^2-4ac))/2a is an analytical solution to x

An iterative solution involves approximations to find the required value of an equation. Iterative solutions can involve graphical solutions as well as equations, whereby the two sides of the equation are graphed and the intersection of the graphs is the solution of the unknown variable.

Example:
For the solution of a quadratic equation
x= -(bx+c)/ax is an iterative solution to x, as we can't make x the subject and therefore can not get a definite solution

Problem Solving

  1. Problem definition – always define the problem and assumptions that are made in the construction
  2. Create a Mathematical Model – Develop a statement of the problem that is numerically solvable
  3. Use the Problem solving tools available – graphics, statistics, analytical and numerical methods
  4. Implementation – Interpret the numerical result to arrive at the decision. Interpret whether the result is reflective of the situation

Errors

Sources of Error

  1. Errors in Mathematical modeling – simplification past a point of reasonable accuracy
  2. Blunders – programming error introduce error into the values
  3. Errors in input – human errors and data transfer errors
  4. Machine errors – rounding errors, underflow, overflow, other errors introduced in computation
  5. Truncation errors in mathematical precision – approximate evaluation of infinite series or integrals involving infinity can create errors

Error Calculations

Analytical equations involve a direct computation of a set of data within an equation or series of equations to find a solution.

This is not always possible, and as such an iterative method of calculation may be necessary.

Iterative methods of calculation involve approximation of solutions to an equation or series of equations, which results in an approximation with some level of error. This level of error will vary depending on the accuracy of the iteration and the data used

It is necessary to compare the analytical and iterative solutions, where both are available, to find the error in the iterative calculation.

Finite Storage in Computers

The finite storage capabilities in computers refers to the computation of information in finite bits of data, where values that are entered are estimated by a mantissa (finite number of storage terms). A bit is a binary digit, which is in base 2. Base 2 can not always give exact values of base 10 numbers, and therefore results in estimations which cause errors. The more bits used, the greater precision as more significant digits can be recorded.

This results in upper and lower limits on the range of floating point numbers as there are only finite storage capabilities available and these numbers are estimations rather than whole numbers

Machine Precision

Magnitude of Round-off errors is quantified by machine precision εm

Where εm > 0

The error calculation for a given value 1 is 1 + δ_m=1 whenever |δm |< εm

In exact arithmetic, 1 + δ=1 only when δ=0, however this is not the case in computation as the numbers are finite estimations.

Machine error is approximately 2.22 × 10-16
Resulting in δ being within 2.22 × 10-16 of 0

Underflows – when the number is less than the smallest floating point and the machine round down to 0.

Overflows – when the value computed is larger than the largest floating point and evaluates to infinity.

Effects of Approximation

Equations can evaluate themselves to a value when they should arrive at 0. Instances where this occurs are often the assigning of a fraction to a variable, and the substitution of this fraction into a second equation which should compute 0, but because of rounding errors in the fraction calculation, produces a number.

Error Analysis

Absolute error

Ex = |x - x'|

where x' is the approximation and x is the actual value.

Relative error

Rx = |x-x'|/x, where x cannot be 0.

The approximation x' is accurate to d significant figures when

|x-x'|/x < 1/2 * 10-d

where d is the largest positive integer for which the equation is true.

Round Off Error

Finite storage of values results in digits with actual numbers undergoing chopping or rounding.

This chopping or rounding can accumulate and result in larger, more significant errors.

Subtraction or addition of very small values with regular values may also result in rounding errors

Example:
1.111111111 + 2.22 * 10^-10
This addition may result in rounding errors occurring.

Subtraction of b2 and 4ac in the quadratic formula can also cause issues if they are very close together.

Final terms in Taylor Series estimation chops off the function. This chopping off is known as a truncation error as the function is being restricted in terms of its accuracy out of the necessity of finding a value.

However, if a Taylor series estimation continues on for larger and larger integers, the truncation error decreases but there is an increase in the rounding error for the estimation.

Avoiding Errors

  1. Never give an answer to more accuracy than the input allows
  2. Avoid subtracting nearly equal numbers
  3. Sort the numbers in a long equation according to size, and add/subtract the smallest first
  4. Use Taylor series equations to analyze total numerical errors
  5. Check results satisfy certain conditions if those conditions are available
  6. Compare results with other methods of analysis

End

This is the end of this topic. Click here to go back to the main subject page for Numerical Methods & Statistics.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox