x_m

x_m-s

x_m+s

x_m-\frac{h}{2}

x_m+\frac{h}{2}

f(x_m-s)

f(x_m+s)

f(x_m)

d_2

d_1

d_1-d_2

f(x) = 8 + 2 / 31 + (1 / 124 * (x - 12)^(3))
n = 2 (slider from 2 to 16, step 1)
g(x) = If[2 ≤ x ≤ 10, f(x)]
a = RectangleSum(f, 2, 10, 1, 0.5)
h = Segment((10, 0), (10, f(10)))
b = IntegralBetween(f, f(6), 2, 10)
c = IntegralBetween(f(12 - x), f(6), 2, 6)
d = IntegralBetween((2 * f(6)) - f(12 - x), f, 2, 6)
A = (2.998665068047933, 6.351428571428576)
B = Point(g)
C: (3, 2.22571)
i = Segment(A, C)
D = (8.995999721714393, 6.351428571428576)
E: (9, 7.87143)
j = Segment(D, E)
F = Point(i)
G = Point(i)
k = Segment(F, G)
H = (6, 0)
I = (6, -0.70164)
l = Segment(H, I)
H_1 = (9, 0)
I_1 = (9, -0.70164)
l_1 = Segment(H_1, I_1)
H_2 = (3, 0)
I_2 = (3, -0.70164)
l_2 = Segment(H_2, I_2)
H_3 = (10, 0)
I_3 = (10, -0.70164)
l_3 = Segment(H_3, I_3)
H_4 = (2, 0)
I_4 = (2, -0.70164)
l_4 = Segment(H_4, I_4)
m = OrthogonalLine(H, xAxis)
J = Intersect(f, m)
p = Segment(J, H)
q = Segment(D, H_1)
r = Segment(C, H_2)