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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Finding local min ?

lvl107
20-Turquoise

Finding local min ?

  Hello Everyone.

  From :

 

( 1 ).PNG

  Am I missing something in finding the local min of the function f(x), the above ?

  Thanks in advance.

ACCEPTED SOLUTION

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

27 REPLIES 27
LucMeekes
23-Emerald III
(To:lvl107)

I'll spare you a picture of the symbolic solution (4 pages high, 16 pages wide), but this is what Mathcad 11 (with Maple) makes of it:
LM_20181011_Solve.png

Success!
Luc

lvl107
20-Turquoise
(To:LucMeekes)

Many thanks, Luc. Smiley Happy I need help with graphing the point of local min of the function f(x), the above.

   Regards.

      Loi.

Werner_E
25-Diamond I
(To:lvl107)

B.PNG

lvl107
20-Turquoise
(To:Werner_E)

   Many thanks, Werner. Smiley HappySmiley Happy  The hint is very helpful to me. I guess the hint works well with the similar function :

( 2 ).PNG

           Regards.

Werner_E
25-Diamond I
(To:lvl107)


@lvl107 wrote:

   Many thanks, Werner. Smiley HappySmiley Happy  The hint is very helpful to me. I guess the hint works well with the similar function :


Obviously, as your screenshot proves.

lvl107
20-Turquoise
(To:Werner_E)

or a equivalence :

( 2' ).PNG

     Regards.

Werner_E
25-Diamond I
(To:lvl107)

There is no need to use the symbolics (which will give you just numeric results anyway). You may consider using a solve block or the root command with appropriate guesses to get the two critical points:

B.png

lvl107
20-Turquoise
(To:Werner_E)

  Many, many thanks for another help, Werner. Smiley HappySmiley HappySmiley Happy And I am trying to solve another similar function :

( 3 ).PNG

            Regards.

lvl107
20-Turquoise
(To:lvl107)

 or :

( 3' ).PNG

Werner_E
25-Diamond I
(To:lvl107)

Looks like the results of your numeric workaround are accurate enough

B.png

lvl107
20-Turquoise
(To:Werner_E)

  What is the 4-argument form ?

( 3'' ).PNG

 

Werner_E
25-Diamond I
(To:lvl107)


@lvl107 wrote:

  What is the 4-argument form ?

 

 


The error message is talking about the "root" command. It has two forms.

The first uses just a start guess value -> root (f(x), x)=

The second uses an interval and thats the 4-argument form -> root(f(x), x, x1, x2)=

In the second form root tries to find a solution which is within the interval [x1; x2].

For the second form to work its mandatory that f(x1) and f(x2) have different signs, otherwise you get an error.

 

You may consider looking up "root" in the help and there also is a available a quicksheet about the use of the root command.

 

But in your example I see no benefit in evaluating the expression symbolically - just use numeric evaluation for a quick result.

lvl107
20-Turquoise
(To:Werner_E)

( 5 ).PNG

     "No solution was found". What does it mean in this case ?

Fred_Kohlhepp
23-Emerald I
(To:lvl107)

It may not be able to deal with the inequality.  Will it solve for equal?

lvl107
20-Turquoise
(To:Fred_Kohlhepp)

But :

( I ).PNG

                Regards.

lvl107
20-Turquoise
(To:lvl107)

( 6 ).PNG

Werner_E
25-Diamond I
(To:lvl107)

There are equations of higher order which Mathcad can reduce and solve via symbolics and there are quite more equations (or inequality) which Mathcads symbolics can't solve.

 

Have you tried if Wolfram Alpha can solve your original inequality?

Werner_E
25-Diamond I
(To:lvl107)

It means what it says 😉

Mathcads symbolic simply is not capable enough to find a solution to this inequality.

 

EDIT: In your example which works OK Mathcad has only to deal with quadratic equations -> no problem

 

lvl107
20-Turquoise
(To:Werner_E)

Many thanks again for your time and help, Werner. Smiley HappySmiley Happy

    Best Regards.

lvl107
20-Turquoise
(To:lvl107)

and how to solve "by hand" ?

    Best Regards.

Werner_E
25-Diamond I
(To:lvl107)

Maybe it would be a good idea if you tell us why you need those calculations. There may be other ways to achieve the real task you are looking for.

 

Concerning the intervals where the absolute value is lower than the RHS you may let Mathcad solve the equations

LHS=RHS ->

and

LHS=-RHS ->

and take the appropriate values which form your two intervals.

 

Werner_E
25-Diamond I
(To:lvl107)

Here is a way to find the four solution intervals "by hand".

The first method uses a plot to spot the area(s) of interest and then created a large vector and picks up the appropriate values from there. You may refine the precision by narrowing down the range of interest (as shown in one example).

B1.png

The second method shows a way to use symbolic calculation and was already described in my answer above.

B2.png

lvl107
20-Turquoise
(To:Werner_E)

 This reply is to say thanks again, Werner. Smiley HappySmiley Happy  . The following, it seems there no more precision. ( I just self-check my understanding about this )

( I' ).PNG

   Best Regards.

lvl107
20-Turquoise
(To:Werner_E)

Logical plot have 5 solutions

Intervals have only 4 solutions. ( It seems missing one )

( I'' ).PNG

Regards.

Werner_E
25-Diamond I
(To:lvl107)


@lvl107 wrote:

Logical plot have 5 solutions

Intervals have only 4 solutions. ( It seems missing one )

 

Regards.


Use:  x.vec:=mk_vec(-2, 3.5, 10^6)

B.png

 

LucMeekes
23-Emerald III
(To:Werner_E)

"Mathcads symbolic simply is not capable enough to find a solution to this inequality."

There's Mathcad and Mathcad:

LM_20181014_Solve.png

Luc

Werner_E
25-Diamond I
(To:LucMeekes)


@LucMeekes wrote:

"Mathcads symbolic simply is not capable enough to find a solution to this inequality."

There's Mathcad and Mathcad:

 

Luc


There's MuPad and then there was Maple.
Nice to see (and not too surprising) that Maple in your Mathcad 11 can do the job as expected.

Unfortunately nowadays we can't buy a Mathcad version with Maple as symbolic engine nor could we license a valid older copy of Mathcad 11 for a new computer 😞

 

Announcements

Top Tags