0
$\begingroup$

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$?

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – user4552 Jun 15 '18 at 16:21
3
$\begingroup$

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$.

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

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$.

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

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.

$\endgroup$
1
$\begingroup$

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

$x$ is included between two extremal values : \begin{equation}\tag{1} x_{\text{min}} \equiv x_0 - \Delta x \le x \le x_{\text{max}} \equiv x_0 + \Delta x. \end{equation} 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 \begin{equation}\tag{5} \delta (e^x) = \frac{\Delta(e^x)}{e^{x_0}} = \sinh{\Delta x} \equiv \sinh{(x_0 \, \delta x )}. \end{equation} 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 : \begin{equation}\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)}. \end{equation} 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$.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.