Bob Baillie asked
One of the first examples of Fourier series that a student encounters is something like this: f(x) = x/2, for -Pi < x < Pi. The Fourier series is Sum[ (-1)^(n+1)/n * Sin[n x] ]. A second, more complicated example is: f(x) = -Pi/2, for -Pi < x < 0, f(x) = Pi/2, for 0 < x < Pi. This Fourier series is Sum[ (1 - (-1)^n)/n * Sin[n x] ]. Can one work backwards, from the coefficients to the function?
And I answered incompletely:
About all you can do is replace sin(x) with Im(e^ix) and treat the problem as a hypergeometric series, of which you can only do the easiest cases. [...]
Indeed, I once sent this list inf t ==== Gamma(-----) \ log(n) sin(n t) 2 %pi
--------------- = %pi log(------------) / n %pi ==== n = 1 t sin(-) 2 %pi log(------) + %gamma (t - %pi) + log(2 %pi) t 2 + -------------------------------------------------, 2
(0<t<2 pi, where %gamma = Euler's constant ~ .57721566), whose derivation was given in my Fields Institute paper about integrating log Gamma. At the other (i.e., simple) extreme, one can merely iteratively integrate dx Bob's examples and get, e.g., sum(cos(n*x-%pi*k/2)/n^k,n,1,inf)=-2^k*%pi^k*bernpoly(x/(2*%pi),k)/(2*k!) inf %pi k k k x ==== cos(n x - -----) 2 %pi bernpoly(-----, k) \ 2 2 %pi > ---------------- = - -------------------------- / k 2 k! ==== n n = 1 (0<=x<=2 pi, except < when n=1, which ought to be in Mathworld someplace), and its generating function (also a Fourier series) sum(((n*sin(n*x)-t*cos(n*x))/(t^2+n^2)),n,0,inf) =((%pi*(%e)^(t*x))/(1-(%e)^(2*%pi*t)))-1/(2*t) inf ==== t x \ n sin(n x) - t cos(n x) %pi %e 1 > ----------------------- = ------------- - --- / 2 2 2 %pi t 2 t ==== t + n 1 - %e n = 0 The former gives the polylog reciprocation formula (%e)^( - ((%i * %pi * k)/2)) * li[k](z) + (%e)^((%i * %pi * k)/2) * li[k]((1/z) ) = - ((2^k * (%pi)^k * bernpoly( - ((%i * log(z))/(2 * %pi)), k))/(k!)) %i %pi k %i %pi k k k %i log(z) - -------- -------- 2 %pi bernpoly(- ---------, k) 2 2 1 2 %pi %e li (z) + %e li (-) = - -------------------------------- k k z k! (which seems also absent from Mathworld, even for k=2). At least for some part of its nightmarish Riemann surface (which Gene once worked out). But notice we only get sum(sin/n^odd) or cos/n^even. Using the hypergeometric approach, sum(((cos(n * x))/n),n,1,inf) = - log(2 * sin((x/2))) inf ==== \ cos(n x) x > -------- = - log(2 sin(-)) / n 2 ==== n = 1 But then when we try the iterated integral, we are met at step one with sum(((sin(n*x))/(n^2)),n,1,inf)=((%i*(li[2]((%e)^(-%i*x))-li[2]((%e)^(%i*x))))/2) inf - %i x %i x ==== %i (li (%e ) - li (%e )) \ sin(n x) 2 2 > -------- = --------------------------------, / 2 2 ==== n n = 1 and seem to need another special function to express it in strictly real terms. --rwg --------------------------------- Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.