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=cx±wx

Or:

x=[(cxwx),(cx+wx)]

This gives us a new formula for interval multiplication:

xy=[(cxwx)(cywy),(cx+wx)(cy+wy)]

If we reduce both sides:

xy=[(cxcycywxcxwy+wxwy),(cxcy+cywx+cxwy+wxwy)]

From the question text, we know already that tx and ty are small, from which we can extrapolate that wx and wy and therefore wxwy 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[(cxcy(cywx+cxwy)),(cxcy+(cywx+cxwy))]

Well, this looks very much like the x=[(cxwx),(cx+wx)] form we saw previously, with the centre being cxcy and the width being cywx+cxwy. Or, in other words:

wxycywx+cxwy

And:

cxycxcy

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:

tx=wxcx×100

Or:

tx=100wxcx

So let’s plug in our (approximate) definitions for wxy and cxy to get txy.

txy100(cywx+cxwy)cxcy

txy100cywx+100cxwycxcy

txy100wxcx+100wycy

And then, because we know that tx=100wxcx:

txytx+ty