Show Area Info.

f(x)

\Delta x\;does\
not\;exist

Show Function

Show Rectangle Info.

Show Area

Area_{estimate}=0

Error=100\;\%

Show infinity

n=∞

n→∞

A = Point(yAxis)
B = (1, 6.64)
C = (2, 6.82)
D = (3.02, 6.8)
E = (4, 6.74)
F = (5, 6.66)
G = (7, 6.56)
H = (6.98, 6.46)
I = (8, 6.34)
J = (9, 6.18)
K = (10, 6.06)
L = (11, 5.9)
M = (11.98, 5.78)
N = (13.04, 5.6)
O = (13.98, 5.42)
P = (15, 5.2)
Q = (16, 5)
f = FitPoly({A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q}, 6)
g = Function(f, 0, 16)
n = 0 (slider from 0 to 1000, step 1)
start = 0 (slider from 0 to 8, step 1)
end = 16 (slider from 8 to 16, step 1)
rwidth: (end - start) / n
rlhs = Sequence(start + (i * rwidth), i, 0, n - 1)
rrhs = Sequence(start + (i * rwidth), i, 1, n)
rheight = Sequence(g(Element[rlhs, i]), i, 1, n)
rectangles1 = Sequence(Polygon[(Element[rlhs, i], 0), (Element[rrhs, i], 0), (Element[rrhs, i], Element[rheight, i]), (Element[rlhs, i], Element[rheight, i]), (Element[rlhs, i], 0)], i, 1, n)
rectangles2: rectangles1
text1: "\Delta x=" + (LaTeX[rwidth]) + ""
vectorwidth1 = Sequence(Vector[(Element[rlhs, i], -1), (Element[rrhs, i], -1)], i, 1, n)
vectorwidth2 = Sequence(Vector[(Element[rrhs, i], -1), (Element[rlhs, i], -1)], i, 1, n)
vectorheight1 = Sequence(Vector[(Element[rlhs, i] + (0.02 * rwidth), 0), (Element[rlhs, i] + (0.02 * rwidth), Element[rheight, i])], i, 1, n)
vectorheight2 = Sequence(Vector[(Element[rlhs, i] + (0.02 * rwidth), Element[rheight, i]), (Element[rlhs, i] + (0.02 * rwidth), 0)], i, 1, n)
text2: "n=" + (LaTeX[n]) + ""
hhoriz = Sequence(Text["h=" + (Element[rheight, i]), (Element[rlhs, i] + 0.1, 4)], i, 1, n)
Area_{true} = Integral(g, start, end)
Area_{estimate} = Sum(rectangles1)
Error_p: (sqrt((Area_{estimate} - Area_{true})^(2)) * 100 / Area_{true})
text3: "Error=" + (LaTeX[Error_p]) + "\,\%"
hvert = Sequence(Text[RotateText[Element[hhoriz, i], 90*°], (Element[rlhs, i] + 0.3, 5), true, true], i, 0, n)
a = false
text5 = RotateText("Height", 1.5707963267948966)
text6 = Text("Width")
text8: "Area_{\,true}=" + (LaTeX[Area_{true}]) + ""
text9: "Area_{\,\,estimate}=" + (LaTeX[Area_{estimate}]) + ""
b = false
c = false
Fade = 0 (slider from 0 to 1, step 0.01)
d = false
R = (-1.28, 8.02)
S = (-1.28, -1.64)
T = (21.68, -1.64)
U = (21.68, 8.04)
poly1, r, s, t, u = Polygon(R, S, T, U)
text10: "Area_{true}=" + (LaTeX[Area_{true}]) + ""
e = false