# Calculating error of a multi-varialbe function

1. Jan 17, 2010

### hkBattousai

I have a function defined as:

y = f(x1, x2, x3,... , xn)

xi has an error of ei, where 1 <= i <= n.

How can I calculate the error of y in terms of e1,...,en?

2. Jan 17, 2010

### mathman

It depends explicitly on the functional form of f as well as any dependencies among the Xi.

3. Jan 17, 2010

### hkBattousai

So what is this dependancy, is there a general formula?

For instance, how do you calculate,
p = v . i (errors: ep, ev and ei)
R = v / i (errors: eR, ev and ei)
errors of "p" and "R"?

4. Jan 18, 2010

### HallsofIvy

Staff Emeritus
If the errors in x1, x2, ..., xn are e1, e2, ..., en, respectively, then the error in f(x1, x2, ..., xn) is $E(f)= \frac{\partial f}{\partial x_1}e_1+ \frac{\partial f}{\partial x_2}e_2+ \cdot\cdot\cdot\frac{\partial f}{\partial x_n}e_n$, approximately. (Approximately because we are using the derivative rather than the actual difference- but that will give a good upper bound on the possible error.)

In particular, if O(x,y)= x+ y then $e_o= 1(e_x)+ 1(e_y)= e_x+ e_y$, if P(v, i)= vi, then $e_p= i e_v+ v e_i$ and if P(v, i)= v/i= vi-1, then $e_R= i^{-1} e_v- vi^{-2}e_i$

Notice that
$$\frac{e_P}{P}= \frac{i}{vi}e_v+ \frac{v}{vi} e_i= \frac{e_v}{v}+ \frac{e_i}{i}$$
and
$$\frac{e_R}{R}= \frac{e_v}{v}- \frac{e_i}{i}$$

illustrating an old mechanics "rule of thumb": if measurements are added, their errors add and if errors are multiplied, their relative errors add.

Last edited: Jan 18, 2010
5. Jan 18, 2010

### hkBattousai

Those are some great formulas, thank you very much.