Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Eng-Tips
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Guest (Visitor) (OP)
22 Dec 01 18:38
How do I get mathcad 5.0 to return a maximum value for a function without having to print out a table of values, looking at them to find the maximum, and typing it into my next equations, the function is a quadratic equation and has a maximum value. Help!
Flowerhopper   cjomlo@iland.net
ivymike (Mechanical)
22 Dec 01 18:56
one way to do it would be to use the max() function.  I believe the syntax would be max(my_array)=
but I'm not sitting in front of mathcad right now. (if you'd like to wait until january, I'll get you the answer then)

another way would be to calculate the derivative of the eqn, find the zero points of the derivative, and then figure out (either by looking at the sign of the second derivative or by checking values) which ones are max values and which are mins

Rich2001 (Mechanical)
23 Dec 01 9:40
This is an example using a later version of MathCad I don't know if this works with MathCad 5

example

f(x):= 2+6x-x^2
x:=2
Given
x>0
P:= Maximize(f,x)

"answer"    P=3
            f(P)=11
GregLocock (Automotive)
23 Dec 01 20:49
Neither of those is easy in early versions of Mathcad

The obvious thing to do in this case is to differentiate the quadratic and then test the solutions (bearing in mind that quadratics often go to infinity) to that function.

The other more general alternative is to build a vector of values and then a vector of gradients and then search for points of inflexion.

Getting the index figure for each point of inflexion is /possible/, even in the very earliest version of Mathcad, you need to set up another vector that increments until a point of inflexion is found, I think using either "if" or the totally weird "until". I did this a long time ago and can't remember the details. If you can afford to wait three weeks then I'll look it up in my notes.

Cheers

Greg Locock

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!

Back To Forum

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close