try f[i](x):=f[i-1](x)+ .... {suitably translated}
You cannot put arbitrary stuff on the left side of a definition.
RJF
richard noel fell wrote:
> I would like to calculate the partial sums of a fourier series and
> have maxima do the work. So, I define an array of functions (well,
> that is my intent)
> f[0](x):=0;
> for i:1 thru 10 do
> f[i+1](x):=f[i](x)+(-1)^i/(2*i+1)^2*sin(%pi*x/(2*i+1)^2). Then, I
> would plot the partial sums via plot2d.
>
> However, both commercial Macsyma and maxima, while perfectly happy
> with a subscripted definition such as f[0](x):=x, they complain when I
> try to do this in a for loop. maxima gives the error message:
> ERROR ((MPLUS) |$i| 1) is not of type STRING
>
> Is there a way to overcome this difficulty? Thanks,
> Dick Fell
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima