MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Integrals of Fourier Series

  • Subject: [mg3207] Re: [mg3179] Integrals of Fourier Series
  • From: jpk at apex.mpe.FTA-Berlin.de (Jens-Peer Kuska)
  • Date: 18 Feb 1996 01:11:02 -0600
  • Approved: usenet@wri.com
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Wolfram Research, Inc.
  • Sender: daemon at wri.com


Dear George Oster,

the situation is not so simple as it seems. 
a) there is no finite algorithm to deal with
   products of infinite sums
b) to leave (Sum[_,_]*Sum[_,_]) unevaluatet you must
   supply different a summation index. 

The rest is easy 


(* my version of Your series with a named index *)
In[1]:=
u[x_,n_]:=
  Sum[A[n]*Sin[n*Pi*x/L],{n,1,Infinity}]

(* Do the derivative *)
In[2]:=
u2=D[u[x,n],{x,2}]


Out[2]=
       2   2          n Pi x
      n  Pi  A[n] Sin[------]
                        L
Sum[-(-----------------------), 
                 2
                L
 
  {n, 1, Infinity}]

(* calculate the square and replace one summation index *)
In[3]:=
sqru=u2*(u2 /. n->k)


Out[3]=
       2   2          k Pi x
      k  Pi  A[k] Sin[------]
                        L
Sum[-(-----------------------), 
                 2
                L
 
   {k, 1, Infinity}] 
 
         2   2          n Pi x
        n  Pi  A[n] Sin[------]
                          L
  Sum[-(-----------------------), 
                   2
                  L
 
   {n, 1, Infinity}]

(* Collect the product of two sum's in a double sum *)
In[10]:=
sqru2=sqru /. Literal[Sum[an_,iter1_]*Sum[ak_,iter2_]] :> Sum[an*ak,iter1,iter2]


Out[10]=
     2  2   4               k Pi x      n Pi x
    k  n  Pi  A[k] A[n] Sin[------] Sin[------]
                              L           L
Sum[-------------------------------------------, {n, 1, Infinity}, 
                         4
                        L
 
  {k, 1, Infinity}]




(* Change the integration rule to map into a sum *)
In[20]:=
Unprotect[Integrate];
Literal[Integrate[Sum[as_,iter__],range_]]:=Sum[Integrate[as,range],iter]
Protect[Integrate];
Integrate[sqru2,{x,0,L}]



Out[23]=
      2  2   3
Sum[(k  n  Pi  A[k] A[n] (k Sin[(k - n) Pi] + n Sin[(k - n) Pi] - 
 
                                                     3   2    2
       k Sin[(k + n) Pi] + n Sin[(k + n) Pi])) / (2 L  (k  - n )), 
 
  {n, 1, Infinity}, {k, 1, Infinity}]


There are one notice, for a general rule You have to change

Literal[Integrate[Sum[as_,iter__],x_Symbol]]:=
  Sum[Integrate[as,range],iter] /; FreeQ[{iter},x]

Literal[Integrate[Sum[as_,iter__],interval_List]]:=
  Sum[Integrate[as,range],iter] /; FreeQ[{iter},First[interval]]

For multidimensional integrals the pattern's become more complicated. 


Hope that helps

Jens



  • Prev by Date: Re: Integrals of Fourier Series
  • Next by Date: Re: array ordered
  • Previous by thread: Re: Integrals of Fourier Series
  • Next by thread: Re: Integrals of Fourier Series