Fourier Package



To  Lakeland,about Fourier and the problem. 

 This type of problem seems to be a typical application of FEM (finite element 
method).  That is, you try to find a solution as a sum of well known functions
with arbitrary coefficients, but FEM use a good basis for this problem, the
linear problem of calculating the coefficient has a coefficient matrix with
special properties (tridiagonal,etc.)

About Fourier, I don't know what is p but perhaps is 
(1) the number of coefficients or
 (2) a term to make a change in the interval 
[-L,L] -> [-pi/2,pi/2]

In any case, I think that the usual formulas for the coefficients of Fourier
 are trivial to program in Maxima.

 b(n):=  1/L * integrate(f(x)*cos(n*x),x,-L,L);
 a(n):=  1/L * integrate(f(x)*sin(n*x),x,-L,L);
 
 f(x)= a0/2 + sum a(n) sin(n*w*x) + sum b(n)*cos(n*w*x) with w=%pi/L