[Math] Absolute and Relative Error of $x^y$

error-propagation

Suppose that we have two measured values $x$ and $y$ with maximum absolute errors of $e_x$ and $e_y$.

Is there a formula to find a good upper bound for absolute and relative error of $x^y$?

Best Answer

The notation gets confusing, so allow me to set $e_x=\epsilon_x$ and $e_y=\epsilon_y$. The trick here is to observe that $x^y = e^{y \log{x}}$ and Taylor expand as follows:

$$\begin{align}(x+\epsilon_x)^{y+\epsilon_y} &= e^{(y+\epsilon_y)\log{(x+\epsilon_x)}}\\ &=e^{y \log{(x+\epsilon_x)}} e^{\epsilon_y \log{(x+\epsilon_x)}} \\ &= e^{y \log{x} + y \log{(1+\epsilon_x/x)}}\left [1+ \epsilon_y \log{(x+\epsilon_x)}+ O(\epsilon_y^2)\right]\\ &= x^y e^{y[\epsilon_x/x + O(\epsilon_x^2)] } \left [1+ \epsilon_y \log{x} +\epsilon_y \log{(1+\epsilon_x/x)}+ O(\epsilon_y^2)\right]\\ &= x^y \left (1+ \epsilon_x\frac{y}{x} + O(\epsilon_x^2)\right )\left [1+ \epsilon_y \log{x} +\epsilon_y \frac{\epsilon_x}{x}+ O(\epsilon_y^2) + O(\epsilon_x^2 \epsilon_y)\right]\\ &= x^y \left (1 + \epsilon_x\frac{y}{x} + \epsilon_y \log{x} + \left( \frac{1+y \log{x}}{x}\right )\epsilon_x \epsilon_y+ O(\epsilon_y^2) + O(\epsilon_x^2 \epsilon_y) \right) \end{align}$$

If you wish to ignore all second-order error terms, then you have

$$(x+\epsilon_x)^{y+\epsilon_y} \approx x^y \left (1 + \epsilon_x\frac{y}{x} + \epsilon_y \log{x} \right )$$