How to use FindMaximum for a list of parameters? In the following code, if I assign single values to z and Rth, it works fine. How do I do the same for a list?
ClearAll["Global`*"]
a = 310;
b = 300;
c = 0.1;
d = 6;
z = {1/300, 2/300, 3/300, 4/300, 5/300};
R = 6;
Rth = {1, 2, 3, 4, 5}
S = Sqrt[z*R/Rth]
FindMaximum[{S^2*(X - Y)^2*Rload/(R + Rload)^2, -( a - X)/c + (X - Y)/Rth + S^2*X*(X - Y)/(R +
Rload) - 0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2 == 0, (Y - b)/d - (X - Y)/Rth - S^2*Y*(X -
Y)/(R + Rload) - 0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2 == 0, X > 300, Y > 300, Rload > 0},
{X, Y, Rload}]
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.