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













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










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

Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單