Maple - Finding maximum of maximums in different functions

AI Thread Summary
The discussion focuses on finding the highest maximum value among 11 equations in Maple, including negative values. The user seeks a concise coding solution that not only identifies the maximum value but also indicates which equation it originates from. They suggest creating an array of functions and looping through it to determine each maximum, storing these in a new array for easy comparison. The goal is to avoid lengthy code while effectively retrieving the corresponding function based on the maximum value found. The conversation highlights the need for efficient coding practices in Maple to achieve this task.
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
 
Back
Top