Newton method

Newton method - Mensajes

#1 Publicado: 8/4/2023 16:07:23
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

I cannot use the roots function and must use one old good simple method by Newton.
What can you say about it?

Newton-Eng.docx (1,07 MiB) descargado 989 vez(es).
A 1 usuarios les gustó este mensaje
Martin Kraska 9/4/2023 8:50:00
#2 Publicado: 9/4/2023 8:56:19
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: Moderator

Very nice.

I had problems when reproducing your 2D version. Depending on initial guess I got errors "requested matrix element does not exist". The situation seemed to improve a little by pre-allocating the vectors X and Y yet it didn't become really robust.

So instead of assigning to j+1 elements I used augment() to add new points to the iteration history.

This is the original version:

Newton2D.png
Newton2D.sm (21,4 KiB) descargado 1559 vez(es).

And this is the modified version.

Newton2Da.png
Newton2Da.sm (19,03 KiB) descargado 1680 vez(es).
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#3 Publicado: 9/4/2023 14:27:18
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

... can't find 2nd root


2nd root confirmed exact.

Solve(f,q,x0,x1,TOL) Copy.sm (162,62 KiB) descargado 1679 vez(es).
#4 Publicado: 9/4/2023 14:33:35
overlord

overlord

600 me gusta en 1.381 mensajes.

Grupo: Moderator

Tried to solve your functions with al_nleqsolve().

Regards

Newton.sm (13,85 KiB) descargado 1597 vez(es).

2023-04-09_20-14.png
#5 Publicado: 9/4/2023 18:19:38
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: User

Another way, keeping the mathematical formulation and the iteration algorithm separate. As here.

Newton2Da.sm (13,34 KiB) descargado 1725 vez(es).

Clipboard01.png

Best regards.
Alvaro.
#6 Publicado: 10/4/2023 12:25:58
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Thanks Alvaro, added to my next Samples visit.
Take care ... Jean
#7 Publicado: 10/4/2023 16:21:38
overlord

overlord

600 me gusta en 1.381 mensajes.

Grupo: Moderator

Wrote

I cannot use the roots function


Actually, you can.

Regards

2023-04-10_22-20.png
#8 Publicado: 10/4/2023 20:29:31
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

I cannot use the roots function and must use one old good simple method by Newton.
What can you say about it?


An old vintage in Smath ... two examples.
Take care Valery ... Jean.

Solve_roost f1(x,y). f2(x,y).sm (27,42 KiB) descargado 1672 vez(es).



#9 Publicado: 11/4/2023 14:21:16
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: User

Two variations added.

Newton2Da. v2.sm (38,35 KiB) descargado 1669 vez(es).

Newton2Da. v2.pdf (152,11 KiB) descargado 1143 vez(es).

Best regards.
Alvaro.



A 1 usuarios les gustó este mensaje
sergio 3/5/2023 14:29:00
#10 Publicado: 3/5/2023 0:37:31
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

Wrote

Two variations added.

Newton2Da. v2.sm (38,35 KiB) descargado 1669 vez(es).

Newton2Da. v2.pdf (152,11 KiB) descargado 1143 vez(es).

Best regards.
Alvaro.




From my future article
Если уравнений не два, а три, то матрица Якоби будет состоять из трёх строк и трёх столбцов. При этом графически отображать решение придётся не двумя кривыми, а тремя поверхностями на 3D-графике, причём их взаимное пересечение и будет отмечать решение (задание читателю).
Слабо!
A 1 usuarios les gustó este mensaje
Alvaro 3/5/2023 3:21:00
#11 Publicado: 3/5/2023 12:02:25
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

You may find this Treasury useful/productive.


Solve(f,q,x0,x1,TOL) Copy.sm (300,16 KiB) descargado 1703 vez(es).
  • Nuevos mensajes
  • Sin mensajes nuevos