Post Reply 
(11C) Roots of f(x)=0 in an Interval
12-20-2018, 10:25 AM
Post: #2
RE: (11C) Roots of f(x)=0 in an Interval
(12-20-2018 07:38 AM)Gamo Wrote:  I have test these roots searching speed between the Newton's Method program from the
HP-11C User's Handbook with this HP-19C Solution Book and found that
the Half-Interval Method is faster than the Newton's Method.

The convergence speed of the binary search is linear while it is quadratic for Newton's method.
Therefore, I am somewhat skeptical of this statement.

For comparison, here is a skeleton for Newton's method for polynomials that uses Horner's method to compute both \(f(x)\) and \(f'(x)\):
Code:
01 RCL I
02 FRAC
03 STO I
04 CLx
05 ENTER
06 LBL 0
07 x<>y
08 R↑
09 ×
10 x<>y
11 +
12 LSTx
13 R↑
14 ×
15 RCL (i)
16 +
17 ISG
18 GTO 0
19 x<>y
20 ÷
21 -
22 ENTER

The coefficients of the polynomial are entered in the registers 0, 1, 2, …

Example:
Your polynomial \(x^3 - 8x^2 + 5x + 14\) is entered as:

1 STO 0
-8 STO 1
5 STO 2
-14 STO 3

The degree n is entered as nE-3 in register I:

0.003 STO I

The initial guess (e.g. 2.5) is entered in X and Y:

2.5 ENTER
R/S
2.015384615

It returns an improved estimate.
You can iterate the process for as long as you like by pressing R/S:

2.5
2.015384615
2.000030948
2.000000000

After only 3 iterations we end up with the exact result.

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (11C) Roots of f(x)=0 in an Interval - Thomas Klemm - 12-20-2018 10:25 AM



User(s) browsing this thread: 1 Guest(s)