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

Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form