Trying to investigate and find the sensitivity of function

  • Context: MHB 
  • Thread starter Thread starter akerman
  • Start date Start date
  • Tags Tags
    Function Sensitivity
Click For Summary

Discussion Overview

The discussion revolves around the sensitivity of the function F(x) = sqrt(x) to errors in the input variable x, particularly when considering small perturbations (x + ϵ). Participants explore the concept of the Kappa value (condition number) and its implications for relative and absolute errors, especially at the point x = 0.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested, Mathematical reasoning

Main Points Raised

  • Some participants propose that the Kappa value for F(x) = sqrt(x) is 1/2, indicating the amplification of relative error.
  • It is noted that at x = 0, the Kappa value is not defined due to infinite relative error.
  • Participants discuss the calculation of Kappa using the formula: $$\kappa = \left| \frac{x \cdot F'(x)}{F(x)} \right|$$ and its limitations at points where derivatives are not defined.
  • One participant expresses confusion about the sensitivity of F(x) to errors in x and requests further clarification.
  • Another participant explains that the absolute sensitivity to errors in x is given by $$\frac{1}{2\sqrt{x}}$$ and the relative sensitivity is 1/2.
  • There is a discussion about how to interpret the question regarding the number of digits that can be computed for sqrt(x) when x is known to an error of 10^−16.
  • Participants clarify the distinction between absolute and relative errors in the context of significant digits.
  • One participant questions whether ε can be specified exactly or if it is merely assumed to be a small number.

Areas of Agreement / Disagreement

Participants generally agree on the definitions and implications of Kappa and sensitivity, but there is some confusion regarding the interpretation of errors and the specifics of how to quantify them in terms of digits. The discussion remains unresolved on certain aspects, particularly regarding the exact nature of ε.

Contextual Notes

Limitations include the undefined nature of Kappa at x = 0 and the potential ambiguity in the terms "how many digits" and "error" as used in the discussion.

akerman
Messages
26
Reaction score
0
I have a question about function F(x) = sqrt(x)

I found that it has Kappa value equal to 1/2

I am not too sure what happens if when x = 0 is it just a minimum?

But now I am trying to investigate and find the sensitivity of F(x) to errors in x when we use x+ϵ, where ϵ is small.
 
Physics news on Phys.org
Re: trying to investigate and find the sensitivity of function

akerman said:
I have a question about function F(x) = sqrt(x)

I found that it has Kappa value equal to 1/2

I am not too sure what happens if when x = 0 is it just a minimum?

But now I am trying to investigate and find the sensitivity of F(x) to errors in x when we use x+ϵ, where ϵ is small.

Welcome to MHB, akerman! :)

I am assuming that with a Kappa value you mean the condition number.
If so then we have:
$$\frac{|\Delta y|}{|y|} = \kappa \frac{|\Delta x|}{|x|}$$
where $y=F(x)$, where $\Delta x$ is the error in $x$, and $\Delta y$ is the error in $y$.
In other words: $\kappa$ gives the amplification of the relative error.

