0

I need to find an example of a differentiable function $f: \mathbb{R} \rightarrow \mathbb{R}$, such that for $x_1, x_2$ we get for the absolute and relative condition $K_{abs}(f, x_1)$ is high, $K_{rel}(f, x_1)$ is low and $K_{abs}(f, x_2)$ low, $K_{rel}(f, x_2)$ is high. It should not be the function $f(x) = 1-\sqrt{x}.$ I tried different options, but could not get the result. We set $K_{abs}(f, x):= |f'(x)|, K_{rel}(f, x) := \frac{|x|}{|f(x)|}K_{abs}.$ Any help is appreciated. Thanks.

user249018
  • 1,550
  • Would you tell us what $K_{abs}$ and $K_{rel}$ are? Presumably $1-\sqrt x$ satisfies this. Have you thought about what feature of $1-\sqrt x$ makes it happen? – Ross Millikan Nov 30 '22 at 02:41
  • Thanks. $K_{abs}(f,x), K_{rel}(f,x)$ are the absolute and relative condition of the function $f$ at some point $x,$ respectively. – user249018 Nov 30 '22 at 08:16
  • You are evading the central question of how the absolute and relative condition numbers are defined. There is more than one way to do that. How has it been done in your class? Where you give a formula that is valid when $f$ is differentiable or were you given an abstract definition involving a limit and a least upper bound? – Carl Christian Nov 30 '22 at 10:04
  • Thanks for the comment. Both definitions can be used. I therefore said at the beginning that $f$ is assumed to be differentiable everywhere in $\mathbb{R}.$ I found the function $f(x) = x - \frac{1}{x}$ is well conditioned in the absolute sense at the point $1$ and ill-conditioned in the absolute sense at the point $0.$ It is the opposite for the corresponding condition in the relative sense. But this function is not continuous at $0$. I need the function to be everywhere continuous in $\mathbb{R}.$ – user249018 Nov 30 '22 at 17:59
  • Add your definitions to your question. There is no condition number for your function $f$ at $0$ where it is not defined. – Carl Christian Dec 01 '22 at 02:04
  • I added the definitions to the posted question. – user249018 Dec 01 '22 at 08:25
  • Your comments on your own question do not trigger a notification unless you include a username. It was pure chance that I returned to your question. – Carl Christian Dec 05 '22 at 00:32

1 Answers1

1

Let $f : \mathbb{R} \rightarrow \mathbb{R}$ be given by $f(x) = \exp(x)$. Then $$ \kappa_{\text{rel}}(f,x) = |x|$$ and $$\kappa_{\text{abs}}(f,x) = \exp(x).$$ Now what is a large condition number? This is very context dependent and the question cannot be answered unless we consider the accuracy that is required by the underlying application as well as the hardware that is available. This answer adds a few more words to that issue. In our current situation there is of course no physical application/context and we can afford to be somewhat arbitrary. At $x_1 = -10^{12}$ the absolute condition number of $f$ is utterly insignificant and the computer's representation of that number is literally $0$. In contrast, the relative condition number of $f$ is so large that we cannot expect more that 4 correct significant digits when computing $f(y)$ for $y \approx x_1$ using IEEE double precision arithmetic for which the unit roundoff is $$u = 2^{-53} \approx 1.1 \times 10^{-16}.$$ At $x_2=1000$, the true value of absolute condition number of $f$ vastly exceeds the representational range of IEEE double precision. In contrast, the relative condition number is still modest compared with the unit roundoff and we expect 12 significant figures when computing $f(y)$ for $y \approx x_2$.

Many texts focus on the case where $f$ is differentiable and some text will even use the formulas that allow us to computed condition numbers as the actual definition of said condition numbers. This makes for fast writing, but obfuscates the fact that condition numbers represent the limit of the worst behavior of the function $f$. This answer to a related question discusses the issue.