Inconsistent results from Wolfram Cloud [on hold]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
How can I offer a test ride while selling a bike?
Does Peach's float negate shorthop knockback multipliers?
How to detach yourself from a character you're going to kill?
How is it possible for this NPC to be alive during the Curse of Strahd adventure?
Is the decompression of compressed and encrypted data without decryption also theoretically impossible?
If a problem only occurs randomly once in every N times on average, how many tests do I have to perform to be certain that it's now fixed?
GFCI Outlet in Bathroom, Lights not working
Credit card offering 0.5 miles for every cent rounded up. Too good to be true?
Can I ask a publisher for a paper that I need for reviewing
How can I add depth to my story or how do I determine if my story already has depth?
What is the Process for Re-certifying Flight Hardware?
Rotated Position of Integers
How to split a string in two substrings of same length using bash?
Is it possible for people to live in the eye of a permanent hypercane?
Is it OK to bring delicacies from hometown as tokens of gratitude for an out-of-town interview?
Are there practical reasons to NOT use a stepper motor with lead screw for the X and or Y axes?
Is American Express widely accepted in France?
How can Iron Man's suit withstand this?
Does it cost a spell slot to cast a spell from a Ring of Spell Storing?
What's the correct term for a waitress in the Middle Ages?
NTP rollover-safe design with ESP8266 (Curiosity)
Is having a hidden directory under /etc safe?
Explain Ant-Man's "not it" scene from Avengers: Endgame
How can I grammatically understand "Wir über uns"?
Inconsistent results from Wolfram Cloud [on hold]
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$
put on hold as off-topic by Daniel Lichtblau, MarcoB, anderstood, Michael E2, Pinti yesterday
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, MarcoB, anderstood, Michael E2, Pinti
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$
put on hold as off-topic by Daniel Lichtblau, MarcoB, anderstood, Michael E2, Pinti yesterday
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, MarcoB, anderstood, Michael E2, Pinti
4
$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
May 24 at 18:39
5
$begingroup$
No,N[x, p]
, represents, if possible, the value ofx
approximated to a precision ofp
digits. Read the documentation onN
.
$endgroup$
– Michael E2
May 24 at 23:58
7
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
May 25 at 0:00
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 May 25 at 12:54
David Richerby
1054
1054
New contributor
asked May 24 at 18:03
York TsangYork Tsang
1235
1235
New contributor
New contributor
put on hold as off-topic by Daniel Lichtblau, MarcoB, anderstood, Michael E2, Pinti yesterday
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, MarcoB, anderstood, Michael E2, Pinti
put on hold as off-topic by Daniel Lichtblau, MarcoB, anderstood, Michael E2, Pinti yesterday
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, MarcoB, anderstood, Michael E2, Pinti
4
$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
May 24 at 18:39
5
$begingroup$
No,N[x, p]
, represents, if possible, the value ofx
approximated to a precision ofp
digits. Read the documentation onN
.
$endgroup$
– Michael E2
May 24 at 23:58
7
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
May 25 at 0:00
add a comment |
4
$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
May 24 at 18:39
5
$begingroup$
No,N[x, p]
, represents, if possible, the value ofx
approximated to a precision ofp
digits. Read the documentation onN
.
$endgroup$
– Michael E2
May 24 at 23:58
7
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
May 25 at 0:00
4
4
$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
May 24 at 18:39
$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
May 24 at 18:39
5
5
$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
May 24 at 23:58
$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
May 24 at 23:58
7
7
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
May 25 at 0:00
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
May 25 at 0:00
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
May 24 at 23:59
$begingroup$
Agreed, this is about numeric math and not Mathematica per se (as this response also notes).
$endgroup$
– Daniel Lichtblau
May 25 at 15:13
add a comment |
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
May 24 at 23:59
$begingroup$
Agreed, this is about numeric math and not Mathematica per se (as this response also notes).
$endgroup$
– Daniel Lichtblau
May 25 at 15:13
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
May 24 at 23:59
$begingroup$
Agreed, this is about numeric math and not Mathematica per se (as this response also notes).
$endgroup$
– Daniel Lichtblau
May 25 at 15:13
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 May 24 at 18:38
Chris KChris K
8,18422347
8,18422347
$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
May 24 at 23:59
$begingroup$
Agreed, this is about numeric math and not Mathematica per se (as this response also notes).
$endgroup$
– Daniel Lichtblau
May 25 at 15:13
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
May 24 at 23:59
$begingroup$
Agreed, this is about numeric math and not Mathematica per se (as this response also notes).
$endgroup$
– Daniel Lichtblau
May 25 at 15:13
$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
May 24 at 23:59
$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
May 24 at 23:59
$begingroup$
Agreed, this is about numeric math and not Mathematica per se (as this response also notes).
$endgroup$
– Daniel Lichtblau
May 25 at 15:13
$begingroup$
Agreed, this is about numeric math and not Mathematica per se (as this response also notes).
$endgroup$
– Daniel Lichtblau
May 25 at 15:13
add a comment |
4
$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
May 24 at 18:39
5
$begingroup$
No,
N[x, p]
, represents, if possible, the value ofx
approximated to a precision ofp
digits. Read the documentation onN
.$endgroup$
– Michael E2
May 24 at 23:58
7
$begingroup$
See reference.wolfram.com/language/tutorial/NumbersOverview.html, esp. the tutorials about exact, approximate and arbitrary-precision numbers.
$endgroup$
– Michael E2
May 25 at 0:00