Ask Your Question

Jeremy Martin's profile - activity

2022-04-24 11:22:42 +0200 received badge  Notable Question (source)
2020-09-28 13:40:47 +0200 received badge  Famous Question (source)
2020-06-28 18:59:20 +0200 received badge  Famous Question (source)
2019-01-15 18:54:12 +0200 received badge  Notable Question (source)
2019-01-15 18:54:12 +0200 received badge  Popular Question (source)
2017-04-11 04:04:44 +0200 received badge  Popular Question (source)
2016-05-05 05:17:15 +0200 received badge  Notable Question (source)
2016-01-12 20:40:31 +0200 received badge  Popular Question (source)
2016-01-12 20:40:19 +0200 received badge  Popular Question (source)
2015-10-21 22:47:53 +0200 commented answer Integrating with constant integrand

Thanks. I knew this was what was going on but did not know the systematic way to handle it. Your last suggestion (cast it to the symbolic ring) is exactly what I was looking for.

2015-10-21 20:20:59 +0200 asked a question Integrating with constant integrand

How can you specify an integral with a constant integrand? For example, I know that

f = x
f.integrate(x,0,1)

works fine, but

f = 1
f.integrate(x,0,1)

doesn't, since the Integer class has no integrate() method. (Should it?) I can get around this with something like

f = x-x+1
f.integrate(x,0,1)

but that seems awfully kludgey.

2015-10-09 17:33:15 +0200 asked a question Hiding toolbars

I often use the SageMathCloud in the classroom. I would like to hide the toolbars to have more room for the math. I know I can hide the User and Project menus by clicking on the little X at the right, and I have unchecked the "Extra Button Bar" in my settings. Is there also a way to hide the other toolbar (with buttons like Run, Stop, Restart, etc.)?

2015-09-24 18:35:08 +0200 commented question sage.plot.plot3d.shapes2.Line() does not work in the cloud

I guess I can just use line3d() instead.... but maybe this error indicates something else is going on.

2015-09-23 20:49:15 +0200 asked a question sage.plot.plot3d.shapes2.Line() does not work in the cloud

The following code (straight from http://doc.sagemath.org/html/en/refer...) does not work in the SageMath Cloud, at least not for me:

from sage.plot.plot3d.shapes2 import Line
Line([(i*math.sin(i), i*math.cos(i), i/3) for i in range(30)], arrow_head=True)

The result is a long error message ending with "TypeError: 0 is not JSON serializable". Am I doing something wrong?

2015-09-20 14:04:44 +0200 commented question Error rendering 3d scene

Update: Having read http://ask.sagemath.org/question/2632..., I tried e = 1/10 and got the same error. Of course

parametric_plot3d( [b*t/e, -a*t/e, f(b*t/e,-a*t/e)], [t,-1,1], color="yellow", size=15 )

will do what I want, but there still seems to be an underlying problem with parametric_plot3d.

2015-09-20 14:03:28 +0200 asked a question Error rendering 3d scene

I'm working in the SageMath Cloud. The code block

x,y,t = var('x,y,t')
f = lambda x,y: x*abs(y)/sqrt(x^2+y^2) if (x,y)<>(0,0) else 0
a,b = 1,6
e = 0.1
parametric_plot3d( [b*t, -a*t, f(b*t,-a*t)], [t,-e,e], color="yellow", size=15 )

produces an error message:

error rendering 3d scene -- error downloading /blobs/682b952d-d577-45ce-98ff-4e7a06ddad32.sage3d?uuid=682b952d-d577-45ce-98ff-4e7a06ddad32

But if I change the fourth line to e = 1, then it works just fine.

A similar error was reported in http://ask.sagemath.org/question/2730..., but the fix there was easier.

2015-07-24 23:42:01 +0200 commented answer Integer types and log()

Thanks. I did not know about the valuation() function before this.

2015-07-24 23:41:22 +0200 received badge  Supporter (source)
2015-07-24 23:41:19 +0200 received badge  Scholar (source)
2015-07-24 23:41:13 +0200 commented answer Integer types and log()

@Nathann: Done.

@rws: Yes, it is not a bug, and I was able to do what I needed to do, but from an end-user standpoint, it would be better if the log() function did not require the user to distinguish between an integer and a Sage integer - most mathematicians would not think that there could be two kinds of integers!

2015-07-21 17:03:17 +0200 asked a question Sage 6.7 is very slow on OSX 10.9

I recently installed Sage 6.7 from source on my home computer, running OSX 10.9 (Mavericks). It is sloooooow. Just starting Sage from a terminal window takes a good two minutes; something simple like using the ? feature can take up to a minute; and serious power computation is hopeless. My computer has plenty of RAM and disk space, so I don't think that's the problem. I had the same problems with the previous version (5.something), but on other computers the performance is much better. I would be very grateful for suggestions about how to speed things up, particularly from others who have encountered this issue. Thanks!

2015-07-21 16:57:56 +0200 asked a question Integer types and log()

I am working with a bunch of lists whose lengths are all powers of 2. I'd like to be able to extract the power by taking the base-2 log of the length. However, Sage wasn't able to simplify an expression like log(len(L),2), because apparently len() returns the wrong kind of integer:

sage: A=list(range(8))
sage: len(A)
8
sage: log(len(A),2)
log(8)/log(2)
sage: log(8,2)
3
sage: type(len(A))
<type 'int'>
sage: type(8)
<type 'sage.rings.integer.Integer'>
sage: log(Integer(len(A)),2)
3

This is the first math function I've come across that seems to care about the distinction between these two kinds of integers, and it would be nice if it didn't, since it took me quite a while to figure out why Sage wouldn't simplify an expression like log(len(A),2).

2014-10-24 19:50:44 +0200 received badge  Nice Question (source)
2014-10-24 18:12:40 +0200 commented question Void simplicial complexes

Done. Thanks; I'm new here and didn't know that.

2014-10-24 18:12:28 +0200 received badge  Editor (source)
2014-10-23 21:29:41 +0200 received badge  Student (source)
2014-10-23 18:25:13 +0200 asked a question Void simplicial complexes

The standard definition of a simplicial complex requires that it contain the empty face. However, sometimes one needs to distinguish between the complexes {} (the "void complex") and {{}} (the "irrelevant complex"). This comes up, e.g., when working with relative complexes or doing combinatorial commutative algebra (see, e.g., Stanley's Combinatorial Commutative Algebra, p.117, or Miller and Sturmfels, p.4). The SimplicialComplex class doesn't allow the void complex.

For example, if F is a facet of X then link_X(F) is the irrelevant complex, but if G is a nonface of X then link_X(G) is the void complex. However, the link method does not distinguish between the two, returning the irrelevant complex in both cases:

sage: X=SimplicialComplex([[1]])
sage: F=Simplex([1]); X.link(F)
Simplicial complex with vertex set () and facets {()}
sage: G=Simplex([2]); X.link(G)
Simplicial complex with vertex set () and facets {()}

This seems like a triviality but it would be helpful to have this distinction. What do others think?

2012-07-19 15:54:23 +0200 asked a question MixedIntegerLinearProgram.set_max bug?

The set_max method in MixedIntegerLinearProgram() does not seem to work correctly if the maximum value specified is 0. Specifically, the input....

Q = MixedIntegerLinearProgram();
xx = Q['xx'];
Q.set_min(xx,0);
Q.get_min(xx)

... returns null, but ....

Q = MixedIntegerLinearProgram();
xx = Q['xx'];
Q.set_min(xx,3);
Q.get_min(xx)

... works fine. Anyone know what's going on here?