At $x=0$, $x$ has an infinite relative error (we're dividing by zero), so $\kappa$ is not defined there.
Since $F(0)=0$, the relative error of $y$ is also infinite.

We can calculate $\kappa$ with:
$$\kappa = \left| \frac{x \cdot F'(x)}{F(x)} \right|$$
This stems from the first order Taylor approximation:
$$F(x + \Delta x) \approx F(x) + \Delta x \cdot F'(x)$$

Since we are using an approximation, the end result is also an approximation.
In particular for points where $F'(x)$ or $F''(x)$ are not defined, the relationship will break down.
This is in particular the case for your function at $x=0$.
 
Re: trying to investigate and find the sensitivity of function

I like Serena said:
Welcome to MHB, akerman! :)

I am assuming that with a Kappa value you mean the condition number.
If so then we have:
$$\frac{|\Delta y|}{|y|} = \kappa \frac{|\Delta x|}{|x|}$$
where $y=F(x)$, where $\Delta x$ is the error in $x$, and $\Delta y$ is the error in $y$.
In other words: $\kappa$ gives the amplification of the relative error.

At $x=0$, $x$ has an infinite relative error (we're dividing by zero), so $\kappa$ is not defined there.
Since $F(0)=0$, the relative error of $y$ is also infinite.

We can calculate $\kappa$ with:
$$\kappa = \left| \frac{x \cdot F'(x)}{F(x)} \right|$$
This stems from the first order Taylor approximation:
$$F(x + \Delta x) \approx F(x) + \Delta x \cdot F'(x)$$

Since we are using an approximation, the end result is also an approximation.
In particular for points where $F'(x)$ or $F''(x)$ are not defined, the relationship will break down.
This is in particular the case for your function at $x=0$.

I still don't get it...
So what is the sensitivity of f(x) to errors in x?
And if we consider limit x→0, how many digits can one compute x√ when x is known to an error of 10^−16?

Can you give more detailed explanation.
thanks
 
Re: trying to investigate and find the sensitivity of function

akerman said:
I still don't get it...
So what is the sensitivity of f(x) to errors in x?

Since the derivative of $\sqrt x$ is $\frac 1 {2\sqrt x}$, Taylor's approximation gives us:
$$\sqrt{x+ε} \approx \sqrt{x} + ε \cdot \frac{1}{2\sqrt x}$$
So if the error in $x$ is $ε$, then the error in $√x$ is approximately $ε \cdot \frac{1}{2\sqrt x}$.

The so called absolute sensitivity to errors in x is $\frac{1}{2\sqrt x}$, since an error gets multiplied by this amount.

The relative sensitivity is $\frac 1 2$, since relative errors get multiplied by this amount.
A relative error is the error relative to the value measured. For $x$ this is $ε / x$.
And if we consider limit x→0, how many digits can one compute x√ when x is known to an error of 10^−16?

I do not understand your question.
In the limit x→0, √x is simply 0.

However, if x is a regular non-zero value known with an error of $10^{−16}$, then the resultant √x will have an absolute error of $10^{−16} \cdot \frac{1}{2\sqrt x}$ and a relative error of $0.5 \cdot 10^{−16}$.

Can you give more detailed explanation.
thanks

Where would you like more details?
 
The lastest answer is just something I was looking for.
So having a question such as "how many digits can one compute x√ when x is known to an error of 10^−16?" Can I simply say that absolute error of 10−16⋅12x√ and a relative error of 0.5⋅10^−16?
Also if we have x= x+ ε
Can I specify exactly what the ε is for y =x√ ? Or is it just an assumption that is it a small number?
 
akerman said:
The lastest answer is just something I was looking for.
So having a question such as "how many digits can one compute x√ when x is known to an error of 10^−16?" Can I simply say that absolute error of 10−16⋅12x√ and a relative error of 0.5⋅10^−16?

The term "how many digits" is somewhat confusing.
It can typically mean either how many digits behind the decimal point, or it can mean how many significant digits.
Can you clarify which one is intended?
Similarly, when you say "error" do you mean an absolute error or a relative error?

If you have 16 significant digits, that means that your relative error is $10^{-16}$.
In this case the resultant relative error is $0.5 \cdot 10^{-16}$, meaning you have slightly over 16 significant digits (usually treated as just 16).

What you write about the errors is correct, assuming your initial error is an absolute error.
However, that is apparently not what is being asked, since the question asks "how many digits".
Also if we have x= x+ ε
Can I specify exactly what the ε is for y =x√ ? Or is it just an assumption that is it a small number?

"Exactly" is a strong word.
If you want to have the "exact" error in y, you need to calculate $\sqrt{x+ε}-\sqrt x$.
If you are satisfied with the approximate error, you can use the formulas I gave.
 
Now I got it. Thanks for help. I believe you the only person in number of forum who could explain and answer it.
 

Similar threads

Replies
3
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 20 ·
Replies
20
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 25 ·
Replies
25
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 36 ·
2
Replies
36
Views
6K