:Input H
:Disp “N”
:Input N
:0 → J
:Lbl 1
:X → P
:Y → Q
:Pt-On(X,Y)
:P → X
:Q → Y
:X + HY
1
→ X
:Y + HY
2
→ Y
:J + 1 → J
:If J ≤ N
:Goto 1
:Stop
Program EVAL
Output: f(x)
Input: f(x) as Y
1
, x
:Lbl 1
:Disp “X=”
:Input X
:Disp “Y
1
=”
:Disp Y
1
:Goto 1
Program MSUM
Output: Riemann sum
n
X
k=1
f(¯x
k
) ∆x where ¯x
k
is the
mid point of each subinterval.
Input: f(x) as Y
1
, A as a and B as b where [a, b] is the
given interval, N as n
:Disp “A”
:Input A
:Disp “B”
:Input B
:Disp “N”
:Input N
:0 → S
:(B − A)/N → H
:A + .5H → X
:Lbl 1
:S + Y
1
→ S
:X + H → X
:IF X < B
:Goto 1
:SH → S
:Disp “MSUM”
:Disp S
:STOP
Program NDER2
Output: A numerical approximation to f
00
(c).
Input: f(x) as Y
1
, c
:Disp “C”
:Input C
:(nDeriv(Y
1
, X, C + .001)−
nDeriv(Y
1
, X, C − .001))/.002 → T
:Disp “NUM 2ND DERIV”
:Disp T
Program NDER2G
Output: Graph of y = f
00
(x), where f
00
(x) is the nu-
merical approximation to f
00
(x) given by NDER2.
Input: f(x) as Y
1
. Set range variables as desired.
:(Xmax−Xmin)/94 → H
:1 → N
:ClrDraw
:FnOff
:Lbl 1
:Xmin+NH → T
:(nDeriv(Y
1
, X, T + .001)−
nDeriv(Y
1
, X, T −.001))/.002 → U
:Pt-On(T, U)
:N + 1 → N
:If N ≤ 94
:Goto 1
Program NEWT
Output: Newton’s rule approximations to the solution
of f (x) = 0. Press the
ENTER key to see the next
iteration.
Input: f(x) as Y
1
, the initial guess x
1
.
:Disp “X1”
:Input X
:Lbl 1
:X − Y
1
/nDeriv(Y
1
, X, X) → R
:Disp R
:Pause
:R → X
:Goto 1
54