cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Possible to find the maximum of a function of functions?

dsochor
5-Regular Member

Possible to find the maximum of a function of functions?

In the attached MathCAD 14 worksheet, M(x) is a function of 5 other functions. I'd like MathCAD to tell me what the maximum value of M(x) is. Is there anyway to do this?

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:dsochor)

Find attached one possible way

View solution in original post

5 REPLIES 5
Werner_E
25-Diamond I
(To:dsochor)

Find attached one possible way

dsochor
5-Regular Member
(To:Werner_E)

Thank you very much Werner! I wasn't able to get the maximize function to work. I've never seen this iterative method or the lookup command before.

Werner_E
25-Diamond I
(To:dsochor)

Ooops, using maximize() would be more natural and much easier. See attached. If it didn't work for you, maybe you forgot to provide a guess value.

The function max() I used works for vectors, matrices, scalars and strings, but not for functions. So it was necessary to create vectors for x and function values M(x).

Maximize() sure is the better way to do it.

dsochor
5-Regular Member
(To:Werner_E)

Thank you again Werner, now I have two ways to find the maximum!

Werner_E
25-Diamond I
(To:dsochor)

You are welcome.

Maximize() will provide better accuracy combined with less effort.

Just investigate the difference between the values of Mmax calculated by both methods. You will have to set up Nmax very high to reduce that difference to an accaptable (depends on the application, of course) value.

Announcements

Top Tags