trigsimp of a [] list can sometimes take time exponential
in the length of the list.
For example:
trigsimp(makelist(sin(i)^2+cos(i)^2,i,1,N))
for N=4,5,... takes 0.12, 0.52, 1.50, 4.45, 13.97 secs.
Also for sin(i)^2.
Of course, it should take linear time.
This doesn't happen
Logged In: YES
user_id=588346
Oops, "this doesn't happen" should continue... in other cases,
like sin(1)^2, sin(x)^2+cos(x)^2, etc.
Logged In: YES
user_id=28849
This is probably due to the way trigsimp1 and improve work
(share/trigonometry/trgsmp.mac).
It looks like caused by trigsimp1 and improve, which cause
quadratic behavior, I think.
I think if trigsimp3 is modified to map(trigsimp1,
num(expn))/map(trigsimp1,denom(expn), things will work much
faster. Some care must be taken in case expn is not a list,
but that's not too difficult.
Logged In: YES
user_id=28849
Fixed. trigsimp3 modified to handle each element of the
list one at a time instead of trying to do the entire list
all at once.