70 likes | 310 Views
Error Measurement and Iterative Methods. Absolute & Forward Error Relative Error Cauchy Error. Errors and Estimates
E N D
Error MeasurementandIterative Methods Absolute & Forward Error Relative Error Cauchy Error
Errors and Estimates In this course we will develop different algorithms to solve different types of mathematical problems such as: solve an equation, find the value of and integral or solve a differential equation. The algorithms we use will hardly ever find the solution to such a problem but it will estimate the solution. This introduces an error to what the algorithm proposes as a solution there are two different ways to measure the error when the exact value of the solution is known. * The relative error is not defined if the exact value is zero. The absolute error tells you exactly how much your answer is off by and the relative error tells you what percent your answer is off by.
Sequences Many of the algorithms we will consider generate a sequence of values to approximate a solution to a problem. A sequence is a succession of numbers. The idea will often be to use the number in the sequence you are currently considering to generate the next number in the sequence. Then next number will often be a value that is “closer” to the solution of the problem you want to solve. For example, we can use each of the sequence below to generate a value for the number e. In each of these sequences the larger the value for n the better the estimate for the number e in both the absolute and relative measures. Example of computing e accurate to 3 decimal places Suppose we want to compute the number e accurate to 3 decimal places using the sequence yn as our approximation.
This is the sequence of values that will approximate e. When will we need to stop to 3 decimal places of accuracy? This will be when the change from one step to another will no longer change the 3rd decimal place assuming all decimal places are not all 9's. Look for a value that will not change the third decimal digit. There are some standard ideas that describe the error (i.e. achieve the accuracy you want). In this case we need to take 7 terms (or iterations of the algorithm) to get this accuracy.
Iterative Methods A numerical algorithms will very often use an iterative method to approximate a solution to a given problem. An iterative method (sometimes referred to as iteration or recursion) uses an existing approximation to generate a new and hopefully better approximation to the solution. These types of methods will most often have an initial approximation(s) for the solution then an algorithm is applied to this to get a better approximation and this continues until the desired accuracy (error) is achieved. We use the following notation: xn+1 = f(xn) or xn+1=f(xn,xn-1,…x1) An immediate problem is that the approximation may never meet the prescribed accuracy. To avoid the situation where the machine will do endless computations we will often put a limit on the numbers of computations (iterations) we are willing to let the machine work to find a solution. Problem with Absolute and Relative Measures of Error The problem with both the absolute and relative error measures we have talked about is that to find them you need to know the answer. From a practical or applied point of view why would be asking the question if you knew the answer?
Cauchy Error To solve the problem of measuring the error without knowing the exact answer we use what is known as the Cauchy Error for a sequence. The Cauchy Error is the difference between any two terms of a sequence. The advantage here is that the error is defined only using the sequence itself and not the answer. For a sequence given by xn we define the two types of Cauchy Error below.
Equations The error measures used to measure the error in approximating a solution to an equation of the form by a number where the actual solution is are the forward error and the backward error. Multiplicity of a root If is a root of a function , in other words then the multiplicity of the root is the value so the first derivatives of are zero at , but the derivative is not zero. Example: The function the root 1 has multiplicity 2.