Consider the function f(x) = (x) / (x+1)

Q. What is the approximate error in f(x) if x = 1000 ± 10% ?

```a. zero
b. ± 5%
c. ± 10%
d. ± 15%
e. ± 20%
```
`a. zero`

Observe that the value of f(x) will be close to 1 for any large value of x. Small variations in x should not significantly affect this result.

"Wait!", stammered the startled student (remembering an earlier lesson), "When dividing two values, the rule is to add the percentage errors, and that gives ± 20%".

Who's right? What's wrong?

When the Rules Seem to Fail

There is more than one way to approach this problem:

METHOD 1 Compute the derivative df(x)/dx

Using the calculus, df(x) = (x+1)-2 dx

For x = 1000, f(x) = 0.9990 ± 0.0001 This supports the near-zero error result.

METHOD 2 Try the worst case situations.

The worst case error, for x=900 or x=1100, gives

```f(1100) = 1100/1101 = 0.999
f(1000) = 1000/1001 = 0.999
f( 900) =  900/901  = 0.999
```
Which shows that variations in x really do not have much effect on the result.

METHOD 3 Use the shortcut rules for add, subtract, multiply, divide.

"When dividing two values, add the percentage errors in each"

Since the numerator and the denominator both have a 10% error, the total error should be 10 + 10 = 20%.

THIS IS CLEARLY INCORRECT, BUT WHY?

This shortcut method assumes that the numerator and denominator are unrelated values. This method works as expected for functions such as g(P,Q) = P/(1+Q). It fails in the case of f(x) = x/(1+x) because the same value with the same error is found twice.

To get the worst error in g(P,Q), P must be high when Q is low, or vice-versa.

```g(1100, 900) = 1100/901  = 1.221
g(1000,1000) = 1000/1001 = 0.999
g( 900,1100) =  900/1101 = 0.817
```
Which shows that the 20% error estimate really was correct under these conditions.

This situation can never happen for f(x). The appearance of x in both the numerator and the denominator ensures that any small error cancels out to give a negligible error.

Note that even in this example with f(P,Q), it is assumed that there is no hidden relationship connecting P and Q. If it was the case, for example, that P = 2Q, the results would be different.

Similarly, the derivative method of finding errors relies on an underlying assumption that different variables are uncorrelated.

Mathematics is a tool and, like laboratory instruments, knowing your tools is key to using them correctly.

EXAMPLE 1

Consider the case of: f(t) = t + t.

This may also be written: f(t) =2 t

If t has an error of 10%, then 2t has an error of 10%, the error in t+t is not 20%.

The Case of Parallel Resistors

Parallel resistors present a challenge for error analysis because the value of each resistor appears in both the numerator and the denominator.

This is a case where applying the simple rules for adding, multiplying, and dividing errored terms does not work.

As an example, let A and B be 1000 ohm resistors, each with a 10% tolerance.

Rtotal = 500 ohm

What is the error in Rtotal ?

Using a worst case analysis:

```R(1100,1100) = (1100 x 1100)/(1100 + 1100) = 550
R(1100, 900) = (1100 x  900)/(1100 +  900) = 495
R(1000,1000) = (1000 x 1000)/(1000 + 1000) = 500
R( 900,1100) = ( 900 x 1100)/( 900 + 1100) = 495
R( 900, 900) = ( 900 x  900)/( 900 +  900) = 450
```

These cases show 450 < Rtotal < 550, for about 10% error.

Parallel 10% tolerance resistors simply give 10% overall error.

A full solution requires computing the derivatives and adding the error contributions from resistors A and B.

This gives error = ( A2 dB + B2 dA ) / (A + B)2

In this example, A = 1000 ± 100, and B = 1000 ± 100,

error = ( 10002 x 100 + 10002 x 100 ) / (1000 + 1000)2 = 50

The result is Rtotal = 500 ± 50 ohm, as expected.

R.Tervo 1997
University of New Brunswick - Department of Electrical and Computer Engineering