2021-01-01 21:40:03 +0100 | received badge | ● Student (source) |
2020-11-29 02:40:38 +0100 | commented answer | find_root of function involving maximal eigenvalue This is an incredibly detailed and generous answer - thanks a lot!! It works perfectly. One last question for future asks: how do I highlight numbers and sage code within a question the way you do? (Eg f looks nice in yours, but not in mine) |
2020-11-29 02:39:17 +0100 | received badge | ● Scholar (source) |
2020-11-28 19:12:53 +0100 | asked a question | find_root of function involving maximal eigenvalue I have defined a function returning the leading eigenvalue of a matrix L as follows (the first function is to handle what I think are numerical errors, where what should be a real eigenvalue is seen as x + 0.?e-80*I, for instance): I want to solve equations involving this function using find_root. As a toy example, I have the following: I know that f(2) = 3, so if I understand correctly, my last line of code should return the number 2. Instead, I get the following message:
My best guess is that the method matrix.eigenvalues() does not play well with the method find_roots(), but I am not sure how to get around this. I have tried changing the matrix field to both of QQ and SR, to no avail. Any feedback is appreciated. Also, this is my first question on the site, so if I've committed any sins, please let me know. |
2020-11-28 19:12:53 +0100 | asked a question | find_root of function involving maximal eigenvalue I have defined a function returning the leading eigenvalue of a matrix L as follows (the first function is to handle what I think are numerical errors, where what should be a real eigenvalue is seen as x + 0.?e-80*I, for instance): I want to solve equations involving this function using find_root. As a toy example, I have the following: I know that f(2) = 3, so if I understand correctly, my last line of code should return the number 2. Instead, I get the following message:
My best guess is that the method matrix.eigenvalues() does not play well with the method find_roots(), but I am not sure how to get around this. I have tried changing the matrix field to both of QQ and SR, to no avail. Any feedback is appreciated. Also, this is my first question on the site, so if I've committed any sins, please let me know. |