Skip to main content
1-Visitor
May 19, 2011
Solved

Mathcad Prime Maximize function

  • May 19, 2011
  • 1 reply
  • 12377 views

Hi,

I want to use the maximize function on a programmed function list, but I am starting to think it might not be possible to do it..

i want to find the max value (either X so that i will enter it back in the formula, or the max value on the graph).

See the bottom of page two of the script for further explanations.

Thank you very much.

PS: i would also like to know why does the graph acts as steps instead of curves? isn't the M graph supposed to be parabolic?

Thanks

Best answer by wayne

I have added the exact solution to the problem for compairson, and it agrees with numerical calculation of Prime.

You must have something different in the input between Prime and Beam2D

Note that you are using P/c, (force/unit lenght, is that what you are using in Beam 2D?)

1 reply

1-Visitor
May 19, 2011

You need to use the maximize function within a solve block.

Mike

1-Visitor
May 20, 2011

Thanks for the tip.

But it seems that the maximise function gives me some random number instead of the maximum value...

if you change the guess value, the answer will change... ie: x:=100 mm will give 25 mm as being the max value (and M(25) = 0 which is not a maximum), x:=60 mm gives 15 mm... it seems it just divides by four..

Also, the M plot should be parabolic, why isn't it parabolic?

Thanks for your time,

19-Tanzanite
May 20, 2011
But it seems that the maximise function gives me some random number instead of the maximum value...

if you change the guess value, the answer will change... ie: x:=100 mm will give 25 mm as being the max value (and M(25) = 0 which is not a maximum), x:=60 mm gives 15 mm... it seems it just divides by four..

Like all numeric non-linear solvers, maximize is iterative. It starts at the guess value, and heads "uphill" until it can't get any higher, then stops. Such solvers so not like piecewise functions, or functions with flat areas in them. If you give it a guess of 100mm it takes a few steps, decides it can't find anything higher, and stops. If you give it a guess of 60mm, it takes a few steps and happens to end up at 15, where if it takes more steps it can't find anything higher, so it stops.

Also, the M plot should be parabolic, why isn't it parabolic?

Why would it be parabolic? M1(x), M2(x), and M3(x) are definite integrals with defined limits. As such they return a constant. You do not even need to define them as functions, just M1, M2, and M3 would work.

As an additional note, it's not likely that any function you define in terms of the function V1 will be purely parabolic, because V1 is a piecewise function.