# Involving Errors In Calculations

1. Apr 3, 2005

### richnfg

Say I wanted to do a calculation with numbers that had an error attached...what would the error be on the final answer?

For example, say I was trying to work out the distance v in relation to lenses etc. by this formula:

$$\frac{1}{v}=\frac{1}{u}+\frac{1}{f}$$

say u was 50cm plus or minus (cant find the symbol) 5mm
and f was 10cm plus or minus 5mm

what would the error be on the final answer?

Thanks!

2. Apr 3, 2005

### SpaceTiger

Staff Emeritus
Error propagation can be expressed most easily with calculus. If you have a function in terms of one variable, you can calculate the uncertainty on that function by simply seeing how it changes as a function of that one variable. That is:

$$f=f(x)$$
$$\Delta f=\frac{\partial f}{\partial x}\vert_{x_0}\Delta x$$

where $$\Delta$$ indicates the uncertainty (or error) and x0 is the measured value of the variable. However, your function is of two variables, so it turns out that you have to combine the derivatives in quadrature to get the total error on f:

$$f=f(x,y)$$
$$\Delta f=\sqrt{(\frac{\partial f}{\partial x}\vert_{x_0}\Delta x)^2+(\frac{\partial f}{\partial y}\vert_{y_0}\Delta y)^2}$$

Can you calculate what this gives for your case?

3. Apr 3, 2005

### richnfg

wow, sorry but that really confused me. :(

Isn't there a simplier way?

4. Apr 3, 2005

### Staff: Mentor

You can also do it without calculus. Take the error in each quantity one by one, calculate the effect that it alone has on the final result, then add those effects in quadrature. Using richnfg's equation:

First calculate $v$ without using the errors on $u$ and $f$ at all.

$$\frac {1}{v} = \frac {1}{u} + \frac {1}{f}[/itex] Next, change $u$ by its error and recalculate $v$. Let's call this $v_u$: [tex]\frac {1}{v_u} = \frac {1}{u + \Delta u} + \frac {1}{f}[/itex] Next, go back to the original $u$, change $f$ by its error, and recalculate $v$. Let's call this $v_f$: [tex]\frac {1}{v_f} = \frac {1}{u} + \frac {1}{f + \Delta f}[/itex] Calculate the differences: [tex]\Delta v_u = v_u - v$$

$$\Delta v_f = v_f - v$$

and add them in quadrature to get the total error in $v$:

$$\Delta v = \sqrt {(\Delta v_u)^2 + (\Delta v_f)^2}[/itex] This method gives the same result as SpaceTiger's method with the derivatives, in the limit as the errors approach zero. 5. Apr 3, 2005 ### SpaceTiger Staff Emeritus Well, if you don't know calculus, then the simplest way is to use the standard rules for error propagation. For example: [tex]f(x,y)=x+y$$
$$\Delta f=\sqrt{(\Delta x)^2+(\Delta y)^2}$$

$$f(y)=1/y$$
$$\frac{\Delta f}{f}=-\frac{\Delta y}{y}$$
$$\Delta f = -\frac{\Delta y}{y^2}$$

You can combine those two to get the error on your equation.

EDIT: If your errors are small relative to the value of the measurements, jtbell's suggestion is good too...and perhaps a bit easier to think about.

EDIT 2: Also note that the "f" that I'm using is not the focal length in your equation. It's an arbitrary function.

Last edited: Apr 3, 2005