Couple of observations:
- Your definition of
S
produces a list of identical elements
- The "function" you're passing to
FindMaximum
, since it's based on S
, is actually a list of expressions.
So, my best guess is that you're expecting FindMaximum to work with a list of "functions", but I can find no documentation that suggests FindMaximum should work with a list of "functions". The error that it produces, FindMaximum::nrnum
, seems to confirm that this is not expected to work. If you do indeed want to apply FindMaximum
to a list of functions, then you could try Map
.
On the other hand, since S
is just one number repeated, there seems to be an error in how you're setting up the problem. Maybe that error is masking your actual intention, and so maybe my guess is all wrong.
If Map
doesn't help, maybe you can reformulate your question or provde some more context to help us understand your objective.