Stripping out coefficients of Fourier series



On Tue, 2 Jun 2009, Dan Hatton wrote:

> On Mon, 1 Jun 2009, Dan Hatton wrote:

>> Imagine I have some three-dimensional Fourier series like
>> series : (complicated_expression_1)*cos(3*z)*cos(3*x)*cos(y)
>> 		+(complicated_expression_2)*cos(2*z)*cos(2*x)*cos(2*y) ;
>> (only with rather more than two Fourier components).

> the following should do the job, albeit at the expense of quite a
> bit of CPU time:

> integrate(integrate(integrate(series*cos(3*x)*cos(y)*cos(3*z),z,0,2*%pi),y,0,2*%pi),x,0,2*%pi)/%pi^2 
> = 0 ;
> integrate(integrate(integrate(series*cos(2*x)*cos(2*y)*cos(2*z),z,0,2*%pi),y,0,2*%pi),x,0,2*%pi)/%pi^2 
> = 0 ;

It looks like there's a price in RAM, as well as in CPU time.  The
first integral (in the case with ten Fourier components, and the
complicated expressions written out in full) made CLISP (2.41.1,
running Maxima 5.15.0) produce a lot of "*** - No more room for LISP
objects" messages.

After spitting out these messages, Maxima is still running and using
~98% of a CPU.  Is it likely to be doing anything useful, or should I
terminate it and switch to Leo's text-processing method (thanks Leo!)?

-- 

Regards,

Dan