I have coefficients in a list:
allAs = {1,2,3,4,5}
And another list that is created with the Table function, with an "x" in each element which I want to find the derivative with respect to:
expTable = Table[Exp[-I*2 Pi*x*k], {k, 1, 5}];
My function is formed from the two lists above in the following way
function = Abs[1 - Total[allAs*expTable]]^2;
I would like to find the derivative of this function with Derivative, but the "x" is not in the function explicitly. How should I go about finding the derivative of function with respect to x.
I have tried to define the function as below before taking the derivative but it doesn't work:
function[_x] := Abs[1 - Total[allAs*expTable]]^2;