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
I unknowingly submitted plagarised work
Are these reasonable traits for someone with autism?
Should I disclose a colleague's illness (that I should not know) when others badmouth him
What does this symbol on the box of power supply mean?
Statue View: Tetrominoes
Externally monitoring CPU/SSD activity without software access
Where can I find visible/radio telescopic observations of the center of the Milky Way galaxy?
Should one buy new hardware after a system compromise?
Plot twist where the antagonist wins
Is real public IP Address hidden when using a system wide proxy in Windows 10?
Why did David Cameron offer a referendum on the European Union?
Inconsistent results from Wolfram Could
Construct a word ladder
C++ forcing function parameter evalution order
The art of clickbait captions
Is it possible to play as a necromancer skeleton?
How strong are Wi-Fi signals?
Where's this lookout in Nova Scotia?
Teacher help me explain this to my students
Is DateWithin30Days(Date 1, Date 2) an Apex Method?
How to illustrate the Mean Value theorem?
Why does Mjolnir fall down in Age of Ultron but not in Endgame?
How did these characters "suit up" so quickly?
Count Even Digits In Number
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
$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
$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
8 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
$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
New contributor
edited 2 hours ago
York Tsang
New contributor
asked 8 hours ago
York TsangYork Tsang
1063
1063
New contributor
New contributor
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
8 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
8 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
8 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
8 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 8 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
8 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