Fourier package?



I'm confused by the documentation for the fourier package. In the
following:

Function: fourier (f, x, p)

    Returns a list of the Fourier coefficients of f(x) defined on the interval [-%pi, %pi].

what is the role of "p" ???

Also, when the fourier package asks me about the sign of various
things, what is it doing with those signs? If there is no definite
answer to the question, what do I do? (example : what is the sign of
cos(%pi*n)??? this could be positive or negative depending on whether
n is even or odd... 

------

Here is how I would like to use the fourier package:

I have a problem which can be stated in terms of minimizing the
potential energy of a certain situation. The situation is determined
by a "height function" which is positive at one end of a domain, and
zero at the other. It can not be negative.

I am plugging in an expansion of the h function in terms of a
truncated fourier series and trying to solve for the unknown
coefficients.

Unfortunately, the differential potential energy involves a term
related to the length of the curve (ie. sqrt(1+dh/dx)) and therefore
maxima can not integrate it. I would like to replace this term with a
fourier expansion of the term and then integrate that instead. I am
not sure whether this approximation of approximation will work, but it
seems worth trying.

However, I can not figure out how to get the fourier coefficients of
the term using the fourie package. Any help would be appreciated.



-- 
Daniel Lakeland
dlakelan at street-artists.org
http://www.street-artists.org/~dlakelan