Check if the problem is well condtioned
$begingroup$
I'm trying to check if the problem of calculating the sum of two numbers a and b is well conditioned, provided that |a| > 2|b|.
In my solution i split it into cases:
1: a>0 and b>0,then
f(a,b)=a+b>3b
C(a,b)=Ca(a,b)+Cb(a,b)
where Ca(a,b)=|a(1)/(a+b)| and Cb(a,b)=|a(1)/(a+b)| then
C=|(a+b)/(a+b)|=1 so in this case problem is well conditioned
2: a>0 and b<0,then
f(a,b)=a+b<b
C(a,b)=Ca(a,b)+Cb(a,b)
where Ca(a,b)=|a(1)/(a+b)| and Cb(a,b)=|a(1)/(a+b)| then
C=|(a+b)/(a+b)|=1 so in this case problem is well conditioned
so it turns out that for each case it will be the same, but i have doubts that this is correct solution
numerical-methods
$endgroup$
add a comment |
$begingroup$
I'm trying to check if the problem of calculating the sum of two numbers a and b is well conditioned, provided that |a| > 2|b|.
In my solution i split it into cases:
1: a>0 and b>0,then
f(a,b)=a+b>3b
C(a,b)=Ca(a,b)+Cb(a,b)
where Ca(a,b)=|a(1)/(a+b)| and Cb(a,b)=|a(1)/(a+b)| then
C=|(a+b)/(a+b)|=1 so in this case problem is well conditioned
2: a>0 and b<0,then
f(a,b)=a+b<b
C(a,b)=Ca(a,b)+Cb(a,b)
where Ca(a,b)=|a(1)/(a+b)| and Cb(a,b)=|a(1)/(a+b)| then
C=|(a+b)/(a+b)|=1 so in this case problem is well conditioned
so it turns out that for each case it will be the same, but i have doubts that this is correct solution
numerical-methods
$endgroup$
2
$begingroup$
What do you mean by "if the problem of calculating the sum of two numbers $a, b$ is well conditioned"?
$endgroup$
– jordan_glen
Jan 20 at 23:31
$begingroup$
@jordan_glen The question is whether or not the sum is sensitive to small changes in the operands. This is a serious issue when we are dealing with approximations rather than the exact values of $a$ and $b$.
$endgroup$
– Carl Christian
Jan 22 at 9:31
add a comment |
$begingroup$
I'm trying to check if the problem of calculating the sum of two numbers a and b is well conditioned, provided that |a| > 2|b|.
In my solution i split it into cases:
1: a>0 and b>0,then
f(a,b)=a+b>3b
C(a,b)=Ca(a,b)+Cb(a,b)
where Ca(a,b)=|a(1)/(a+b)| and Cb(a,b)=|a(1)/(a+b)| then
C=|(a+b)/(a+b)|=1 so in this case problem is well conditioned
2: a>0 and b<0,then
f(a,b)=a+b<b
C(a,b)=Ca(a,b)+Cb(a,b)
where Ca(a,b)=|a(1)/(a+b)| and Cb(a,b)=|a(1)/(a+b)| then
C=|(a+b)/(a+b)|=1 so in this case problem is well conditioned
so it turns out that for each case it will be the same, but i have doubts that this is correct solution
numerical-methods
$endgroup$
I'm trying to check if the problem of calculating the sum of two numbers a and b is well conditioned, provided that |a| > 2|b|.
In my solution i split it into cases:
1: a>0 and b>0,then
f(a,b)=a+b>3b
C(a,b)=Ca(a,b)+Cb(a,b)
where Ca(a,b)=|a(1)/(a+b)| and Cb(a,b)=|a(1)/(a+b)| then
C=|(a+b)/(a+b)|=1 so in this case problem is well conditioned
2: a>0 and b<0,then
f(a,b)=a+b<b
C(a,b)=Ca(a,b)+Cb(a,b)
where Ca(a,b)=|a(1)/(a+b)| and Cb(a,b)=|a(1)/(a+b)| then
C=|(a+b)/(a+b)|=1 so in this case problem is well conditioned
so it turns out that for each case it will be the same, but i have doubts that this is correct solution
numerical-methods
numerical-methods
edited Jan 20 at 23:50


