# Combining uncertainty

## Alternative representation of intervals

The interval $$[x_{\min}, x_{\max}]$$ can also be written as $x ± Δx$ where $x = \frac{x_{\max} + x_{\min}}{2}\qquad Δx = \frac{x_{\max} - x_{\min}}{2}$

If the interval does not contain 0, then $$Δx$$ is smaller than $$x$$ (that is, if $$x_{\min}$$ and $$x_{\max}$$ have the same sign)

## We will assume that $$Δx$$ is smaller than $$x$$

In other words, we assume $\frac{Δx}{x} << 1$

## Combining Uncertainty

Sum of two measurements:
$(x ± Δx) + (y ± Δy) = (x+y) ± (Δx+Δy)$

Difference between measurements:
$(x ± Δx) - (y ± Δy) = (x-y) ± (Δx+Δy)$

## Multiplying Uncertainty

To calculate $$(x ± Δx) × (y ± Δy)$$ we first write $(x ± Δx) = x(1 ± Δx/x)\\ (y ± Δy) = y(1 ± Δy/y)$

Then we sum the relative errors $xy (1 ± (Δx/x + Δy/y))$

Finally we expand the result $xy ± xy(Δx/x + Δy/y)$

## Proof

\begin{aligned} (x ± Δx) (y ± Δy) & = x(1 ± Δx/x) y(1 ± Δy/y)\\ & = xy(1 ± Δx/x)(1 ± Δy/y) \\ & = xy(1 ± Δx/x ± Δy/y ± (Δx/x)(Δy/y)) \\ & ≈ xy(1 ± Δx/x + Δy/y) \\ & = xy ± xy(Δx/x + Δy/y)\\ \end{aligned}

We discard $$(Δx/x)(Δy/y)$$ because it is small

## 𝑥 squared

Using the previous formula, we have $(x ± Δx)^2 = x^2(1 ± Δx/x + Δx/x) = x^2(1 ± 2⋅Δx/x)$ Indeed \begin{aligned} (x ± Δx)^2 & = x^2(1 ± Δx/x)^2\\ & = x^2(1 ± 2Δx/x + (Δx/x)^2)\\ & ≈ x^2(1 ± 2Δx/x) \\ \end{aligned} because $$(Δx/x)^2$$ is very small and can be ignored

## Powers of 𝑥

Using the binomial theorem, we have $(1 + Δx/x)^n = \sum_{k=0}^n {n\choose k} (Δx/x)^k$ Since $$(Δx/x)^k$$ is very small for all $$k>1$$, we can ignore them $(1 + Δx/x)^n ≈ {n\choose 0} (Δx/x)^0 + {n\choose 1} (Δx/x)^1 = 1 + n(Δx/x)$

## Therefore

The result is valid also for $$-Δx/x$$, so we have $\left(1 ± \frac{Δx}{x}\right)^n ≈ 1 ± n\frac{Δx}{x}$ therefore we can write $(x ± Δx)^n =\left(x\left(1 ± \frac{Δx}{x}\right)\right)^n ≈ x^n\left(1 ± n\frac{Δx}{x}\right)$

## Square root of 𝑥

To calculate $$\sqrt{x+Δx}$$ we need to find $$\sqrt{1+Δx/x}$$

We will assume, as we have seen before, that $\sqrt{1+Δx/x}=1+a$ for some small $$a$$. We will have $(1+a)^2=1+Δx/x$

But $$(1+a)^2≈ 1+2a$$ when $$a$$ is small

## Since 𝑎 is small

$1+Δx/x = (1+a)^2 ≈ 1+2a$

Thus $$1+Δx/x≈ 1+2a$$ and we find $a=\frac 1 2 \frac{Δx}{x}$ Therefore $\sqrt{x±Δx}=\sqrt{x}⋅\sqrt{1+Δx/x} = \sqrt x \left(1 ± \frac 1 2 \frac{Δx}{x}\right)$

## Division

To calculate $$(x ± Δx)/(y ± Δy)$$ we do as in multiplication.
We calculate the relative errors and we sum them $\frac x y \left(1 ± \left(\frac{Δx} x + \frac{Δy} y \right)\right)$

Finally we expand the result $\frac x y ± \frac x y \left(\frac{Δx} x + \frac{Δy} y \right)$

## Why this is true?

To understand the formula for the division, we write it as a multiplication $\frac{x ± Δx}{y ± Δy} = (x ± Δx) × (y ± Δy)^{-1}$ and then we have $x\left(1 ± \frac{Δx} x \right) y^{-1}\left(1 ± \frac{Δy} y \right)^{-1} = \frac x y \left(1 ± \frac{Δx} x \right)\left(1 ± \frac{Δy} y \right)^{-1}$

## To finish we need another formula

We need an auxiliary step. This is a small parenthesis.
Let’s assume that $$r$$ is a small number ($$r<<1$$). If $S = 1+r+r^2+r^3+\cdots$ then we can multiply everything by $$r$$ and we get $rS = r+r^2+r^3+\cdots$ Then $$S - rS =1$$ and therefore $$S = \frac{1}{1-r} = (1-r)^{-1}$$

## In other words

$(1-r)^{-1} = 1+r+r^2+r^3+\cdots$ Since $$r$$ is very small, then $$r^2$$ is even much smaller, and so on.
Therefore $(1-r)^{-1} ≈ 1+r$

In the same way $(1+r)^{-1} = 1-r+r^2-r^3+\cdots ≈ 1-r$

## Putting it back…

…in the formula for division \begin{aligned} x\left(1 ± \frac{Δx} x \right)y^{-1}\left(1 ± \frac{Δy} y \right)^{-1} &= \frac x y \left(1 ± \frac{Δx} x \right)\left(1 ± \frac{Δy} y \right)^{-1}\\ &= \frac x y \left(1 ± \frac{Δx} x \right)\left(1 ± \frac{Δy} y \right) \end{aligned}

## General formula

Assuming that the errors are small,
we can find the error for any “reasonable” function

For any derivable function $$f$$ we have $f(x±Δx) ≈ f(x) ± \frac{df}{dx}(x)\cdot Δx$ This is proved using calculus (Taylor’s Theorem)

We will study it later

## Example 1

$\frac{dx^2}{dx}=2x$ therefore \begin{aligned} (x ±Δx)^2& = x^2 ± 2x\cdotΔx\\ & = x^2 ± 2x^2\cdot\frac{Δx}{x} \end{aligned}

## Example 2

$\frac{d\sqrt x}{dx}=\frac{1}{2\sqrt x}$ therefore \begin{aligned} \sqrt{x ±Δx}& = \sqrt x ± \frac{1}{2\sqrt x}\cdot Δx\\ & = \sqrt x ± \frac{1}{2}\sqrt x\cdot \frac{Δx}{x} \end{aligned}

## Summary of error propagation rules

\begin{aligned} (x ± Δx) + (y ± Δy) & = (x+y) ± (Δx+Δy)\\ (x ± Δx) - (y ± Δy) & = (x-y) ± (Δx+Δy)\\ (x ± Δx\%) \times (y ± Δy\%)& =xy ± (Δx\% + Δy\%)\\ (x ± Δx\%) ÷ (y ± Δy\%)& =x/y ± (Δx\% + Δy\%)\end{aligned}

Here $$Δx\%$$ represents the relative uncertainty, that is $$Δx/x$$

We use absolute uncertainty for + and -, and relative uncertainty for ⨉ and ÷

## Exercise

Calculate the uncertainty in the density of the stone ball