(41C) Method of Successive Substitutions
10-04-2020, 04:21 PM
Post: #1 Eddie W. Shore Senior Member Posts: 1,251 Joined: Dec 2013
(41C) Method of Successive Substitutions
Repeating the Calculation Again and Again

With an aid of a scientific calculator, we can solve certain problems of the form:

f(x) = x.

Examples include:

tan cos sin x = x

e^-x = x

atan √x = x

sin cos x = x

(acos x) ^ (1/3) = x

In any case with trigonometric functions, the angle mode will need to be in radians. You will also need a good guess to get to a solution and to know that at some real number x, f(x) and x intersect.

Take the equation ln(3*x) = x with initial guess x0 = 1.512

Depending on the operating of the scientific calculator the keystrokes would be:

AOS:
1.512 [ = ]
Loop: [ × ] 3 [ = ] [ ln ]

RPN:
1.512 [ENTER]
Loop: 3 [ × ] [ ln ]

ALG:
1.512 [ENTER/=]
Loop: ln( 3 * Ans) [ ENTER/= ]

Repeat the loop as many times as you like and hope you start seeing the answers converge. After repeating the loop over and over and over again, at six decimal answers, the readout will be about 1.512135.

An approximate answer to ln(3x) = x, x ≈ 1.512134552

If your calculator has a solve function, you can check the answer, but this method can be useful if your calculator does not have a solve function.

The program SUCCESS illustrates this method.

HP 41C/DM41 Program: SUCCESS
This program calls on the subroutine, FX. FX is where you enter f(x). End FX with the RTN command.

Code:
01 LBL^T SUCCESS
02 ^T F<X>=X
03 AVIEW
04 PSE
05 ^T GUESS?
06 PROMPT
07 STO 00
08 ^T PRECISION?
09 PROMPT
10 STO 02
11 0
12 STO 03
13 1
14 STO 04
15 LBL 01
16 RCL 00
17 XEQ ^FX
18 STO 01
19 RCL 00
20 -
21 ABS
22 STO 04
23 RCL 01
24 STO 00
25 1
26 ST+ 03
27 200
28 RCL 03
29 X>Y?
30 GTO 02
31 RCL 02
32 CHS
33 10↑X
34 RCL 04
35 X>Y?
36 GTO 01
37 ^T SOL=
38 ARCL 01
39 AVIEW
40 STOP
41 ^T ITER=
42 ARCL 03
43 AVIEW
44 STOP
45 ^T DIFF=
46 ARCL 04
47 AVIEW
48 STOP
49 GTO 04
50 LBL 02
51 ^T NO SOL FOUND
52 AVIEW
53 STOP
54 LBL 04
55 END

Examples for FX:

f(x) = sin cos x.

Program:
LBL ^FX
COS
SIN
RTN

f(x) = e^-x

Program:
LBL ^FX
CHS
E↑X
RTN

Be aware, some equations cannot be solved in this manner, such as x = π / sin x and x = ln(1 / x^4).

Cheung, Y.L. "Using Scientific Calculators to Demonstrate the Method of Successive Substitutions" The Mathematics Teacher. National Council of Teachers of Mathematics. January 1986, Vol. 79 No. 1 pp. 15-17 http://www.jstor.com/stable/27964746

Blog entry: https://edspi31415.blogspot.com/2020/10/...od-of.html
10-06-2020, 12:57 AM (This post was last modified: 10-06-2020 02:05 AM by Albert Chan.)
Post: #2
 Albert Chan Senior Member Posts: 1,676 Joined: Jul 2018
RE: (41C) Method of Successive Substitutions
(10-04-2020 04:21 PM)Eddie W. Shore Wrote:  Take the equation ln(3*x) = x with initial guess x0 = 1.512

Sometimes, convergence may be slow, or not at all.
We can place a weight on it.

With my Casio FX-115MS

1.512 =
ln(3 Ans ﻿
= ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → 1.512045566
= ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → 1.512075703
﻿= ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → 1.512095633

r = (95633-75703) / (75703-45566) = 19930 / 30317

Convegence is slow (we wanted small |r|)
Assume same trend continued (constant r), estimated converged to:

1.512045566 + 0.000030317/(1-r) = 1.512134548

Let's check if assumption is good. Continued on ...
w = 1/(1-r) ≈ 3 ﻿ ﻿ ﻿ ﻿ ﻿ ﻿
x = (1-w)*x + w*ln(3*x) = -2 x + 3 ln(3*x)

-2 Ans + 3 ln( 3 Ans ﻿
= ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → 1.512135175
= ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → 1.512134542
= ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → 1.512134552, converged