Maple - Finding maximum of maximums in different functions

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
Rafael de Gomes
Messages
1
Reaction score
0
Hello,

I've been trying to come up with a short way of writing the code. What I'm trying to do is:

I have 11 equations, each of which have a defined minimum and maximum. I'm trying to find the highest maximum out of all of them and I need to know which one it is. The highest as in farthest away from zero, so negative values are also required.

I was trying this:
upload_2015-5-25_20-53-8.png


And although this would work (it does give me a value), it doesn't tell me which of the functions is the highest. Is there any way to do this other than wasting a bunch of lines writing:
upload_2015-5-25_20-54-52.png


?
 
Physics news on Phys.org
You'll probably want to write a function as far as I can tell. (It's been a while since I used maple so maybe a built-in function exists although highly unlikely)

In essence it would do something like create an array of functions.
Then loop over this array determining the maximum/whatever you need of said function and assign to a new array at the same index (<- this is important)
Then you can determine the maximum of this newly created list
Now the result, you search in your array of maxima and use the index to retrieve your function.

disclaimer: I'm probably using some bad terminology here like the array. An array can be a list or vector or ... in Maple, if I'm not mistaken