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













4












$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:



enter image description here



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:
enter image description here



So, is N[2Pi,5] exactly equal to $2pi$ or not? What does the function N actually do?










share|improve this question









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$



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
If this question can be reworded to fit the rules in the help center, please edit the question.











  • 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







  • 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






  • 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












$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:



enter image description here



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:
enter image description here



So, is N[2Pi,5] exactly equal to $2pi$ or not? What does the function N actually do?










share|improve this question









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$



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
If this question can be reworded to fit the rules in the help center, please edit the question.











  • 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







  • 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






  • 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








4


1



$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:



enter image description here



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:
enter image description here



So, is N[2Pi,5] exactly equal to $2pi$ or not? What does the function N actually do?










share|improve this question









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:



enter image description here



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:
enter image description here



So, is N[2Pi,5] exactly equal to $2pi$ or not? What does the function N actually do?







linear-algebra






share|improve this question









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.










share|improve this question









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.








share|improve this question




share|improve this question








edited May 25 at 12:54









David Richerby

1054




1054






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 May 24 at 18:03









York TsangYork Tsang

1235




1235




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.






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
If this question can be reworded to fit the rules in the help center, please edit the question.







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
If this question can be reworded to fit the rules in the help center, please edit the question.







  • 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







  • 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






  • 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




    $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




    $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




    $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










1 Answer
1






active

oldest

votes


















12












$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:




  1. w1 is not equal to w2, because N doesn't actually truncate 2 Pi to five digits


  2. Det[k-w^2*m] changes quickly, so any little inaccuracy in w becomes a big discrepancy in Det[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]


Mathematica graphics






share|improve this answer









$endgroup$












  • $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

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









12












$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:




  1. w1 is not equal to w2, because N doesn't actually truncate 2 Pi to five digits


  2. Det[k-w^2*m] changes quickly, so any little inaccuracy in w becomes a big discrepancy in Det[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]


Mathematica graphics






share|improve this answer









$endgroup$












  • $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















12












$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:




  1. w1 is not equal to w2, because N doesn't actually truncate 2 Pi to five digits


  2. Det[k-w^2*m] changes quickly, so any little inaccuracy in w becomes a big discrepancy in Det[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]


Mathematica graphics






share|improve this answer









$endgroup$












  • $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













12












12








12





$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:




  1. w1 is not equal to w2, because N doesn't actually truncate 2 Pi to five digits


  2. Det[k-w^2*m] changes quickly, so any little inaccuracy in w becomes a big discrepancy in Det[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]


Mathematica graphics






share|improve this answer









$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:




  1. w1 is not equal to w2, because N doesn't actually truncate 2 Pi to five digits


  2. Det[k-w^2*m] changes quickly, so any little inaccuracy in w becomes a big discrepancy in Det[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]


Mathematica graphics







share|improve this answer












share|improve this answer



share|improve this answer










answered May 24 at 18:38









Chris KChris K

8,18422347




8,18422347











  • $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$
    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$
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



Popular posts from this blog

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?