Re: [fricas-devel] Unusual run-times of a simple integral

2016-11-13 Thread Waldek Hebisch
Kurt Pagani wrote: > > I'm unable to create a reasonable example: > > FCI==>FourierComponent(Integer) > FSI ==> FourierSeries(EXPR INT,INT) > > (1) -> sin(5)$FCI > >(1) sin[5] > > Type: FourierComponent(Integer) > > (2) -> makeCos(5,z)

Re: [fricas-devel] Unusual run-times of a simple integral

2016-11-13 Thread Waldek Hebisch
oldk1331 wrote: > > My question is, is there a domain to express expressions > that are not expanded, for example "a+1/b" will not be > "(a*b+1)/b". Nothing substantial. For some experiments I tried: IntegerAsNothing : SetCategory == Integer and then used Expression(IntegerAsNothing). But suc

Re: [fricas-devel] Unusual run-times of a simple integral

2016-11-12 Thread oldk1331
I have a related question: Seems your question has something to do with the fact that in FriCAS Expression is represented by polynomials and polynomials are always expanded. So integrate(1/(x+1)^n,x) will be slow when n is large. My question is, is there a domain to express expressions that are

Re: [fricas-devel] Unusual run-times of a simple integral

2016-11-12 Thread Kurt Pagani
I'm unable to create a reasonable example: FCI==>FourierComponent(Integer) FSI ==> FourierSeries(EXPR INT,INT) (1) -> sin(5)$FCI (1) sin[5] Type: FourierComponent(Integer) (2) -> makeCos(5,z)$FSI (2) zcos[5]

Re: [fricas-devel] Unusual run-times of a simple integral

2016-11-11 Thread Waldek Hebisch
Kurt Pagani wrote: > > BTW do you have any idea what FourierSeries(R, E) and FourierComponent E are > for? I can't recognize any functionality regarding to compute Fourier > coefficients nor series. Essentially it implements trigonometric polynomials (that is _finite_ Fouries series), but its is

Re: [fricas-devel] Unusual run-times of a simple integral

2016-11-11 Thread Kurt Pagani
Thank you for the plausible explanation. In the first place I was surprised about complexIntegrate doing so much better, but now I can understand why. The background is "computing Fourier coefficients", so I think it will be better using the complex form instead of cos/sin. BTW do you have any ide

Re: [fricas-devel] Unusual run-times of a simple integral

2016-11-10 Thread Waldek Hebisch
Kurt Pagani wrote: > > When integrating sin(x)*cos(2*n*x), n=1,10,20,30, there is a unusual growth > in run-time. I guess that the cause might be found in trigonometric > transformations. Is that so? Yes. Compare: (6) -> complexElementary(normalize(sin(x)*cos(2*20*x))) (6)

[fricas-devel] Unusual run-times of a simple integral

2016-11-10 Thread Kurt Pagani
When integrating sin(x)*cos(2*n*x), n=1,10,20,30, there is a unusual growth in run-time. I guess that the cause might be found in trigonometric transformations. Is that so? Of course we can integrate using the parameter "n" followed by evaluation, however, I wonder whether this behavior is norm