Inconsistent results from Wolfram CouldFind Determinant/or Row Reduce parameter dependent matrixPack Solve results into a vectorHow to simplify symbolic matrix multiplication results?LUDecomposition does not give the expected resultsHow to interpret the results of PCAWhy do ReplaceAll and With give different results?Nearest non-collinear/non-coplanar pointsObtaining the determinant from a LinearSolveFunction objectRowReduction: Wolfram Alpha vs MathematicaEigenvectors calculation doesn't match from two identical results
Who will lead the country until there is a new Tory leader?
A Riley Respite
Website returning plaintext password
Alignment: "Breaking out" of environment (enumerate / minipage)
Plot twist where the antagonist wins
Count rotary dial pulses in a phone number (including letters)
How do I partition a matrx into blocks and replace zeros with dots?
Would Jetfuel for a modern jet like an F-16 or a F-35 be producable in the WW2 era?
Is it rude to call a professor by their last name with no prefix in a non-academic setting?
A steel cutting sword?
Does Nitrogen inside commercial airliner wheels prevent blowouts on touchdown?
Statue View: Tetrominoes
Is the Indo-European language family made up?
Compaq Portable vs IBM 5155 Portable PC
I know that there is a preselected candidate for a position to be filled at my department. What should I do?
Any advice on creating fictional locations in real places when writing historical fiction?
Teacher help me explain this to my students
Count Even Digits In Number
Gladys goes shopping
Do photons bend spacetime or not?
what kind of chord progession is this?
Where can I find visible/radio telescopic observations of the center of the Milky Way galaxy?
C++ forcing function parameter evalution order
Externally monitoring CPU/SSD activity without software access
Inconsistent results from Wolfram Could
Find Determinant/or Row Reduce parameter dependent matrixPack Solve results into a vectorHow to simplify symbolic matrix multiplication results?LUDecomposition does not give the expected resultsHow to interpret the results of PCAWhy do ReplaceAll and With give different results?Nearest non-collinear/non-coplanar pointsObtaining the determinant from a LinearSolveFunction objectRowReduction: Wolfram Alpha vs MathematicaEigenvectors calculation doesn't match from two identical results
$begingroup$
More specifically, I was using the "no sign-in" option of Wolfram Programming Lab
I was trying to solve a matrix problem, with the following code:
ClearAll["Global`*"]
m=2,0,0,1*2500;
k=3,-1,-1,1*20000 Pi^2;
w1=N[2Pi,5];
w2=6.2832;
D1=Det[k-w1^2*m]
D2=Det[k-w2^2*m]
Since the numerical values of w1 and w2 should be close, I expect the numerical values of D1 and D2 should also be close. Strangely, Wolfram Cloud gives very different values:
It took me a whole night to pin down this segment of code. I don't know if this is only due to my computer/browser, or some one else, if runs the same code, will have same problem? What happened?
Edit
Suppose I would like to compare the determinant using exact symbolic $2pi$ and function N[2Pi,5]
ClearAll["Global`*"]
m=2,0,0,1*2500;
k=3,-1,-1,1*20000 Pi^2;
w1=N[2Pi,5];
w2=2Pi;
D1=Det[k-w1^2*m]
D2=Det[k-w2^2*m]
The result is not exactly the same:
So, is N[2Pi,5]
exactly equal to $2pi$ or not? What does the function N
actually do?
linear-algebra
New contributor
York Tsang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
More specifically, I was using the "no sign-in" option of Wolfram Programming Lab
I was trying to solve a matrix problem, with the following code:
ClearAll["Global`*"]
m=2,0,0,1*2500;
k=3,-1,-1,1*20000 Pi^2;
w1=N[2Pi,5];
w2=6.2832;
D1=Det[k-w1^2*m]
D2=Det[k-w2^2*m]
Since the numerical values of w1 and w2 should be close, I expect the numerical values of D1 and D2 should also be close. Strangely, Wolfram Cloud gives very different values:
It took me a whole night to pin down this segment of code. I don't know if this is only due to my computer/browser, or some one else, if runs the same code, will have same problem? What happened?
Edit
Suppose I would like to compare the determinant using exact symbolic $2pi$ and function N[2Pi,5]
ClearAll["Global`*"]
m=2,0,0,1*2500;
k=3,-1,-1,1*20000 Pi^2;
w1=N[2Pi,5];
w2=2Pi;
D1=Det[k-w1^2*m]
D2=Det[k-w2^2*m]
The result is not exactly the same:
So, is N[2Pi,5]
exactly equal to $2pi$ or not? What does the function N
actually do?
linear-algebra
New contributor
York Tsang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
3
$begingroup$
Suppose small epsilon thenClearAll["Global`*"]; m=2,0,0,1*2500; k=3,-1,-1,1*20000 Pi^2; w1=2Pi+epsilon; FullSimplify[Det[k-w1^2*m]]
returns12500000*epsilon*(epsilon - 2*Pi)*(epsilon + 4*Pi)*(epsilon + 6*Pi)
and for small epsilon that is approximately 12500000*epsilon*-2*Pi*4*Pi*6*Pi== -600000000*epsilon*Pi^3` so any small error in w is multiplied by about 1.86*10^10 in the determinant.
$endgroup$
– Bill
7 hours ago
2
$begingroup$
No,N[x, p]
, represents, if possible, the value ofx
approximated to a precision ofp
digits. Read the documentation onN
.
$endgroup$
– Michael E2
2 hours ago
2
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
2 hours ago
add a comment |
$begingroup$
More specifically, I was using the "no sign-in" option of Wolfram Programming Lab
I was trying to solve a matrix problem, with the following code:
ClearAll["Global`*"]
m=2,0,0,1*2500;
k=3,-1,-1,1*20000 Pi^2;
w1=N[2Pi,5];
w2=6.2832;
D1=Det[k-w1^2*m]
D2=Det[k-w2^2*m]
Since the numerical values of w1 and w2 should be close, I expect the numerical values of D1 and D2 should also be close. Strangely, Wolfram Cloud gives very different values:
It took me a whole night to pin down this segment of code. I don't know if this is only due to my computer/browser, or some one else, if runs the same code, will have same problem? What happened?
Edit
Suppose I would like to compare the determinant using exact symbolic $2pi$ and function N[2Pi,5]
ClearAll["Global`*"]
m=2,0,0,1*2500;
k=3,-1,-1,1*20000 Pi^2;
w1=N[2Pi,5];
w2=2Pi;
D1=Det[k-w1^2*m]
D2=Det[k-w2^2*m]
The result is not exactly the same:
So, is N[2Pi,5]
exactly equal to $2pi$ or not? What does the function N
actually do?
linear-algebra
New contributor
York Tsang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
More specifically, I was using the "no sign-in" option of Wolfram Programming Lab
I was trying to solve a matrix problem, with the following code:
ClearAll["Global`*"]
m=2,0,0,1*2500;
k=3,-1,-1,1*20000 Pi^2;
w1=N[2Pi,5];
w2=6.2832;
D1=Det[k-w1^2*m]
D2=Det[k-w2^2*m]
Since the numerical values of w1 and w2 should be close, I expect the numerical values of D1 and D2 should also be close. Strangely, Wolfram Cloud gives very different values:
It took me a whole night to pin down this segment of code. I don't know if this is only due to my computer/browser, or some one else, if runs the same code, will have same problem? What happened?
Edit
Suppose I would like to compare the determinant using exact symbolic $2pi$ and function N[2Pi,5]
ClearAll["Global`*"]
m=2,0,0,1*2500;
k=3,-1,-1,1*20000 Pi^2;
w1=N[2Pi,5];
w2=2Pi;
D1=Det[k-w1^2*m]
D2=Det[k-w2^2*m]
The result is not exactly the same:
So, is N[2Pi,5]
exactly equal to $2pi$ or not? What does the function N
actually do?
linear-algebra
linear-algebra
New contributor
York Tsang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
York Tsang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 2 hours ago
York Tsang
New contributor
York Tsang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 8 hours ago
York TsangYork Tsang
1063
1063
New contributor
York Tsang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
York Tsang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3
$begingroup$
Suppose small epsilon thenClearAll["Global`*"]; m=2,0,0,1*2500; k=3,-1,-1,1*20000 Pi^2; w1=2Pi+epsilon; FullSimplify[Det[k-w1^2*m]]
returns12500000*epsilon*(epsilon - 2*Pi)*(epsilon + 4*Pi)*(epsilon + 6*Pi)
and for small epsilon that is approximately 12500000*epsilon*-2*Pi*4*Pi*6*Pi== -600000000*epsilon*Pi^3` so any small error in w is multiplied by about 1.86*10^10 in the determinant.
$endgroup$
– Bill
7 hours ago
2
$begingroup$
No,N[x, p]
, represents, if possible, the value ofx
approximated to a precision ofp
digits. Read the documentation onN
.
$endgroup$
– Michael E2
2 hours ago
2
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
2 hours ago
add a comment |
3
$begingroup$
Suppose small epsilon thenClearAll["Global`*"]; m=2,0,0,1*2500; k=3,-1,-1,1*20000 Pi^2; w1=2Pi+epsilon; FullSimplify[Det[k-w1^2*m]]
returns12500000*epsilon*(epsilon - 2*Pi)*(epsilon + 4*Pi)*(epsilon + 6*Pi)
and for small epsilon that is approximately 12500000*epsilon*-2*Pi*4*Pi*6*Pi== -600000000*epsilon*Pi^3` so any small error in w is multiplied by about 1.86*10^10 in the determinant.
$endgroup$
– Bill
7 hours ago
2
$begingroup$
No,N[x, p]
, represents, if possible, the value ofx
approximated to a precision ofp
digits. Read the documentation onN
.
$endgroup$
– Michael E2
2 hours ago
2
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
2 hours ago
3
3
$begingroup$
Suppose small epsilon then
ClearAll["Global`*"]; m=2,0,0,1*2500; k=3,-1,-1,1*20000 Pi^2; w1=2Pi+epsilon; FullSimplify[Det[k-w1^2*m]]
returns 12500000*epsilon*(epsilon - 2*Pi)*(epsilon + 4*Pi)*(epsilon + 6*Pi)
and for small epsilon that is approximately 12500000*epsilon*-2*Pi*4*Pi*6*Pi== -600000000*epsilon*Pi^3` so any small error in w is multiplied by about 1.86*10^10 in the determinant.$endgroup$
– Bill
7 hours ago
$begingroup$
Suppose small epsilon then
ClearAll["Global`*"]; m=2,0,0,1*2500; k=3,-1,-1,1*20000 Pi^2; w1=2Pi+epsilon; FullSimplify[Det[k-w1^2*m]]
returns 12500000*epsilon*(epsilon - 2*Pi)*(epsilon + 4*Pi)*(epsilon + 6*Pi)
and for small epsilon that is approximately 12500000*epsilon*-2*Pi*4*Pi*6*Pi== -600000000*epsilon*Pi^3` so any small error in w is multiplied by about 1.86*10^10 in the determinant.$endgroup$
– Bill
7 hours ago
2
2
$begingroup$
No,
N[x, p]
, represents, if possible, the value of x
approximated to a precision of p
digits. Read the documentation on N
.$endgroup$
– Michael E2
2 hours ago
$begingroup$
No,
N[x, p]
, represents, if possible, the value of x
approximated to a precision of p
digits. Read the documentation on N
.$endgroup$
– Michael E2
2 hours ago
2
2
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
2 hours ago
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
2 hours ago
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
I get the same result in Mathematica, so it's not a Mathematica Online issue. I don't think it's even a Mathematica issue. It's due to two factors:
w1
is not equal tow2
, becauseN
doesn't actually truncate2 Pi
to five digitsDet[k-w^2*m]
changes quickly, so any little inaccuracy inw
becomes a big discrepancy inDet[k-w^2*m]
To see #1:
w1 == 2 [Pi]
(* True *)
w1 - w2
(* -0.0000146928 *)
To see #2:
Plot[Det[k - w^2*m], w, 6.2831, 6.2833]
$endgroup$
$begingroup$
Regarding #1, it appears that the determinants calculated using $2pi$ andN[2Pi,5]
are not exactly the same. I have edited the question.
$endgroup$
– York Tsang
2 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
York Tsang is a new contributor. Be nice, and check out our Code of Conduct.
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%2fmathematica.stackexchange.com%2fquestions%2f199048%2finconsistent-results-from-wolfram-could%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$
I get the same result in Mathematica, so it's not a Mathematica Online issue. I don't think it's even a Mathematica issue. It's due to two factors:
w1
is not equal tow2
, becauseN
doesn't actually truncate2 Pi
to five digitsDet[k-w^2*m]
changes quickly, so any little inaccuracy inw
becomes a big discrepancy inDet[k-w^2*m]
To see #1:
w1 == 2 [Pi]
(* True *)
w1 - w2
(* -0.0000146928 *)
To see #2:
Plot[Det[k - w^2*m], w, 6.2831, 6.2833]
$endgroup$
$begingroup$
Regarding #1, it appears that the determinants calculated using $2pi$ andN[2Pi,5]
are not exactly the same. I have edited the question.
$endgroup$
– York Tsang
2 hours ago
add a comment |
$begingroup$
I get the same result in Mathematica, so it's not a Mathematica Online issue. I don't think it's even a Mathematica issue. It's due to two factors:
w1
is not equal tow2
, becauseN
doesn't actually truncate2 Pi
to five digitsDet[k-w^2*m]
changes quickly, so any little inaccuracy inw
becomes a big discrepancy inDet[k-w^2*m]
To see #1:
w1 == 2 [Pi]
(* True *)
w1 - w2
(* -0.0000146928 *)
To see #2:
Plot[Det[k - w^2*m], w, 6.2831, 6.2833]
$endgroup$
$begingroup$
Regarding #1, it appears that the determinants calculated using $2pi$ andN[2Pi,5]
are not exactly the same. I have edited the question.
$endgroup$
– York Tsang
2 hours ago
add a comment |
$begingroup$
I get the same result in Mathematica, so it's not a Mathematica Online issue. I don't think it's even a Mathematica issue. It's due to two factors:
w1
is not equal tow2
, becauseN
doesn't actually truncate2 Pi
to five digitsDet[k-w^2*m]
changes quickly, so any little inaccuracy inw
becomes a big discrepancy inDet[k-w^2*m]
To see #1:
w1 == 2 [Pi]
(* True *)
w1 - w2
(* -0.0000146928 *)
To see #2:
Plot[Det[k - w^2*m], w, 6.2831, 6.2833]
$endgroup$
I get the same result in Mathematica, so it's not a Mathematica Online issue. I don't think it's even a Mathematica issue. It's due to two factors:
w1
is not equal tow2
, becauseN
doesn't actually truncate2 Pi
to five digitsDet[k-w^2*m]
changes quickly, so any little inaccuracy inw
becomes a big discrepancy inDet[k-w^2*m]
To see #1:
w1 == 2 [Pi]
(* True *)
w1 - w2
(* -0.0000146928 *)
To see #2:
Plot[Det[k - w^2*m], w, 6.2831, 6.2833]
answered 7 hours ago


Chris KChris K
8,08722246
8,08722246
$begingroup$
Regarding #1, it appears that the determinants calculated using $2pi$ andN[2Pi,5]
are not exactly the same. I have edited the question.
$endgroup$
– York Tsang
2 hours ago
add a comment |
$begingroup$
Regarding #1, it appears that the determinants calculated using $2pi$ andN[2Pi,5]
are not exactly the same. I have edited the question.
$endgroup$
– York Tsang
2 hours ago
$begingroup$
Regarding #1, it appears that the determinants calculated using $2pi$ and
N[2Pi,5]
are not exactly the same. I have edited the question.$endgroup$
– York Tsang
2 hours ago
$begingroup$
Regarding #1, it appears that the determinants calculated using $2pi$ and
N[2Pi,5]
are not exactly the same. I have edited the question.$endgroup$
– York Tsang
2 hours ago
add a comment |
York Tsang is a new contributor. Be nice, and check out our Code of Conduct.
York Tsang is a new contributor. Be nice, and check out our Code of Conduct.
York Tsang is a new contributor. Be nice, and check out our Code of Conduct.
York Tsang is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Mathematica 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%2fmathematica.stackexchange.com%2fquestions%2f199048%2finconsistent-results-from-wolfram-could%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
3
$begingroup$
Suppose small epsilon then
ClearAll["Global`*"]; m=2,0,0,1*2500; k=3,-1,-1,1*20000 Pi^2; w1=2Pi+epsilon; FullSimplify[Det[k-w1^2*m]]
returns12500000*epsilon*(epsilon - 2*Pi)*(epsilon + 4*Pi)*(epsilon + 6*Pi)
and for small epsilon that is approximately 12500000*epsilon*-2*Pi*4*Pi*6*Pi== -600000000*epsilon*Pi^3` so any small error in w is multiplied by about 1.86*10^10 in the determinant.$endgroup$
– Bill
7 hours ago
2
$begingroup$
No,
N[x, p]
, represents, if possible, the value ofx
approximated to a precision ofp
digits. Read the documentation onN
.$endgroup$
– Michael E2
2 hours ago
2
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
2 hours ago