[sage-support] Re: Possibly wrong limit concerning log
Other examples of wrong limits with logarithm in exponent in Sage: lim27**(log(n,3/n**3),n=infinity) returns 0 (Wolfram Alpha http://www.wolframalpha.com/input/?i=lim%28%28%28%2827**%28log_3%28n%29%29%29%29%2Fn**3%29%2Cn%3Dinfinity%29 and Maple return 1). lim27**(log(n,3)+1)))/n**3),n=infinity) returns 0 (Wolfram Alpha http://www.wolframalpha.com/input/?i=lim%28%28%28%2827**%28log_3%28n%29%2B1%29%29%29%2Fn**3%29%2Cn%3Dinfinity%29 and Maple return 27). lim(((27**(log(n,3)+1)-1)/26+n-log(n,3)-1)/n**3,n=infinity) returns 0 (Wolfram Alpha http://www.wolframalpha.com/input/?i=limit%28%28%2827**%28log3%28n%29%2B1%29-1%29%2F26%2Bn-log3%28n%29-1%29%2Fn**3%2Cn%2Coo%29 and Maple return 27/26). Using SageMathVersion6.7, ReleaseDate:2015−05−17. I believe these are all the same Maxima problem. https://sourceforge.net/p/maxima/bugs/2972/ -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] What is wrong with this SAGE function?
Use range(n-1) instead of range [n-1]. *Christophe BAL* *Enseignant de mathématiques en Lycée **et développeur Python amateur* *---* *French math teacher in a Lycée **and **Python **amateur developer* 2015-06-04 23:44 GMT+02:00 Phoenix anirbit.mukher...@gmail.com: I am trying to define a function elem which will create me a list of length n which has 1 at the i^th position. def elem (i,n): A = [] for k in range [n-1]: if k != i: A.append([0]) if k == i: A.append([1]) return A elem (1,5) Why does the above not work? -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: equivalent to Mathematica goes-to; e.g., (/. a - 4)
sage: var('x,a') (x, a) sage: a*sin(x) a*sin(x) sage: (a*sin(x)).subs(a=4) 4*sin(x) sage: plot((a*sin(x)).subs(a=4), x, -pi, pi) On Thursday, June 4, 2015 at 11:08:05 PM UTC+2, Ed Lazarus wrote: I would like the sagemath syntax for the mathematica Plot[ a Sin[x] /.a - 4, {x,-Pi,Pi} ]. It seems quite difficult to do a search that will yield an answer. Thanks to whomever. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] What is wrong with this SAGE function?
Thanks! Is there otherwise any standard operation in SAGE to create such vectors? If you have time can you also look into another question I had about vectors in SAGE: Given a vector $v$ and a matrix $A$ of dimension $n$, one would say that $v$ is a cyclic vector of $A$ if the following set is linearly independent $\{ v,Av,A^2v,..,A^{n-1}v \}$. Is there a way to test this property on SAGE given a $v$ and a $A$? -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] What is wrong with this SAGE function?
On 06/04/2015 05:53 PM, Phoenix wrote: Thanks! Is there otherwise any standard operation in SAGE to create such vectors? If the construction isn't too complicated, a list comprehension usually suffices. This will do what you want, I think: def elem(i,n): return [ ZZ(i == j) for j in range(0,n) ] A list comprehension is written much like the usual math notation for set construction, so nothing to be afraid of. Given a vector $v$ and a matrix $A$ of dimension $n$, one would say that $v$ is a cyclic vector of $A$ if the following set is linearly independent $\{ v,Av,A^2v,..,A^{n-1}v \}$. Is there a way to test this property on SAGE given a $v$ and a $A$? Sure, using list comprehensions again. First we construct the list of A(v), A^2(v), etc. Then we stick those vectors in a big matrix, and ask for its rank. If the matrix has full rank, it's columns/rows are independent. def f(A,v): M = matrix([ (A^j)*v for j in range(0,len(v)) ]) return M.rank() == len(v) Note that you will need to pass that function a vector (that you get from calling vector() on a list), not a list. For example, sage: A = matrix([[1,2],[3,4]]) sage: v = vector([1,2]) sage: f(A,v) True -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] What is wrong with this SAGE function?
I am trying to define a function elem which will create me a list of length n which has 1 at the i^th position. def elem (i,n): A = [] for k in range [n-1]: if k != i: A.append([0]) if k == i: A.append([1]) return A elem (1,5) Why does the above not work? -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] equivalent to Mathematica goes-to; e.g., (/. a - 4)
I would like the sagemath syntax for the mathematica Plot[ a Sin[x] /.a - 4, {x,-Pi,Pi} ]. It seems quite difficult to do a search that will yield an answer. Thanks to whomever. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: equivalent to Mathematica goes-to; e.g., (/. a - 4)
What is wrong with something like this? a = 2 plot(a*sin(x*8)^2 * e^-(x*x),x,-2,2) -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: Make doc error
The problem was indeed the accent, we tried John's fix with # -*- coding: utf-8 -*- and it worked! Thank you for your help, it was kind of tricky. Best Viviane 2015-06-04 3:03 GMT-05:00 Volker Braun vbraun.n...@gmail.com: The docstring might have to be declared unicode (haven't actually looked at it): def foo(): u unicode string On Thursday, June 4, 2015 at 2:24:47 AM UTC+2, John H Palmieri wrote: Earlier in the docbuilding, I see this: [combinat ] building [inventory]: targets for 2 source files that are out of date [combinat ] updating environment: 0 added, 2 changed, 0 removed [combinat ] reading sources... [ 50%] sage/combinat/cluster_algebra_quiver/cluster_seed [combinat ] Encoding error: [combinat ] 'ascii' codec can't decode byte 0xc3 in position 414: ordinal not in range(128) [combinat ] The full traceback has been saved in /var/folders/cp/n8wtqs490tq5psknff1hv9qrgn/T/sphinx-err-jeDhGW.log, if you want to report the issue to the developers. which is caused by the accents on line 18 of cluster_seed.py. Does the problem go away if you remove those accents or add something like # -*- coding: utf-8 -*- to the top of the file? John On Wednesday, June 3, 2015 at 4:24:37 PM UTC-7, Viviane Pons wrote: This I did already... 2015-06-03 18:21 GMT-05:00 Volker Braun vbrau...@gmail.com: Try make doc-clean make On Thursday, June 4, 2015 at 1:06:03 AM UTC+2, Viviane Pons wrote: Hi everyone, I get this doc build error on a branch ( http://trac.sagemath.org/ticket/18594) and I have no idea why. I just know the error comes from the branch (I can build the doc fine on develop) but I don't know which commit caused it. I'm going to look into it but if someone has the slightest idea of what is causing it, it would help! The error: [reference] WARNING: Unable to fetch /media/ubuntudata/Programming/sage/src/doc/output/doctrees/en/reference/combinat/environment.pickle Error building the documentation. Note: incremental documentation builds sometimes cause spurious error messages. To be certain that these are real errors, run make doc-clean first and try again. Traceback (most recent call last): File /media/ubuntudata/Programming/sage/src/doc/common/builder.py, line 1626, in module getattr(get_builder(name), type)() File /media/ubuntudata/Programming/sage/src/doc/common/builder.py, line 292, in _wrapper getattr(get_builder(document), 'inventory')(*args, **kwds) File /media/ubuntudata/Programming/sage/src/doc/common/builder.py, line 516, in _wrapper getattr(DocBuilder(self.name, lang), format)(*args, **kwds) File /media/ubuntudata/Programming/sage/src/doc/common/builder.py, line 110, in f eval(compile(open(sys.argv[0]).read(), sys.argv[0], 'exec')) File /media/ubuntudata/Programming/sage/src/doc/common/custom-sphinx-build.py, line 219, in module raise OSError(ERROR_MESSAGE) OSError: [reference] WARNING: Unable to fetch /media/ubuntudata/Programming/sage/src/doc/output/doctrees/en/reference/combinat/environment.pickle Best Viviane -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] About running SAGE on Windows 8
Does one have to a virtual box of Oracle to run SAGE on Windows? I am currently on a Windows 8 machine. The sage-6.7.ova file that I am running through this virtual box is immensely slow! Any help? -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: Make doc error
The docstring might have to be declared unicode (haven't actually looked at it): def foo(): u unicode string On Thursday, June 4, 2015 at 2:24:47 AM UTC+2, John H Palmieri wrote: Earlier in the docbuilding, I see this: [combinat ] building [inventory]: targets for 2 source files that are out of date [combinat ] updating environment: 0 added, 2 changed, 0 removed [combinat ] reading sources... [ 50%] sage/combinat/cluster_algebra_quiver/cluster_seed [combinat ] Encoding error: [combinat ] 'ascii' codec can't decode byte 0xc3 in position 414: ordinal not in range(128) [combinat ] The full traceback has been saved in /var/folders/cp/n8wtqs490tq5psknff1hv9qrgn/T/sphinx-err-jeDhGW.log, if you want to report the issue to the developers. which is caused by the accents on line 18 of cluster_seed.py. Does the problem go away if you remove those accents or add something like # -*- coding: utf-8 -*- to the top of the file? John On Wednesday, June 3, 2015 at 4:24:37 PM UTC-7, Viviane Pons wrote: This I did already... 2015-06-03 18:21 GMT-05:00 Volker Braun vbrau...@gmail.com: Try make doc-clean make On Thursday, June 4, 2015 at 1:06:03 AM UTC+2, Viviane Pons wrote: Hi everyone, I get this doc build error on a branch ( http://trac.sagemath.org/ticket/18594) and I have no idea why. I just know the error comes from the branch (I can build the doc fine on develop) but I don't know which commit caused it. I'm going to look into it but if someone has the slightest idea of what is causing it, it would help! The error: [reference] WARNING: Unable to fetch /media/ubuntudata/Programming/sage/src/doc/output/doctrees/en/reference/combinat/environment.pickle Error building the documentation. Note: incremental documentation builds sometimes cause spurious error messages. To be certain that these are real errors, run make doc-clean first and try again. Traceback (most recent call last): File /media/ubuntudata/Programming/sage/src/doc/common/builder.py, line 1626, in module getattr(get_builder(name), type)() File /media/ubuntudata/Programming/sage/src/doc/common/builder.py, line 292, in _wrapper getattr(get_builder(document), 'inventory')(*args, **kwds) File /media/ubuntudata/Programming/sage/src/doc/common/builder.py, line 516, in _wrapper getattr(DocBuilder(self.name, lang), format)(*args, **kwds) File /media/ubuntudata/Programming/sage/src/doc/common/builder.py, line 110, in f eval(compile(open(sys.argv[0]).read(), sys.argv[0], 'exec')) File /media/ubuntudata/Programming/sage/src/doc/common/custom-sphinx-build.py, line 219, in module raise OSError(ERROR_MESSAGE) OSError: [reference] WARNING: Unable to fetch /media/ubuntudata/Programming/sage/src/doc/output/doctrees/en/reference/combinat/environment.pickle Best Viviane -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Possibly wrong limit concerning log
sympy, too, finds the limit despite not recognizing the identity: … expr = 27**(log(x,3)/x**3) expr, limit(expr, x, oo) Your expression has 1/x^3 in its exponent. The expression from the orginal post would be 27**(log(x,3))/x**3, which SymPy correctly simplifies and finds the correct limit for: simplify(27**(log(x,3))/x**3) Integer(1) limit(27**(log(x,3))/x**3,x,oo) Integer(1) Other examples of wrong limits with logarithm in exponent in Sage: lim27**(log(n,3/n**3),n=infinity) returns 0 (Wolfram Alpha http://www.wolframalpha.com/input/?i=lim%28%28%28%2827**%28log_3%28n%29%29%29%29%2Fn**3%29%2Cn%3Dinfinity%29 and Maple return 1). lim27**(log(n,3)+1)))/n**3),n=infinity) returns 0 (Wolfram Alpha http://www.wolframalpha.com/input/?i=lim%28%28%28%2827**%28log_3%28n%29%2B1%29%29%29%2Fn**3%29%2Cn%3Dinfinity%29 and Maple return 27). lim(((27**(log(n,3)+1)-1)/26+n-log(n,3)-1)/n**3,n=infinity) returns 0 (Wolfram Alpha http://www.wolframalpha.com/input/?i=limit%28%28%2827**%28log3%28n%29%2B1%29-1%29%2F26%2Bn-log3%28n%29-1%29%2Fn**3%2Cn%2Coo%29 and Maple return 27/26). Using SageMathVersion6.7, ReleaseDate:2015−05−17. (SymPy has issues with these limits too, albeit different ones. I've reported them here https://github.com/sympy/sympy/issues/9471.) -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.