Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: Integrals of Fourier Series

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3207] Re: [mg3179] Integrals of Fourier Series
  • From: jpk at apex.mpe.FTA-Berlin.de (Jens-Peer Kuska)
  • Date: Sat, 17 Feb 1996 14:16:23 -0500
  • Sender: owner-wri-mathgroup at wolfram.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


==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: MathLink function: Global variable?
  • Next by Date: Re: Integrals of Fourier Series
  • Previous by thread: Integrals of Fourier Series
  • Next by thread: Re: Integrals of Fourier Series