Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline OchkovVF  
#1 Posted : 08 April 2023 22:07:23(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 348
Man
Russian Federation

Was thanked: 28 time(s) in 27 post(s)
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,106kb) downloaded 29 time(s).

Edited by user 08 April 2023 22:12:41(UTC)  | Reason: Not specified

thanks 1 user thanked OchkovVF for this useful post.
on 09/04/2023(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline mkraska  
#2 Posted : 09 April 2023 14:56:19(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,990
Germany

Was thanked: 1128 time(s) in 724 post(s)
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 (22kb) downloaded 10 time(s).

And this is the modified version.

Newton2Da.png
Newton2Da.sm (20kb) downloaded 14 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Jean Giraud  
#3 Posted : 09 April 2023 20:27:18(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
... can't find 2nd root

2nd root confirmed exact.

Solve(f,q,x0,x1,TOL) Copy.sm (163kb) downloaded 7 time(s).
Offline overlord  
#4 Posted : 09 April 2023 20:33:35(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,129
Turkey

Was thanked: 510 time(s) in 340 post(s)
Tried to solve your functions with al_nleqsolve().

Regards

Newton.sm (14kb) downloaded 12 time(s).

2023-04-09_20-14.png
Offline Razonar  
#5 Posted : 10 April 2023 00:19:38(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,368
Uruguay

Was thanked: 829 time(s) in 525 post(s)
Another way, keeping the mathematical formulation and the iteration algorithm separate. As here.

Newton2Da.sm (14kb) downloaded 11 time(s).

Clipboard01.png

Best regards.
Alvaro.

Edited by user 10 April 2023 00:27:45(UTC)  | Reason: Not specified

Offline Jean Giraud  
#6 Posted : 10 April 2023 18:25:58(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Thanks Alvaro, added to my next Samples visit.
Take care ... Jean
Offline overlord  
#7 Posted : 10 April 2023 22:21:38(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,129
Turkey

Was thanked: 510 time(s) in 340 post(s)
Originally Posted by: OchkovVF Go to Quoted Post
I cannot use the roots function

Actually, you can.

Regards

2023-04-10_22-20.png
Offline Jean Giraud  
#8 Posted : 11 April 2023 02:29:31(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: OchkovVF Go to Quoted Post
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 (28kb) downloaded 10 time(s).



Offline Razonar  
#9 Posted : 11 April 2023 20:21:16(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,368
Uruguay

Was thanked: 829 time(s) in 525 post(s)
Two variations added.

Newton2Da. v2.sm (39kb) downloaded 36 time(s).

Newton2Da. v2.pdf (153kb) downloaded 24 time(s).

Best regards.
Alvaro.


thanks 1 user thanked Razonar for this useful post.
on 03/05/2023(UTC)
Offline OchkovVF  
#10 Posted : 03 May 2023 06:37:31(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 348
Man
Russian Federation

Was thanked: 28 time(s) in 27 post(s)
Originally Posted by: Razonar Go to Quoted Post
Two variations added.

Newton2Da. v2.sm (39kb) downloaded 36 time(s).

Newton2Da. v2.pdf (153kb) downloaded 24 time(s).

Best regards.
Alvaro.



From my future article
Если уравнений не два, а три, то матрица Якоби будет состоять из трёх строк и трёх столбцов. При этом графически отображать решение придётся не двумя кривыми, а тремя поверхностями на 3D-графике, причём их взаимное пересечение и будет отмечать решение (задание читателю).
Слабо!
thanks 1 user thanked OchkovVF for this useful post.
on 03/05/2023(UTC)
Offline Jean Giraud  
#11 Posted : 03 May 2023 18:02:25(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
You may find this Treasury useful/productive.


Solve(f,q,x0,x1,TOL) Copy.sm (301kb) downloaded 14 time(s).
Users browsing this topic
Guest
Similar Topics
Newton method for nonlinear equation system (Questions)
by romanoffff 23/03/2019 23:44:12(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.