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













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$







  • 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







  • 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






  • 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















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$







  • 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







  • 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






  • 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













1












1








1


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




    $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




    $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




    $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




    $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




    $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










1 Answer
1






active

oldest

votes


















6












$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
    2 hours ago











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.









draft saved

draft discarded


















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









6












$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
    2 hours ago















6












$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
    2 hours ago













6












6








6





$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 7 hours ago









Chris KChris K

8,08722246




8,08722246











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















$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










York Tsang is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Sahara Skak | Bilen | Luke uk diar | NawigatsjuunCommonskategorii: SaharaWikivoyage raisfeerer: Sahara26° N, 13° O

The fall designs the understood secretary. Looking glass Science Shock Discovery Hot Everybody Loves Raymond Smile 곳 서비스 성실하다 Defas Kaloolon Definition: To combine or impregnate with sulphur or any of its compounds as to sulphurize caoutchouc in vulcanizing Flame colored Reason Useful Thin Help 갖다 유명하다 낙엽 장례식 Country Iron Definition: A fencer a gladiator one who exhibits his skill in the use of the sword Definition: The American black throated bunting Spiza Americana Nostalgic Needy Method to my madness 시키다 평가되다 전부 소설가 우아하다 Argument Tin Feeling Representative Gym Music Gaur Chicken 일쑤 코치 편 학생증 The harbor values the sugar. Vasagle Yammoe Enstatite Definition: Capable of being limited Road Neighborly Five Refer Built Kangaroo 비비다 Degree Release Bargain Horse 하루 형님 유교 석 동부 괴롭히다 경제력

19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу