# How to calculate the percentage error of $e^x$ if percentage error in measuring $x$ is given?

How to calculate the error of $e^x$ if percentage error in measuring $x$ is given?

My attempt: calculate the ln or natural log of given function which we usually do in case of exponential function. Then we differentiate that. Then we get equation for plugging in to get the error. But in this case ln of function is x. By differentiating we get 1. So my question is that right. I mean the error would be 1 always and doesn't matter for errors made in x. Is that right. Or I'm wrong anywhere ? Suppose we have a error of n% in calculation of x. Then what should be percentage error in calculation of $e^x$?

• Suppose we have a error of n% in calculation of x. Then what should be percentage error in calculation of $e^x$? Note that the relative or percent error in $e^x$ is more directly related to the absolute error in x in this case. – user4552 Jun 15 '18 at 16:21

The technique you're using is based on the formula \begin{align} \text{if }y&=f(x) \\ \text{then }\sigma_y &= f'(x)\, \sigma_x. \end{align} The last is often written as $\Delta y = \frac{\operatorname{d}y}{\operatorname{d}x} \Delta x$. Notice: you have to multiply the derivative by the uncertainty in $x$. Also, this formula only works under a few technical assumptions, the most important of which is that $\sigma_x f''(x) < f'(x)$ so that the curvature and higher order terms in the Taylor series of $f$ can be neglected.

In this case $f(x)=\mathrm{e}^x$ and $f'(x)=\mathrm{e}^x$.

The method you outline can work, but it's base on implicit differentiation. It would work something like this: \begin{align} \ln y &= x\\ \frac{1}{y} \frac{\operatorname{d}y}{\operatorname{d}x}&=1 \Rightarrow \\ \frac{\operatorname{d}y}{\operatorname{d}x}&=y\Rightarrow \\ \sigma_y&=y\sigma_x. \end{align}

To calculate the percentage error in x or y, just divide both sides of the standard equation by $xy$: \begin{align} \frac{\sigma_y}{xy}&= f'(x) \frac{\sigma_x}{xy} \Rightarrow \\ \frac{\sigma_y}{y} &= x \frac{\operatorname{d}\ln f(x)}{\operatorname{d} x} \left(\frac{\sigma_x}{x}\right)\\ \Delta_{\%}y & = x \frac{\operatorname{d}\ln f(x)}{\operatorname{d} x} \Delta_{\%}x. \end{align} So, if $y=\mathrm{e}^{kx}$ then $\Delta_{\%}y = kx \Delta_{\%}x$.

• Please see the question again. – Nobody recognizeable Jun 15 '18 at 8:47

The error propagates via the derivative of the function of the variable in which there is uncertainty. This means that if $x$ has uncertainty $\Delta x$, the uncertainty of a function $f(x)$ is given by $$\Delta f \approx \frac{df}{dx} \Delta x.$$ This can be seen by a first-order Taylor expansion. For the case of $f(x) = e^x$, we have $\Delta(e^x) = e^x \Delta x$.

• Please see the question again. – Nobody recognizeable Jun 15 '18 at 8:47
• This is one approach. There is also the functional approach. I would recommend pointing out this method is not the only one. – JamalS Jun 15 '18 at 13:37
• @user187604: Could you explain what it is about this answer that is not satisfying you? It looks right to me. – user4552 Jun 15 '18 at 16:20

The methods given in other answers are only roughly true if the uncertainty in $x$ is small compared with $x$. A less approximate way is to generate a set of $x$ values drawn from your estimate of the distribution of $x$ (e.g. maybe you assume this is a normal distribution with a $\sigma$ given by your error in $x$), then you take the exponent of these values and that gives you your probability distribution of $\exp(x)$, from which you can estimate a mean and standard deviation (or any other confidence interval).

In particular, note that if the probability distribution of $x$ is symmetric, the probability distribution of $\exp(x)$ is not.

Here's my take, while I'm eating my breakfast.

$x$ is included between two extremal values : $$\tag{1} x_{\text{min}} \equiv x_0 - \Delta x \le x \le x_{\text{max}} \equiv x_0 + \Delta x.$$ Then compute the extremal values of $e^x$ : \begin{align} (e^x)_{\text{min}} &= e^{x_{\text{min}}} \equiv e^{x_0} \, e^{-\, \Delta x}, \tag{2} \\[12pt] (e^x)_{\text{max}} &= e^{x_{\text{max}}} \equiv e^{x_0} \, e^{+\, \Delta x}, \tag{3} \end{align} The uncertainty in $e^x$ is then the following : \begin{align} \Delta(e^x) &= \frac{(e^x)_{\text{max}} - (e^x)_{\text{min}}}{2} \\[12pt] &= e^{x_0} \, \frac{e^{\Delta x} - e^{-\, \Delta x}}{2} \equiv e^{x_0} \, \sinh{\Delta x}. \tag{4} \end{align} The relative uncertainty (in percentage) is $$\tag{5} \delta (e^x) = \frac{\Delta(e^x)}{e^{x_0}} = \sinh{\Delta x} \equiv \sinh{(x_0 \, \delta x )}.$$ The last expression appears to be a little strange to me, but I think it should be the right answer to your query, if $\Delta x \ll |\, x_0|$.

EDIT: The average value of $e^x$ is this : \begin{align} \langle \, e^x \rangle &= \frac{(e^x)_{\text{max}} + (e^x)_{\text{min}}}{2} \\[12pt] &= e^{x_0} \, \cosh{\Delta x}, \tag{6} \end{align} so the proper relative uncertainty in $e^x$ should be this instead : $$\tag{7} \delta (e^x) = \frac{\Delta(e^x)}{\langle \, e^x \rangle} = \frac{\sinh{\Delta x}}{\cosh{\Delta x}} \equiv \tanh{(\Delta x )} = \tanh{(e^{x_0} \, \delta x)}.$$ If $|\, x_0| \approx 0$ and $\delta x = n\%$, then $\delta(e^x) \approx \tanh{n}$.

If $x_0 > 0$ and $x_0 \gg 1$ and $\delta x = n$ is not a too small percentage, then $\delta(e^x) \approx \tanh{(\infty)} = 1 = 100\%$.

If $x_0 < 0$ and $|\, x_0| \gg 1$, then $\delta(e^x) \approx e^{x_0} \, \delta x$.