SICP Exercise 2.13

Question

Show that under the assumption of small percentage tolerances there is a simple formula for the approximate percentage tolerance of the product of two intervals in terms of the tolerances of the factors. You may simplify the problem by assuming that all numbers are positive.

Answer

First of all, we need a way to write intervals with their centre and width:

\(x=c_x\pm w_x\)

Or:

\(x=[(c_x-w_x), (c_x+w_x)]\)

This gives us a new formula for interval multiplication:

\(xy=[(c_x-w_x)(c_y-w_y), (c_x+w_x)(c_y+w_y)]\)

If we reduce both sides:

\(xy=[(c_xc_y-c_yw_x-c_xw_y+w_xw_y),(c_xc_y+c_yw_x+c_xw_y+w_xw_y)]\)

From the question text, we know already that \(t_x\) and \(t_y\) are small, from which we can extrapolate that \(w_x\) and \(w_y\) and therefore \(w_xw_y\) will also be small. So, for purposes of simplification, we can assume they are zero and remove them from the equation completely. Of course, we lose some precision, but it may be worth the gain in simplicity.

\(xy\approx [(c_xc_y-(c_yw_x+c_xw_y)),(c_xc_y+(c_yw_x+c_xw_y))]\)

Well, this looks very much like the \(x=[(c_x-w_x), (c_x+w_x)]\) form we saw previously, with the centre being \(c_xc_y\) and the width being \(c_yw_x+c_xw_y\). Or, in other words:

\(w_{xy}\approx c_yw_x+c_xw_y\)

And:

\(c_{xy}\approx c_xc_y\)

With that out of the way, let’s turn to how tolerance can be expressed as a function of width and centre. We basically did this in exercise 2.12, when we defined the percent-procedure. It is nothing other than:

\(t_x=\frac{w_x}{c_x}\times 100\)

Or:

\(t_x=\frac{100w_x}{c_x}\)

So let’s plug in our (approximate) definitions for \(w_{xy}\) and \(c_{xy}\) to get \(t_{xy}\).

\(t_{xy}\approx \frac{100(c_yw_x+c_xw_y)}{c_xc_y}\)

\(t_{xy}\approx \frac{100c_yw_x+100c_xw_y}{c_xc_y}\)

\(t_{xy}\approx \frac{100w_x}{c_x}+\frac{100w_y}{c_y}\)

And then, because we know that \(t_x=\frac{100w_x}{c_x}\):

\(t_{xy}\approx t_x+t_y\)