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 - Сообщения

#1 Опубликовано: 14.08.2025 16:03:29
DM

DM

0 сообщений из 12 понравились пользователям.

Группа: 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 КиБ) скачан 65 раз(а).
Отредактировано 14.08.2025 16:08:28
#2 Опубликовано: 15.08.2025 02:26:25
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 039 сообщений из 1 703 понравились пользователям.

Группа: 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 КиБ) скачан 58 раз(а).

Best regards.
Alvaro.
Отредактировано 15.08.2025 03:53:03
2 пользователям понравился этот пост
sergio 15.08.2025 09:36:51, ioan92 15.08.2025 09:39:10
#3 Опубликовано: 15.08.2025 11:54:25
StvMath

StvMath

38 сообщений из 62 понравились пользователям.

Группа: User

It works like this:

moment.png
#4 Опубликовано: 15.08.2025 14:02:35
DM

DM

0 сообщений из 12 понравились пользователям.

Группа: 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 Опубликовано: 15.08.2025 14:03:18
DM

DM

0 сообщений из 12 понравились пользователям.

Группа: 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 КиБ) скачан 58 раз(а).

Best regards.
Alvaro.



Is there a way to have the solve only spit out the positive number for x instead of a matrix?
#6 Опубликовано: 15.08.2025 15:11:45
StvMath

StvMath

38 сообщений из 62 понравились пользователям.

Группа: 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 Опубликовано: 15.08.2025 18:41:53
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 039 сообщений из 1 703 понравились пользователям.

Группа: 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 КиБ) скачан 45 раз(а).

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 Опубликовано: 15.08.2025 19:40:12
StvMath

StvMath

38 сообщений из 62 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Alvaro Diaz Falconi 15.08.2025 22:07:35
#9 Опубликовано: 15.08.2025 22:19:04
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 039 сообщений из 1 703 понравились пользователям.

Группа: 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.
  • Новые сообщения
  • Нет новых сообщений