ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 13 Mar 2019 11:13:41 -0500multiplicity of a point in a schemehttps://ask.sagemath.org/question/45777/multiplicity-of-a-point-in-a-scheme/ The commands
`A1.<x>=AffineSpace(1, QQ)
X=A1.subscheme([x^1789+x])
Q=X([0])
Q.multiplicity() `
result in 1789.
There seems to be a bug in the multiplicity command for subschemes of the line.
costeWed, 13 Mar 2019 11:13:41 -0500https://ask.sagemath.org/question/45777/find_root does not fulfill tolerancehttps://ask.sagemath.org/question/36505/find_root-does-not-fulfill-tolerance/In Sage 7.3 the result of:
find_root((4*x^4-x^2).function(x),-0.25,0.4,xtol=1e-13,rtol=1e-13)
is
1.6619679287440101e-10
One would expect that the error with the exact solution (x=0) would be lower than 1e-13. I imagine that the multiplicity of the root produces this effect. Does somebody know the numerical algorithm behind find_root?
Thanks in advance.
**UPDATE:** Thanks to @kcrisman, I see that find_root calls `brentq`. The documentation of such function says:
*Safer algorithms are brentq, brenth, ridder, and bisect, but they **all require** that the root first be bracketed in an **interval where the function changes sign**. The brentq algorithm is recommended for general use in one dimensional problems when such an interval has been found.*
Since 4x^4-x^2 has a root in 0 with multiplicity 2, this condition is not fulfilled. Is there any other command in Sage different from `find_root` to numerically calculate roots for general functions that can handle with roots with multiplicity bigger than 1?franpenaThu, 09 Feb 2017 10:44:53 -0600https://ask.sagemath.org/question/36505/multiplicity of elements in a listhttps://ask.sagemath.org/question/10012/multiplicity-of-elements-in-a-list/if one has a list of matrices how do we build a dictionary whose keys are the distinct matrices in the list and values are the number of times that matrix appears in the list (or the multiplicity of that matrix in the list).REKHA BISWALWed, 01 May 2013 01:08:57 -0500https://ask.sagemath.org/question/10012/