-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsol-2.14.tex
62 lines (51 loc) · 2.55 KB
/
sol-2.14.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Suppose we have a resistor labeled “$6.8$ ohms with $10\%$ tolerance”, and a resistor labeled “$4.7$ ohms with $5\%$ tolerance”:
\begtt\scm
(define r1 (make-center-percent 6.8 10))
(define r2 (make-center-percent 4.7 5))
\endtt
Then, if we use the procedure `par1` to compute the parallel-resistors formula, we get
\begtt\scm
(define rp1 (par1 r1 r2))
(lower-bound rp1)
;Value: 2.201031010873943
(upper-bound rp1)
;Value: 3.4873689182805854
(width rp1)
;Value: 0.6431689537033212
(center rp1)
;Value: 2.844199964577264
(percent rp1)
;Value: 22.613352145193346
\endtt
Instead, if we use `par2`, we get a different result:
\begtt\scm
(define rp2 (par2 r1 r2))
(lower-bound rp2)
;Value: 2.581558809636278
(upper-bound rp2)
;Value: 2.97332259363673
(width rp2)
;Value: 0.1958818920002261
(center rp2)
;Value: 2.777440701636504
(percent rp2)
;Value: 7.05260392723452
\endtt
We see that `par2` produces tighter bounds.
To better understand what's going on, let's define two intervals $A$ and $B$, and evaluate some arithmetic expressions that involve them:
\begtt\scm
(define a (make-center-percent 10 1))
(define b (make-center-percent 5 1))
(define a/b (div-interval a b))
(center a/b)
;Value: 2.001200480192077
(percent a/b)
;Value: 2.9994001199759954
(define a/a (div-interval a a))
(center a/a)
;Value: 1.0002000200020003
(percent a/a)
;Value: 1.9998000199979908
\endtt
The result we get when evaluating $A/B$ seems reasonable. In fact, the centre of $A/B$ is approximately the ratio between the centre of $A$ and the centre of $B$; and the percentage tolerance of $A/B$ is approximately the sum of the pergentage tolerances of $A$ and~$B$, in accordance with the result we got in exercise~\ref[2.13].
Instead, the result for $A/A$ seems wrong. It would be right if we were dividing two unrelated intervals with the same centres and widths. But, since we are dividing an interval by itself, we expect as result the exact value~$1$, that is the interval with centre~$1$ and tolerance $0\%$\fnote{The intervals $A$ and $B$ may represent the values of two different physical measurements, which we know with a given uncertainty. If we want to compute for some reason the ratio between $A$ and $B$, we expect to have some uncertainty on the result; if instead we compute the ratio between $A$ and itself, we expect the result to be exactly equal to~$1$ with no uncertainty, because whatever the exact value of $A$ is, the result of dividing it by itself is always~$1$.}. It's clear that our system cannot distinguish between the two cases, and treats all the intervals as if they were unrelated.