If we use the calculus/fourie.mac package
to find the fourier series coefficients
of the function f(x) = x over the
interval (-pi, pi), we can use foursin(...),
but this function asks questions about
the sign of cos(%pi*n), where "n" is
a local variable assumed positive inside
foursin(...). The correct set of coefficients
are produced for any answer. So why ask??
(%i1) (display2d:false, load(fourie) )$
(%i2) ( foursin( x, x, %pi), foursimp(%%) );
Is cos(%pi*n) positive, negative, or zero?
p;
(%t2) b[n] = 2*(sin(%pi*n)/n^2 - %pi*cos(%pi*n)/n)/%pi
(%t3) b[n] = -2*(-1)^n/n
(%o3) [%t3]
(%i4) ( foursin(x, x, %pi), foursimp(%%) );
Is cos(%pi*n) positive, negative, or zero?
n;
(%t4) b[n] = 2*(sin(%pi*n)/n^2-%pi*cos(%pi*n)/n)/%pi
(%t5) b[n] = -2*(-1)^n/n
(%o5) [%t5]
(%i6) ( foursin(x, x, %pi), foursimp(%%) );
Is cos(%pi*n) positive, negative, or zero?
z;
(%t6) b[n] = 2*(sin(%pi*n)/n^2-%pi*cos(%pi*n)/n)/%pi
(%t7) b[n] = -2*(-1)^n/n
(%o7) [%t7]
Ted Woollett