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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Symbolic evaluation of max and min

Sergey
14-Alexandrite

Symbolic evaluation of max and min

Hello!

 

How do I evaluate the statement (attached) symbolically?

I want to get a symbol as answer and not the assigned value of it.

 

Best regards,

Sergey

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:Sergey)

The symbolic does not know anything about units and treats them as unknown variables. Thats the reason why the symbolic can't decide, which variable is bigger. If MPa would be negative, the max would be sigma1, if MPa is positive, the max is sigma2 and if MPa is zero, both are equal (0).

You may tell the symbolic that MPa is positive with the "assume" modifier and also add the "simplify" modifier to get the correct numeric result.

Werner_E_0-1611926677228.png

But its easier to achieve using a simple numeric evaluation.

 

But in case you expect the symbolic answer "sigma2" instead of "300 MPa" - there is no way to achieve this answer.

You could use the if-function or an if-statement with a text result as a workaround:

Werner_E_0-1611927232674.png

In Prime use "else" instead of "otherwise".

 

View solution in original post

3 REPLIES 3
Werner_E
24-Ruby V
(To:Sergey)

The symbolic does not know anything about units and treats them as unknown variables. Thats the reason why the symbolic can't decide, which variable is bigger. If MPa would be negative, the max would be sigma1, if MPa is positive, the max is sigma2 and if MPa is zero, both are equal (0).

You may tell the symbolic that MPa is positive with the "assume" modifier and also add the "simplify" modifier to get the correct numeric result.

Werner_E_0-1611926677228.png

But its easier to achieve using a simple numeric evaluation.

 

But in case you expect the symbolic answer "sigma2" instead of "300 MPa" - there is no way to achieve this answer.

You could use the if-function or an if-statement with a text result as a workaround:

Werner_E_0-1611927232674.png

In Prime use "else" instead of "otherwise".

 

Sergey
14-Alexandrite
(To:Werner_E)

Hello.

 

I am writing one paper and want to show in context of the example that sigma_1 is the value to use. It is just more convenient in my particular case due the frequent use of sigma_1 and sigma_2 in the text that leads to the example. 

Sergey
14-Alexandrite
(To:Werner_E)

I think that "If statement" is the one to use here.

Thank you.

 

 

Top Tags