Mathcad Prime root vs SMath Studio roots/FindRoot

Mathcad Prime root vs SMath Studio roots/FindRoot - How to make SMath root function to behave like Mathcad Prime root function? - Mensajes

#1 Publicado: 7/10/2024 14:11:16
Cornel

Cornel

2 me gusta en 78 mensajes.

Grupo: User

Hi,

How to make Smath root function to work as in Mathcad Prime. Right now I am not interestead in find the solution with Solve or maple plugin. Only I want to know it it is possible to make Smath to behave the same way for this root function.

mathcadprimvssmath1.png
#2 Publicado: 7/10/2024 15:40:48
Cornel

Cornel

2 me gusta en 78 mensajes.

Grupo: User

Maybe as an idea on how to start, something like that: but using only one FindRoot, and iterating the radom(20)+i (second parameter of FindRoot)

3.png
#3 Publicado: 7/10/2024 16:44:39
Davide Carpi

Davide Carpi

1.443 me gusta en 2.936 mensajes.

Grupo: Moderator

Like this?

always remember to check the results, sometimes FindRoot might return a result far from the solution.

FindRoot_range_random.sm (9,25 KiB) descargado 1679 vez(es).
2024-10-07 11_35_41-SMath Solver - [FindRoot_range_random.sm].png

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Publicado: 7/10/2024 18:13:02
Cornel

Cornel

2 me gusta en 78 mensajes.

Grupo: User


1.png
#5 Publicado: 7/10/2024 18:24:39
Вячеслав Мезенцев

Вячеслав Мезенцев

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

maple-solve-optimization-numeric.JPG
Russia ☭ forever, Viacheslav N. Mezentsev
A 1 usuarios les gustó este mensaje
Davide Carpi 7/10/2024 18:26:00
#6 Publicado: 7/10/2024 18:30:21
Cornel

Cornel

2 me gusta en 78 mensajes.

Grupo: User

Wrote

maple-solve-optimization-numeric.JPG



But this is the result with maple engine. The same result should not be obtained also with Maxima engine, as I showed above by using Solve? So, we need always to check the results with both engines? Seems strange then to me...
#7 Publicado: 8/10/2024 0:41:36
Cornel

Cornel

2 me gusta en 78 mensajes.

Grupo: User

uni, what I do dont yet understand îs why Maxima engine (by using Solve(f(x), x)) gives that "strânge" 4 results (different by maple and mathcad prime results)?
#8 Publicado: 8/10/2024 1:20:46
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: User

Some comments. The solutions for mathcad's solve and SMath's FindRoots are numerical, so they depend on the initial values, and are susceptible to returning wrong values, without this being considered a bug in the function itself. Therefore, Davide's recommendation to verify the solutions is very accurate. In addition, they can find numerous solutions to a second or fourth degree polynomial equation, even if there is a theorem that says they are exactly two and four respectively.

The solutions for Maple and Maxima are symbolic. If they were wrong, that is, they did not verify the initial equation, then it would be necessary to state that it is a bug in the program. But both systems return the same solution, except that they are expressed differently, which is perfectly valid. This is a way of showing that the solutions for Maple and Maxima are the same.

roots.sm (8,95 KiB) descargado 1766 vez(es).

root.png

Best regards.
Alvaro.
A 1 usuarios les gustó este mensaje
#9 Publicado: 8/10/2024 1:50:22
Вячеслав Мезенцев

Вячеслав Мезенцев

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

Imagine that the fourth root of -1 is the root of the imaginary unit and that is a 45 degree rotation. Rotate each solution from the unit vector by the appropriate angle in the desired direction.

In computer algebra, there is a problem with the output of equivalent expressions. If two solutions are equivalent, then the more compact textual representation is usually chosen for display. The symbolic engine can be asked to output in a different form. Such capabilities should be available.
Russia ☭ forever, Viacheslav N. Mezentsev
#10 Publicado: 8/10/2024 3:20:43
Cornel

Cornel

2 me gusta en 78 mensajes.

Grupo: User

Ok Alvaro, now I can understand. Thanks You all for all responses.
#11 Publicado: 8/10/2024 14:52:53
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: Moderator

Note that you can use Assign() for more options to control the display of solutions given as boolean equations (here you want the numerical values). The side effect is that the equations are converted to assignments. This is actually the primary task of Assign().

Blatt32.png
Blatt32.sm (5,46 KiB) descargado 1663 vez(es).
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
  • Nuevos mensajes
  • Sin mensajes nuevos