Texas Instruments TI-83 Manual page 28

Hide thumbs Also See for TI-83:
Table of Contents

Advertisement

Program TRAP
Output:
Trapezoidal
b
f (x) dx.
a
Input: f (x) as Y
, A as a, B as b, N as n
1
:Disp "A"
:Input A
:Disp "B"
:Input B
:Disp "N"
:Input N
:0→S
:(B-A)/N→H
:A → X
:Y
→ U
1
:B → X
:Y
→ V
1
:A + H → X
:Lbl 1
:S+Y
→S
1
:X + H → X
:If X < B
.5H
:Goto 1
:(.5U + S + .5V )H → T
:Disp "T ="
:Disp T
:Stop
VOL
Output: The Riemann sums
n
f (x
, y
)hw where h = (b
i
j
i,j=1
with (x
, y
) taken first at the lower left-hand corner
i
j
of each subrectangle and then at the upper right-hand
corner. The function z = f (x, y) is defined on the rect-
angle D = {(x, y) : A ≤ x ≤ B, C ≤ y ≤ D }. The
program pauses after the first Riemann sum. Press RE-
TURN to obtain the second sum.
Input: f (x, y) as Y
, A as a, B as b, C as c, D as d, N
1
as n.
:Disp "A ="
:Input A
:Disp "B ="
:Input B
:Disp "C ="
:Input C
:Disp "D ="
:Input D
:Disp "N ="
rule
approximation
a)/n, w = (d
c)/n
:Input N
:0 → S
to
:(B
A)/N → H
:(D
C)/N → W
:A + H → X
:C + W → Y
:Lbl 1
:S + Y
→ S
1
:Y + W → Y
:If Y < D
.5 ∗ W
:Goto 1
:C + W → Y
:X + H → X
:If X < B
.5 ∗ H
:Goto 1
:S → L
:A → X
:C → Y
:Lbl 2
:Y
+ L → L
1
:Y + W → Y
:If Y < D
.5 ∗ W
:Goto 2
:A + H → X
:C → Y
:Lbl 3
:Y
+ L → L
1
:X + H → X
:If X < B
.5 ∗ H
:Goto 3
:L ∗ H ∗ W → L
:Disp L
:Pause
:S → R
:A + H → X
:D → Y
:Lbl 4
:R + Y
→ R
1
:X + H → X
:If X < B + .5 ∗ H
:Goto 4
:B → X
:C + W → Y
:Lbl 5
:R + Y
→ R
1
:Y + W → Y
:If Y < D
.5 ∗ W
:Goto 5
:R ∗ H ∗ W → R
:Disp R
57

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-82Ti-85Ti-86

Table of Contents