Attempting to write a fourier series: Can functions be passed as parameters to a function containing a summation

So a couple of functions are defined:

f(x,n,a_0,a,b)=a_0 + sum_k=1^n a(k)cos(kx)+b(k)sin(kx)

a_1(k)= some function of k
b_1(k)= some function of k

The plot should be called as:


But this yields an error when attempting to plot:

“a_1 is a function. Try using parentheses”

Hi! I don’t believe that functions can be passed into other functions as parameters.

In the case of Fourier series, you can workaround this limitation, as in the example I found here (originally shared by the creator on Reddit here).