3 Well-conditioned and ill-conditioned problems
Suppose we have a mathematical problem that depends on some input data. Now imagine altering the input data by a tiny amount. If the corresponding solution always varies by a correspondingly tiny amount then we say that the problem is well-conditioned . If a tiny change in the input results in a large change in the output we say that the problem is ill-conditioned . The following Example should help.
Example 4
Show that the evaluation of the function near is an ill-conditioned problem.
Solution
Consider and . In changing from 39 to 39.1 we have altered it by about 0.25%. But the percentage change in is greater than 40%. The demonstrates the ill-conditioned nature of the problem.
Task!
Work out the derivative for the function used in Example 4 and so explain why the numerical results show the calculation of to be ill-conditioned near .
We have and . At the value of is and, using calculus, the value of is . Thus is very close to a zero of (i.e. a root of the quadratic equation ). The fractional change in is thus very large even for a small change in . The given values of and lead us to an estimate of
for . This ratio gives the value , which agrees exactly with our result from the calculus. Note, however, that an exact result of this kind is not usually obtained; it is due to the simple quadratic form of for this example.
One reason that this matters is because of rounding error. Suppose that, in the Example above, we know is that is equal to 39 to 2 significant figures. Then we have no chance at all of evaluating with confidence, for consider these values
All of the arguments on the left-hand sides are equal to 39 to 2 significant figures so all the values on the right-hand sides are contenders for . The ill-conditioned nature of the problem leaves us with some serious doubts concerning the value of .
It is enough for the time being to be aware that ill-conditioned problems exist. We will discuss this sort of thing again, and how to combat it in a particular case, in a later Section of this Workbook.
Exercises
-
Round each of these numbers to the number of places or figures indicated
- (to 2 decimal places).
- (to 3 significant figures).
-
Suppose we wish to calculate
for relatively large values of . The following table gives values of for a range of -values
- For each shown in the table, and working to 6 significant figures evaluate and then . Find by taking the difference of your two rounded numbers. Are your answers accurate to 6 significant figures?
- For each shown in the table, and working to 4 significant figures evaluate and then . Find by taking the difference of your two rounded numbers. Are your answers accurate to 4 significant figures?
-
The larger solution of the quadratic equation
is which is equal to to 10 decimal places. Round the value to 4 significant figures and then use this rounded value to calculate the larger solution of the quadratic equation. How many accurate significant figures does your answer have?
-
Consider the function
and suppose we want to evaluate it for some .
- Let . Evaluate and then evaluate again having altered by just 1%. What is the percentage change in ? Is the problem of evaluating , for , a well-conditioned one?
- Let . Evaluate and then evaluate again having altered by just 1%. What is the percentage change in ? Is the problem of evaluating , for , a well-conditioned one?
(Answer: the problem in part (a) is well-conditioned, the problem in part (b) is ill-conditioned.)
-
The answers are tabulated below. The
and
columns give values for
and
respectively, rounded to 10 decimal places. The
column shows the values of
also to 10 decimal places. Column (a) deals with part (a) of the question and finds the difference after rounding the numbers in the
and
columns to 6 significant figures. Column (b) deals with part (b) of the question and finds the difference after rounding the numbers in the
and
columns to 4 significant figures.
Clearly the answers in columns (a) and (b) are not accurate to 6 and 4 figures respectively. Indeed the last two figures in column (b) are accurate to no figures at all!
-
to 4 significant figures. Using this value to find the larger solution of the quadratic equation gives
.
The number of accurate significant figures is 0 because the accurate answer is and is not the leading digit (it is ).
-
-
and
so the percentage change in
on changing
by
is
to 2 decimal places.
-
and
so the percentage change in
on changing
by
is
to 2 decimal places.
Clearly then, the evaluation of is well-conditioned and that of is ill-conditioned.
-
and
so the percentage change in
on changing
by
is