I need to calculate the maximum of a function within a specified domain, for example: y = -x, {40 < x < 100}. Clearly the solution in this case will be 40, but I will eventually need to substitute in a more complex function such as a polynomial.

I can't find any elements in GoldSim that seem to be able to calculate the maximum of a function, so I'm guessing this must be done iteratively, either by using a looping container or script element. Does anyone know how to implement this using a script element?

## Comments

7 comments