1 страниц (11 вхождений)
Newton method - Сообщения
#1 Опубликовано: 08.04.2023 16:07:23
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 МиБ) скачан 54 раз(а).
What can you say about it?
Newton-Eng.docx (1 МиБ) скачан 54 раз(а).
1 пользователям понравился этот пост
Martin Kraska 09.04.2023 08:50:00
#2 Опубликовано: 09.04.2023 08:56:19
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.sm (21 КиБ) скачан 38 раз(а).
And this is the modified version.

Newton2Da.sm (19 КиБ) скачан 36 раз(а).
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.sm (21 КиБ) скачан 38 раз(а).
And this is the modified version.
Newton2Da.sm (19 КиБ) скачан 36 раз(а).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Опубликовано: 09.04.2023 14:27:18
Wrote... can't find 2nd root
2nd root confirmed exact.
Solve(f,q,x0,x1,TOL) Copy.sm (162 КиБ) скачан 26 раз(а).
#4 Опубликовано: 09.04.2023 14:33:35
#5 Опубликовано: 09.04.2023 18:19:38
Another way, keeping the mathematical formulation and the iteration algorithm separate. As here.
Newton2Da.sm (13 КиБ) скачан 37 раз(а).

Best regards.
Alvaro.
Newton2Da.sm (13 КиБ) скачан 37 раз(а).
Best regards.
Alvaro.
#6 Опубликовано: 10.04.2023 12:25:58
Thanks Alvaro, added to my next Samples visit.
Take care ... Jean
Take care ... Jean
#7 Опубликовано: 10.04.2023 16:21:38
#8 Опубликовано: 10.04.2023 20:29:31
WroteI 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 КиБ) скачан 33 раз(а).
#9 Опубликовано: 11.04.2023 14:21:16
Two variations added.
Newton2Da. v2.sm (38 КиБ) скачан 58 раз(а).
Newton2Da. v2.pdf (152 КиБ) скачан 49 раз(а).
Best regards.
Alvaro.
Newton2Da. v2.sm (38 КиБ) скачан 58 раз(а).
Newton2Da. v2.pdf (152 КиБ) скачан 49 раз(а).
Best regards.
Alvaro.
1 пользователям понравился этот пост
sergio 03.05.2023 14:29:00
#10 Опубликовано: 03.05.2023 00:37:31
WroteTwo variations added.
Newton2Da. v2.sm (38 КиБ) скачан 58 раз(а).
Newton2Da. v2.pdf (152 КиБ) скачан 49 раз(а).
Best regards.
Alvaro.
From my future article
Если уравнений не два, а три, то матрица Якоби будет состоять из трёх строк и трёх столбцов. При этом графически отображать решение придётся не двумя кривыми, а тремя поверхностями на 3D-графике, причём их взаимное пересечение и будет отмечать решение (задание читателю).
Слабо!
1 пользователям понравился этот пост
Alvaro Diaz Falconi 03.05.2023 03:21:00
#11 Опубликовано: 03.05.2023 12:02:25
You may find this Treasury useful/productive.
Solve(f,q,x0,x1,TOL) Copy.sm (300 КиБ) скачан 34 раз(а).
Solve(f,q,x0,x1,TOL) Copy.sm (300 КиБ) скачан 34 раз(а).
1 страниц (11 вхождений)
-
Новые сообщения
-
Нет новых сообщений