For large numbers $|p|\gg1$ we want to compute $x=1-e^p$.

Is the problem for $|p|\gg 1$ well conditioned.

We have $$\kappa = \frac{\|x'\|}{\|x\|}\cdot \|p\|=\frac{\|-e^p\|}{\|1-e^p\|}\cdot \|p\|$$

If $p>0$ we have $$\kappa=\frac{e^p}{-1+e^p} \cdot p=\frac{pe^p}{e^p-1}\approx p$$ so the problem is ill conditioned.

If $p<0$ $$\kappa=\frac{e^p}{1-e^p}\cdot -p=\frac{-p e^p}{1-e^p}\approx -p e^p \to 0 ~(p\to-\infty),$$ so the problem is well conditioned. I am not sure if my work is correct.

  • $\begingroup$ It's when $|p|\ll 1$ that the problem is ill-conditioned. Then $e^p\approx 1$ and so the subtraction loses precision. $\endgroup$ – TonyK Jan 13 at 10:56
  • $\begingroup$ We are assuming $p$ is large in absolute value always. Be it negative or positive. $\endgroup$ – badatmath Jan 13 at 10:58
  • $\begingroup$ Then the problem is not ill-conditioned. $\endgroup$ – TonyK Jan 13 at 11:51
  • $\begingroup$ I fixed the obvious error in the derivative but otherwise I still have a large condition number for positive $p$. $\endgroup$ – badatmath Jan 13 at 11:57
  • $\begingroup$ The function $$y=\frac{\left|-e^x\right|}{\left|1-e^x\right|}\left|x\right|$$ explodes at $+\infty$ and tends to $0$ at $-\infty$ $\endgroup$ – badatmath Jan 13 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.