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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

finding max/min of a fucntion

mhughes-disable
1-Newbie

finding max/min of a fucntion

I have a simple one-vairable function (its a moment function along a beam). The variable is a ranged vairable.

I want to find the maximum/minimum of this function is there an EASY way to do this?

By easy- I mean one or two lines...

I am thinking along the lines of having to convert the function's results to an array?? Any thoughts?

There are about 1,000 points in the function.

Thanks
21 REPLIES 21

On 11/16/2009 2:31:42 PM, mhughes2 wrote:

>There are about 1,000 points
>in the function.

Is it a function like ln(x) or sin(x)? If so, the fact that x could be a range variable is irrelevant. Or is it a set of points?

Richard

Ther "variable" in a function is a formal argument, not any particular value. The formal argument is completely unrelated to any worksheet variable which might happen to have the same name.

To find the maximum or minimum of a function you generally use the maximize or minimize function. Look them up in the help.
__________________
� � � � Tom Gutman

See attached... show me how to EASILY get the single maximum value of this function?

See the attached

Richard
RichardJ
19-Tanzanite
(To:RichardJ)

Hmmm. Saving from 14 to 11 has slightly corrupted the file. "so it just increases to 8" should of course read "so it just increases to infinity".

Richard
ELSID
4-Participant
(To:mhughes-disable)

There is nothing to converge too since it is a straight line starting at 0 and going to 100. Max and min are NOT inflection points. Like tome said, look up Minimize/Mazimize.
FYI, you have redefined a Mathcad built in unit m which by default is meter.

Use maximize (did you look up the help for maximize?). You cannot use max unless you have an array, or a set of different variables.
__________________
� � � � Tom Gutman

Like this.

jmG

Can someone show me how to use maximize/minimize on this function then? Becuase the way I am doing it keeps telling me a variable is undefined.

On 11/16/2009 4:46:45 PM, mhughes2 wrote:
>Can someone show me how to use
>maximize/minimize on this
>function then? Because the way
>I am doing it keeps telling me
>a variable is undefined.
_______________________________

There is a 2d example in the qs, maybe more.

jmG


On 11/16/2009 4:46:45 PM, mhughes2 wrote:
>Can someone show me how to use
>maximize/minimize on this
>function then? Becuase the way
>I am doing it keeps telling me
>a variable is undefined.

On which function? Do you mean y(x)=mx+b? You can't maximize that function. As x approaches infinity or -infinity, y(x) approaches infinity or -infinity.

Richard


On 11/16/2009 4:46:45 PM, mhughes2 wrote:
>Can someone show me how to use maximize/minimize on this function then? Becuase the way I am doing it keeps telling me a variable is undefined.

You forgot that the searching interval must to be provided as part of the problem statment, in your practical case, probably the length of the beam.

Regards. Alvaro.


Here is the exact function I am using. I want to find the maximum value. Can someone please show me how? Thanks

See attach.

Regards. Alvaro.

Thank you very much!

Thank you very much!
ELSID
4-Participant
(To:RichardJ)

Why can I not get the "cross hairs" when I do not use the markers? I added the MaxM to the y axis and I get the correct line. However, if I add MaxX to the x axis

On 11/20/2009 2:06:46 AM, ElSid wrote:
>Why can I not get the "cross hairs" when I do not use the markers? I added the MaxM to the y axis and I get the correct line. However, if I add MaxX to the x axis

Probably the fast way:



But remeber that y=mx+n goes vertical as m increases, and can try to write this line as function with m big, but it's some hard to scale well. Or try to make a a matrix of the same x and vertical aligned y.

Regards. Alvaro.


ELSID
4-Participant
(To:AlvaroDíaz)

Great trick.
I added a third set of values. See attached.
I found an old jmG reference
RichardJ
19-Tanzanite
(To:ELSID)

MaxX and MaxM are just scalars, so they define a point, not a line. Here's how to create a matrix that draws an arbitrary number of line segments. I have created quite complex drawings like this (as has Tom, and the same technique is used in the e-book Creating Amazing Images with Mathcad).

Richard
Top Tags