Ask Your Question

lb's profile - activity

2021-03-22 00:00:44 +0200 received badge  Popular Question (source)
2021-03-21 00:39:17 +0200 commented question Saving 3d image as svg or pdf

Have you seen this related question and answer? https://ask.sagemath.org/question/9057/save-3d-plot-as-vector-format/#13

2018-05-29 12:34:09 +0200 asked a question Are q-additive functions implemented in Sage ? Where ?

Hi,

We are interested in q-additive functions and sequences. This objects are for instance described in "Sur certaines suites uniformement equireparties modulo 1" (Jean Coquet).

We couldn't find these objects implemented in sage (but maybe we did not look well enough).

Could you please tell us whether q-additive functions are implemented in sage or not ? Also, if we do implement something about q-additive functions, in which part of sage would it fit the best.

2017-02-20 21:54:56 +0200 commented answer Save a 3D in Sage as a '.stl' file

Starting from last beta (SageMath 7.6.beta3) you can also do :

sage: g= icosahedron(center=(0,4,0))
sage: g.all[-1].save('icosahedron.stl')
2017-01-04 21:44:16 +0200 asked a question Two ways of integrating x↦xⁿsin(x) give contradictory results. Bug?

First way:

var('x,n')
integral(x^n*sin(x),x)

gives just

integrate(x^n*sin(x), x)

not very informative, let us try to add an assumption to get nicer results.

Second way:

assume(n,'integer')
integral(x^n*sin(x),x)

gives

1/4*(((-1)^n - 1)*gamma(n + 1, I*x) - ((-1)^n - 1)*gamma(n + 1, -I*x))*(-1)^(-1/2*n)

Uhm, looks better, but... wait, isn't (-1)^n-1 equal to 0 for even values of n ? That would make the whole thing equal to 0 for even n.

I = integral(x^n*sin(x),x)
for k in range(10):
    print I.subs(n==2*k)

prints only 0s. Weird, non-zero functions should not have zero integrals.

Third way :

Let us try to do the integration with particular values of n.

for n in range(5):
    print integral(x^n*sin(x),x)

prints

-cos(x)
-x*cos(x) + sin(x)
-(x^2 - 2)*cos(x) + 2*x*sin(x)
-(x^3 - 6*x)*cos(x) + 3*(x^2 - 2)*sin(x)

Looks better, but is clearly different from the previous answer.

Question:

I am working on the cloud, with SageMath 7.4 kernel. Is this a bug or did I misunderstood the meaning of the 'integer'assumption ?

If this is a bug, how should I report it, is posting this question here enough ?

P.S. I did read the wiki page about reporting bugs, but, gosh, is it really necessary to have a google account in order to report a bug ? Both sage-devel and sage-support are on Google Groups.

2016-12-14 23:52:27 +0200 received badge  Supporter (source)
2016-12-14 23:52:25 +0200 commented answer How to define WordMorphism on an infinite alphabet ?

Thank you very much for the detailed answer. I am sorry I did not replied earlier. Actually I expected an email would tell me when my question is answered.
I was using word and WordMorphism for my teaching, as an example, I am not planning to use it further for the moment, but will keep in mind the trick with default dictionary for my course next year (if I am lucky enough to have the same course again next year).

2016-12-14 23:45:26 +0200 received badge  Scholar (source)
2016-11-17 10:20:53 +0200 received badge  Nice Question (source)
2016-11-17 09:55:03 +0200 received badge  Student (source)
2016-11-17 07:44:43 +0200 asked a question How to define WordMorphism on an infinite alphabet ?

Let imagine I want to do a substitution on the set of all words written with natural numbers.

Example 1: replace every number with its square.

Example 2: make precise rules for substitution of letter in some finite subset of the alphabet and decide that all other letters will be deleted (replaced with empty).

It's not very clear for me from the doc whether this is actually allowed with the command WordMorphism, but if it is, I would like to understand how to do it.