幾何直觀上和與下和(2)
Author: 藍邦偉  老師

比較上和的差

L_n

L_2_n

U_n

U_2_n

比較下和的差

$ 幾何直觀遞減函數的上和$
$與下和 $

a = -0.9 (slider from -1.2 to -0.5, step 0.1)
k = 1 (slider from 0.9 to 1, step 0.01)
f(x) = k + a * x^(2)
n = 3 (slider from 3 to 5, step 1)
F = (1, 0)
b: x(F)
E = Point(xAxis)
a_1: x(E)
l: b - a_1
list_a = Sequence(x(E) + l / n * k, k, 0, n)
L_1: x = x(E)
L_2: x = x(F)
list_c = Sequence((Element[list_a, k], f(Element[list_a, k])), k, 1, n + 1)
list_b = Sequence((Element[list_a, k], 0), k, 1, n + 1)
list_d = Sequence((x(Element[list_b, k + 1]), y(Element[list_c, k])), k, 1, n)
d: l / n
list_f = Sequence(x(E) + l / (2 * n) * k, k, 0, 2 * n)
list_g = Sequence((Element[list_f, k] + l / (2 * n), 0), k, 1, 2 * n, 2)
list_h = Sequence((Element[list_f, k] + l / (2 * n), f(Element[list_f, k] + l / (2 * n))), k, 1, 2 * n, 2)
list_j = Sequence((Element[list_f, k] + l / (2 * n), f(Element[list_f, k])), k, 1, 2 * n, 2)
list_k = Sequence((x(Element[list_b, k + 1]), y(Element[list_h, k])), k, 1, n)
List_A = Sequence(Polygon[Element[list_j, k], Element[list_d, k], Element[list_k, k], Element[list_h, k]], k, 1, n)
list_e = Sequence((x(Element[list_b, k]), y(Element[list_c, k])), k, 1, n + 1)
list_m = Sequence((x(Element[list_b, k]) - l / n, y(Element[list_c, k])), k, 2, n + 1)
list_n = Sequence((x(Element[list_b, k]) - l / (2 * n), y(Element[list_c, k])), k, 2, n + 1)
list_p = Sequence((x(Element[list_g, k]), f(x(Element[list_g, k]))), k, 1, n + 1)
list_q = Sequence((x(Element[list_b, k]) - l / n, y(Element[list_p, k - 1])), k, 2, n + 1)
List_B = Sequence(Polygon[Element[list_q, k], Element[list_p, k], Element[list_n, k], Element[list_m, k]], k, 1, n)
a3 = false
a1 = false
a2 = false
a4 = false
a5 = false
a6 = false
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
L_n = LowerSum(f, a_1, b, n)
L_{2n} = LowerSum(f, a_1, b, 2 * n)
U_n = UpperSum(f, a_1, b, n)
U_{2n} = UpperSum(f, a_1, b, 2 * n)
text1: "$ f(x)=" + (LaTeX[f]) + " $"
Q_2: 0.25 * Corner[2] + 0.75 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
poly1, c, q_2, q_3, e = Polygon(Corner[1], Q_2, Q_3, Corner[4])