Mathematica Error with Finding Maximum in Mathematica

Click For Summary
The discussion centers on maximizing the sum of a list of functions dependent on a variable x, specifically through the use of the discrete Fourier transform in Mathematica. The user encounters an error indicating that the input to the Fourier function is not a valid numerical list, which suggests that the functions in the list are not being treated as numerical quantities. Despite being able to plot the resulting function from the Fourier transform, the user is unable to use the FindMaximum function due to this error. A suggested approach is to convert the list of functions into an interpolating function to ensure they are numerical. The key issue lies in Mathematica's inability to evaluate the Fourier transform of symbolic expressions rather than numerical values, which prevents the maximization process from proceeding.
madness
Messages
813
Reaction score
69
I want to find the maximum of the total of a list of numbers, of which each depends on some variable x. I'm taking the discrete Fourier transform of a set of points of a function, and trying to maximise the sum of the resulting list. Although I can plot the sum of the list as a function of x, when I try to maximise it Mathematica tells me Fourier::fftl:Argument{my list} is not a non-empty list or rectangular array of numeric quantities. The error seems to be associated with taking the discrete Fourier transform of a non-numerical quantity. It should be taking this Fourier transform with a range of possible numbers and finding the maximum, but seems to be getting it wrong. Can anyone help?
 
Physics news on Phys.org
I'm not sure i understand the problem but you can perhaps convert the set to an interpolating funciton which is essentially a list of numbers to MM.
 
That's not quite it. I have a list L={a(x), b(x),...,n(x)}, the discrete Fourier transform gives Fourier[L]={A(x), B(x),..., N(x)} and my function is f(x)=A(x)+B(x)+...+N(x). This function plots perfectly and I can clearly see the maximum, but I want Mathematica to find it for me. So I say FindMaximum[F[x],{x,0}] and get the error mentioned above. It can't evaluate Fourier of x, when x isn't a number.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
862
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K