Trouble finding location of the maximum of f(x) function using derivatives

Trouble finding location of the maximum of f(x) function using derivatives - I am trying to find the location where maximum moment occurs. I have - Messaggi

#1 Pubblicato: 14/08/2025 16:03:29
DM

DM

0 apprezzamenti in 12 post.

Gruppo: User

Hello all,

I am trying to develop a method to calculate the location of maximum moment using the superposition method. My thought was to create an expression M(x), take the derivative = 0 which would be the location of maximum moment.

However, I'm not sure why the solver isn't returning any roots. Is this a problem because my variables have units?

I read into https://smath.com/en-US/forum/topic/WRWWAT/Max-value-of-function thread and the second post had an example file, but my function was not working in there when I tried replacing it.

As an aside, what is the vertical bar in this photo called and what is it's purpose? I tried searching for it but I have no clue what it is even called. Same goes for the arrow above the f(x_c).



Moment Test.sm (30,71 KiB) scaricato 1414 volta(e).
Modificato 14/08/2025 16:08:28
#2 Pubblicato: 15/08/2025 02:26:25
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Hi. Yes, you are right, there is a problem with the units. This is a way for handle units using solve:

image.png

About the line() instruction in the examples that you mention, as in smath the calculations are performed from left to right and from top to bottom, it is simply used so that the graph on the right can be drawn, otherwise it would have to be placed below.

Your problem solved using the procedures in the reference:

maximun.sm (51,09 KiB) scaricato 1455 volta(e).

Best regards.
Alvaro.
Modificato 15/08/2025 03:53:03
2 utenti hanno apprezzato questo post
sergio 15/08/2025 09:36:51, ioan92 15/08/2025 09:39:10
#3 Pubblicato: 15/08/2025 11:54:25
StvMath

StvMath

44 apprezzamenti e 1 disapprezzamenti in 76 post.

Gruppo: User

It works like this:

moment.png
#4 Pubblicato: 15/08/2025 14:02:35
DM

DM

0 apprezzamenti in 12 post.

Gruppo: User

Wrote

It works like this:

moment.png



Hello! For your x solve how come you put h in the brackets when it is a constant? The post above yours doesn't have as many inputs but appears to accomplish the same thing. What are the extras in your solve call doing?
#5 Pubblicato: 15/08/2025 14:03:18
DM

DM

0 apprezzamenti in 12 post.

Gruppo: User

Wrote

Hi. Yes, you are right, there is a problem with the units. This is a way for handle units using solve:

image.png

About the line() instruction in the examples that you mention, as in smath the calculations are performed from left to right and from top to bottom, it is simply used so that the graph on the right can be drawn, otherwise it would have to be placed below.

Your problem solved using the procedures in the reference:

maximun.sm (51,09 KiB) scaricato 1455 volta(e).

Best regards.
Alvaro.



Is there a way to have the solve only spit out the positive number for x instead of a matrix?
#6 Pubblicato: 15/08/2025 15:11:45
StvMath

StvMath

44 apprezzamenti e 1 disapprezzamenti in 76 post.

Gruppo: User


Hello! For your x solve how come you put h in the brackets when it is a constant? The post above yours doesn't have as many inputs but appears to accomplish the same thing. What are the extras in your solve call doing?

The '0' and the 'h' are the limits of x between which 'solve' searches for a solution.
#7 Pubblicato: 15/08/2025 18:41:53
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Wrote

... Is there a way to have the solve only spit out the positive number for x instead of a matrix?


Hi DM. There are several ways. This two, for example:

image.png

Moment Test.sm (33,91 KiB) scaricato 1414 volta(e).

Wrote

... Hello! For your x solve how come you put h in the brackets when it is a constant? The post above yours doesn't have as many inputs but appears to accomplish the same thing. What are the extras in your solve call doing? ....


Hi Stv. Which solve?

Best regards.
Alvaro.
#8 Pubblicato: 15/08/2025 19:40:12
StvMath

StvMath

44 apprezzamenti e 1 disapprezzamenti in 76 post.

Gruppo: User


Hi Stv. Which solve?

Best regards.
Alvaro.



Hi Alvaro,

Not sure what you're getting at! I simply took the 'solve' that DM had used and added the two limits (0 and h), as well as inserting units.

Best regards,
Stv.
1 utenti hanno apprezzato questo post
Alvaro 15/08/2025 22:07:35
#9 Pubblicato: 15/08/2025 22:19:04
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Wrote

... Not sure what you're getting at! I simply took the 'solve' that DM had used and added the two limits (0 and h), as well as inserting units. ...


It seems my browser didn't load the image you attached when I ask about which solve. I just saw your image now. You're right; the most practical way is to limit the search to the range [0, h].

Best regards.
Alvaro.
  • Nuovi post
  • Nessun nuovo post