problem with integrating a sum



Am Sonntag, den 30.08.2009, 21:15 +0200 schrieb Rafa? Topolnicki:
> I'm trying solve Laplace's equation with some boundary conditions and I
> have problem with integration a sum:
> 
> declare(n,integer);
> 
> declare(m,integer);
> 
> E1:'integrate(sin((%pi*m*y)/a)*sum(C(n)*%e^(-(%pi*n*x)/a)*sin((%pi*n*y)/a),n,1,N),y)='integrate(sin((%pi*m*y)/a),y)*V0
> 
> ev(E1,nouns) - nothing happend on the left side of equation
> 
> why integrate on left can't cope with sum? intosum() doesn't help. How
> to move 'integrate inside the summation?

A fast solution is to do it by hand (only the left side of your
integral):

(%i161) E1:sum('integrate(sin((%pi*m*y)/a)*C(n)*%e^(-(%pi*n*x)/a)*sin((%
pi*n*y)/a),y),n,1,N);
(%o161) 'sum(C(n)*%e^-(%pi*n*x/a)*'integrate(sin(%pi*m*y/a)*sin(%
pi*n*y/a),y),
             n,1,N)

(%i162) %,nouns;
(%o162) -'sum(C(n)*%e^-(%pi*n*x/a)
                  *((a*n-a*m)*sin((%pi*n*y+%pi*m*y)/a)
                   +(-a*n-a*m)*sin((%pi*n*y-%pi*m*y)/a))
               /(2*%pi*n^2-2*%pi*m^2),n,1,N)

Dieter Kaiser