Post Reply 
(41C) Method of Successive Substitutions
06-10-2022, 07:20 AM
Post: #3
RE: (41C) Method of Successive Substitutions
(10-04-2020 04:21 PM)Eddie W. Shore Wrote:  Be aware, some equations cannot be solved in this manner, such as x = π / sin x and x = ln(1 / x^4).

In such cases we can often calculate \( f^{-1} \) algebraically and use this in the fixed-point iteration instead.

Examples

\(
\begin{align}
f(x) &= \log\left(\frac{1}{x^4}\right) \\
\\
f^{-1}(x) &= \sqrt[4]{\frac{1}{e^x}} \\
\end{align}

\)

Code:
00 { 4-Byte Prgm }
01 E↑X
02 1/X
03 SQRT
04 SQRT
05 END

If we start with \( 1 \) and iterate the program we get:

1.000000000
0.778800783
0.823081384
0.814019998
0.815866125
0.815489664
0.815566418
0.815550768
0.815553959
0.815553309
0.815553441
0.815553414
0.815553420
0.815553419
0.815553419


The other example is a bit more complicated since ASIN returns a value that doesn't come close to a solution.
So we need to adjust this by adding \( 2 \pi \):

\(
\begin{align}
f(x) &= \frac{\pi}{\sin(x)} \\
\\
f^{-1}(x) &= \sin^{-1}\left(\frac{\pi}{x}\right) + 2 \pi \\
\end{align}
\)

Code:
00 { 9-Byte Prgm }
01 PI
02 X<>Y
03 ÷
04 ASIN
05 PI
06 2
07 ×
08 +
09 END

If we start with \( 6 \) and iterate the program we get:

6.000000000
6.834254890
6.760823831
6.766453994
6.766017396
6.766051223
6.766048602
6.766048805
6.766048789
6.766048791
6.766048790
6.766048790


The reason this works is that at a fixed-point we have \( x = f(x) \) and thus:

\(
\begin{align}
\frac{\mathrm{d}}{\mathrm{d} x} [ f^{-1}\left(f(x)\right) ] &= \frac{\mathrm{d}}{\mathrm{d} x} x \\
\\
{[f^{-1}]}' \left(f(x)\right) \cdot {f}'(x) &= 1 \\
\\
{[f^{-1}]}' \left(x\right) \cdot {f}'(x) &= 1 \\
\end{align}
\)

A fixed-point is attractive if \( |f'(x)| < 1 \).
If this is not the case for \( f \), then the equation above shows that it is true for the derivative of the inverse function.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (41C) Method of Successive Substitutions - Thomas Klemm - 06-10-2022 07:20 AM



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