The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(12C) Secant Method solution of f(x)=0
03-31-2018, 12:43 PM (This post was last modified: 04-02-2018 01:49 PM by Gamo.)
Post: #1
(12C) Secant Method solution of f(x)=0
This Secant Method used only 29 line in the program but come with a cost of more steps to setup.

Setup Procedure:
1. Store Two Guesses at R0 and R2
2. Store f(x) end point at R1
3. Store Tolerant at R4
4. Store Interval at R3
5. GTO 03
6. R/S

Example: X^X=Y
Problem: X^X=1000
f(x) Program:
GTO 28
P/R
LN
LSTx
x
EEX
3
LN
-
STO1
GTO 03
P/R

Setup:
1. 3 STO 0, 5 STO 2
2. 1 STO 1
3. EEX CHS 6 STO 4
4. 1 CHS STO 3
5. GTO 03
6. R/S

Answer: 4.555535705

Program:
Code:

01 RCL 0    // Result
02 R/S       // ........and stop
03 RCL 2    // Secant Method start here 03 to 18
04 RCL 0
05 -
06 LSTx
07 STO 2
08 CLx
09 RCL 3
10 RCL 1
11 -
12 LSTx
13 STO 3
14 Rv
15 /
16 RCL 1
17 x
18 STO-0
19 RCL 0       //Stop Condition: relative error of the root
20 /
21 2             //ABS function
22 y^x
23 SQRT
24 RCL 4
25 X<>Y
26 X<=Y
27 GTO 01    //Root is found
28 RCL 0
29 .............Start f(x) here
.
.
.
STO 1
GTO 03........Iteration Loop and End f(x)

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


Messages In This Thread
(12C) Secant Method solution of f(x)=0 - Gamo - 03-31-2018 12:43 PM



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