Ross Millikan
298k24200374
298k24200374
asked Jan 20 at 23:28
Adam StawarekAdam Stawarek
132
132
2
$begingroup$
What do you mean by "if the problem of calculating the sum of two numbers $a, b$ is well conditioned"?
$endgroup$
– jordan_glen
Jan 20 at 23:31
$begingroup$
@jordan_glen The question is whether or not the sum is sensitive to small changes in the operands. This is a serious issue when we are dealing with approximations rather than the exact values of $a$ and $b$.
$endgroup$
– Carl Christian
Jan 22 at 9:31
add a comment |
2
$begingroup$
What do you mean by "if the problem of calculating the sum of two numbers $a, b$ is well conditioned"?
$endgroup$
– jordan_glen
Jan 20 at 23:31
$begingroup$
@jordan_glen The question is whether or not the sum is sensitive to small changes in the operands. This is a serious issue when we are dealing with approximations rather than the exact values of $a$ and $b$.
$endgroup$
– Carl Christian
Jan 22 at 9:31
2
2
$begingroup$
What do you mean by "if the problem of calculating the sum of two numbers $a, b$ is well conditioned"?
$endgroup$
– jordan_glen
Jan 20 at 23:31
$begingroup$
What do you mean by "if the problem of calculating the sum of two numbers $a, b$ is well conditioned"?
$endgroup$
– jordan_glen
Jan 20 at 23:31
$begingroup$
@jordan_glen The question is whether or not the sum is sensitive to small changes in the operands. This is a serious issue when we are dealing with approximations rather than the exact values of $a$ and $b$.
$endgroup$
– Carl Christian
Jan 22 at 9:31
$begingroup$
@jordan_glen The question is whether or not the sum is sensitive to small changes in the operands. This is a serious issue when we are dealing with approximations rather than the exact values of $a$ and $b$.
$endgroup$
– Carl Christian
Jan 22 at 9:31
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
The condition number of adding two real numbers $a$ and $b$ is $$kappa(a,b) = frac{|a|+|b|}{|a+b|}.$$
It follows that the problem is ill-conditioned when $a+b approx 0$. Now if $|a| ge 2|b|$ or if $|b| ge 2|a|$, then $$kappa(a,b) leq 3.$$
It follows that the problem is well conditioned when the absolute value of one number is as least twice as large as the absolute value of the other. The proof is an exercise in applying the triangle inequality. Now, suppose $|a| ge 2|b|$. Then $$|a+b| = |a-(-b)| ge ||a|-|b|| ge |a|-|b| ge |a| - frac{1}{2}|a| = frac{1}{2}|a|.$$
Moreover, $$|a| + |b| leq |a| + frac{1}{2}|a| = frac{3}{2}|a|.$$ It follows that
$$ kappa(a,b) leq frac{frac{3}{2}|a|}{frac{1}{2}|a|} = 3.$$
The case of $|b| ge |a|$ follows immediately from the fact that $$kappa(a,b) = kappa(b,a).$$
Deriving this condition number rigorously from first principles is good subject for a follow-up question. One half of the proof is given in this answer which deals with the equivalent case of subtraction. Proving equality requires slightly more work.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3081266%2fcheck-if-the-problem-is-well-condtioned%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The condition number of adding two real numbers $a$ and $b$ is $$kappa(a,b) = frac{|a|+|b|}{|a+b|}.$$
It follows that the problem is ill-conditioned when $a+b approx 0$. Now if $|a| ge 2|b|$ or if $|b| ge 2|a|$, then $$kappa(a,b) leq 3.$$
It follows that the problem is well conditioned when the absolute value of one number is as least twice as large as the absolute value of the other. The proof is an exercise in applying the triangle inequality. Now, suppose $|a| ge 2|b|$. Then $$|a+b| = |a-(-b)| ge ||a|-|b|| ge |a|-|b| ge |a| - frac{1}{2}|a| = frac{1}{2}|a|.$$
Moreover, $$|a| + |b| leq |a| + frac{1}{2}|a| = frac{3}{2}|a|.$$ It follows that
$$ kappa(a,b) leq frac{frac{3}{2}|a|}{frac{1}{2}|a|} = 3.$$
The case of $|b| ge |a|$ follows immediately from the fact that $$kappa(a,b) = kappa(b,a).$$
Deriving this condition number rigorously from first principles is good subject for a follow-up question. One half of the proof is given in this answer which deals with the equivalent case of subtraction. Proving equality requires slightly more work.
$endgroup$
add a comment |
$begingroup$
The condition number of adding two real numbers $a$ and $b$ is $$kappa(a,b) = frac{|a|+|b|}{|a+b|}.$$
It follows that the problem is ill-conditioned when $a+b approx 0$. Now if $|a| ge 2|b|$ or if $|b| ge 2|a|$, then $$kappa(a,b) leq 3.$$
It follows that the problem is well conditioned when the absolute value of one number is as least twice as large as the absolute value of the other. The proof is an exercise in applying the triangle inequality. Now, suppose $|a| ge 2|b|$. Then $$|a+b| = |a-(-b)| ge ||a|-|b|| ge |a|-|b| ge |a| - frac{1}{2}|a| = frac{1}{2}|a|.$$
Moreover, $$|a| + |b| leq |a| + frac{1}{2}|a| = frac{3}{2}|a|.$$ It follows that
$$ kappa(a,b) leq frac{frac{3}{2}|a|}{frac{1}{2}|a|} = 3.$$
The case of $|b| ge |a|$ follows immediately from the fact that $$kappa(a,b) = kappa(b,a).$$
Deriving this condition number rigorously from first principles is good subject for a follow-up question. One half of the proof is given in this answer which deals with the equivalent case of subtraction. Proving equality requires slightly more work.
$endgroup$
add a comment |
$begingroup$
The condition number of adding two real numbers $a$ and $b$ is $$kappa(a,b) = frac{|a|+|b|}{|a+b|}.$$
It follows that the problem is ill-conditioned when $a+b approx 0$. Now if $|a| ge 2|b|$ or if $|b| ge 2|a|$, then $$kappa(a,b) leq 3.$$
It follows that the problem is well conditioned when the absolute value of one number is as least twice as large as the absolute value of the other. The proof is an exercise in applying the triangle inequality. Now, suppose $|a| ge 2|b|$. Then $$|a+b| = |a-(-b)| ge ||a|-|b|| ge |a|-|b| ge |a| - frac{1}{2}|a| = frac{1}{2}|a|.$$
Moreover, $$|a| + |b| leq |a| + frac{1}{2}|a| = frac{3}{2}|a|.$$ It follows that
$$ kappa(a,b) leq frac{frac{3}{2}|a|}{frac{1}{2}|a|} = 3.$$
The case of $|b| ge |a|$ follows immediately from the fact that $$kappa(a,b) = kappa(b,a).$$
Deriving this condition number rigorously from first principles is good subject for a follow-up question. One half of the proof is given in this answer which deals with the equivalent case of subtraction. Proving equality requires slightly more work.
$endgroup$
The condition number of adding two real numbers $a$ and $b$ is $$kappa(a,b) = frac{|a|+|b|}{|a+b|}.$$
It follows that the problem is ill-conditioned when $a+b approx 0$. Now if $|a| ge 2|b|$ or if $|b| ge 2|a|$, then $$kappa(a,b) leq 3.$$
It follows that the problem is well conditioned when the absolute value of one number is as least twice as large as the absolute value of the other. The proof is an exercise in applying the triangle inequality. Now, suppose $|a| ge 2|b|$. Then $$|a+b| = |a-(-b)| ge ||a|-|b|| ge |a|-|b| ge |a| - frac{1}{2}|a| = frac{1}{2}|a|.$$
Moreover, $$|a| + |b| leq |a| + frac{1}{2}|a| = frac{3}{2}|a|.$$ It follows that
$$ kappa(a,b) leq frac{frac{3}{2}|a|}{frac{1}{2}|a|} = 3.$$
The case of $|b| ge |a|$ follows immediately from the fact that $$kappa(a,b) = kappa(b,a).$$
Deriving this condition number rigorously from first principles is good subject for a follow-up question. One half of the proof is given in this answer which deals with the equivalent case of subtraction. Proving equality requires slightly more work.
answered Jan 22 at 9:26


Carl ChristianCarl Christian
5,8031723
5,8031723
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3081266%2fcheck-if-the-problem-is-well-condtioned%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
$begingroup$
What do you mean by "if the problem of calculating the sum of two numbers $a, b$ is well conditioned"?
$endgroup$
– jordan_glen
Jan 20 at 23:31
$begingroup$
@jordan_glen The question is whether or not the sum is sensitive to small changes in the operands. This is a serious issue when we are dealing with approximations rather than the exact values of $a$ and $b$.
$endgroup$
– Carl Christian
Jan 22 at 9:31