MathGroup Archive 2009

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

Search the Archive

possible bug in symbolic sum of a trig series

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99343] possible bug in symbolic sum of a trig series
  • From: isaac <davidbhatt at gmail.com>
  • Date: Sun, 3 May 2009 05:22:17 -0400 (EDT)

Deal all,
I wrote the following code

In[6]:= ey[y_,n_,L_]:=Cos[n Pi y/L ]
       beta[g_,nn_,L_]=(2/L)Integrate[ey[y,nn,L] g[y],{y,0,L}];
       beta[g_,0,L_]=(2/L)Integrate[ g[y],{y,0,L}];
In[9]:=  hh[y_]:=y^2
In[15]:= Clear[hha];
          hha[y_,mm_]=   With[{L=15},(1/2)beta[hh,0,L]+Sum[beta
[hh,nn,L] ey[y,nn,L],{nn,0,mm}]]// FullSimplify
Out[15]= \!\(\(\(1\/\[Pi]\^2\)\((75\ \[ExponentialE]\^\(\(-\(1\/15\)\)
\ \[ImaginaryI]\ \
\[Pi]\ y\)\ \((6\ \((\(-\[ExponentialE]\^\(\(-\(1\/15\)\)\ \
[ImaginaryI]\ \
\[Pi]\ y\)\))\)\^mm\ LerchPhi[\(-\[ExponentialE]\^\(\(-\(1\/15\)\)\ \
\[ImaginaryI]\ \[Pi]\ y\)\), 2,
              1 + mm] + \[ExponentialE]\^\(\(\[ImaginaryI]\ \[Pi]\ y\)
\/15\)\ \
\((2\ \[Pi]\^2 -
                6\ \((\(-\[ExponentialE]\^\(\(\[ImaginaryI]\ \[Pi]\ y\)
\/15\)\
\))\)\^\(1 + mm\)\ LerchPhi[\(-\[ExponentialE]\^\(\(\[ImaginaryI]\ \
[Pi]\ y\)\
\/15\)\), 2, 1 + mm] -
                3\ Log[\[ExponentialE]\^\(\(-\(1\/15\)\)\ \[ImaginaryI]
\ \
\[Pi]\ y\)]\^2)\))\))\)\)\)
In[17]:= hha[0,100]//N
Out[17]= 150.005
In[19]:= beta[hh,0,15]
Out[19]= 150
(*********why this shift in zero is occuring  it seems it is equal to
zeroth coefficient**********)

The symbolic sum is giving error. I checked with using
FourierTrigSeries and it gave exact answer.

With regards
Isaac
can anybody help?


  • Prev by Date: Re: Inverse function
  • Next by Date: Re: Introducing the Wolfram Mathematica Tutorial Collection
  • Previous by thread: Re: Can't apply Differencesto a SparseArray[]?
  • Next by thread: Re: Re: New Wolfram Tutorial Collection documentation is