How to obtain the Peak of this example?

How to obtain the Peak of this example? - Messages

#1 Posted: 2/25/2023 4:14:28 AM
liwenbus

liwenbus

0 likes in 2 posts.

Group: User

Hi, guys:

Here is a formula

M.png

And the Targets are:
1. Draw the plot, but only the first quadrant is required.
2. Find the value of fn when M is maximum.
3. Find the maximum value of M.

I did the 1st target successfully, but can not find the values of fn and M. I have tried my best and search the forum but could not find any way to fix it. Please help to fix it, Thank you very much!
LLC1.png
=====================
LLC2.png
=====================
LLC.sm (12 KiB) downloaded 44 time(s).
#2 Posted: 2/25/2023 9:57:08 AM
liwenbus

liwenbus

0 likes in 2 posts.

Group: User

Wrote

Wrote

Please help to fix it, Thank you very much!


You need the Golden ratio ... doctored version.
If the function is a data set, spline/smooth the region
... as well the FindIndex is a good utility.
Cheers ... Jean

LLC Doctored for MAX.sm (27 KiB) downloaded 38 time(s).
Golden ratio QUICK Copy.sm (123 KiB) downloaded 38 time(s).



wow!I think I understand, it is very useful, thank you very much!
#3 Posted: 2/25/2023 2:41:41 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

The built-in functions are perfectly well suited for the purpose. You just need to separate differentiation from root finding.

LLC.png
LLC.sm (11 KiB) downloaded 46 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
sergio 2/25/2023 4:40:00 PM, João Felipe Seráfico Melo 2/26/2023 6:38:00 AM
#4 Posted: 2/25/2023 8:54:24 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... refreshed version.
Cheers ... Jean

Golden Search Copy.sm (23 KiB) downloaded 35 time(s).
#5 Posted: 2/26/2023 8:58:40 PM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

Here is your functions peak point solved with various solvers.

Regards

LLC1.sm (9 KiB) downloaded 46 time(s).

2023-02-27_02-57.png
#6 Posted: 2/27/2023 10:55:02 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

2. Find the value of fn when M is maximum.
3. Find the maximum value of M.


It all depend upon the accuracy you want.
Smath was not even ½ pregnant that roots existed from libraries.
Cheers ... Jean

Lambert.PNG

#7 Posted: 2/27/2023 11:13:37 PM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

Apart from Findroot() there are other functions in Nonlinear Solvers to.
Check that plugins page in Reference Book, there may some info you can use.

Regards

LLC1.sm (13 KiB) downloaded 44 time(s).

2023-02-28_05-11.png
  • New Posts New Posts
  • No New Posts No New Posts