I'm having some trouble doing SICP exercise 2.15. Please note that this question is not closed related to Lisp. Instead, it's closely related to numerical analysis.
Exercise 2.15. Eva Lu Ator, another user, has also noticed the different intervals computed by different but algebraically equivalent expressions. She says that a formula to compute with intervals using Alyssa's system will produce tighter error bounds if it can be written in such a form that no variable that represents an uncertain number is repeated. Thus, she says,
par2
is a "better" program for parallel resistances thanpar1
. Is she right? Why?
This question is a little confusing when pulled out of context, so please let me explain. The formula for parallel resistors can be written in two algebraically equivalent ways: $\frac{R_1R_2}{R_1+R_2}$ and $\frac{1}{\frac{1}{R1}+\frac{1}{R2}}$. However, it seems that computing parallel resistors with the second formula would always produce higher precision than using the first one.
My question is:
- Which formula is better? $\frac{R_1R_2}{R_1+R_2}$ or $\frac{1}{\frac{1}{R1}+\frac{1}{R2}}$? Here "better" means provides higher precision.
- Why it is better than the other one? Please prove your answer to the first question.
Here is my effort
After many experiments, $\frac{1}{\frac{1}{R1}+\frac{1}{R2}}$ seems to be the better formula. I guess that the reason behind can be conclude as the fewer time uncertain numbers are repeated, the less uncertainty is introduced, and the higher precision we can get.
But that's not enough. I expect a more scientific and more rigorous answer.