p(x):=g(x)-f(x)

C7: 4
C6: 1
C5: 2
B3: 3
P_0: (1, 2)
P_1: (2, 1)
P_2: (3, 4)
f = Polynomial({P_0, P_1, P_2})
P_3 = (4, 1)
g = Polynomial({P_0, P_1, P_2, P_3})
h(x) = (-5 / 3 * x^(3)) + (12 * x^(2)) - (76 / 3 * x) + 17
A1: 1
B1: 1
C1: B1^(2)
A2: 1
B2: 2
C2: B2^(2)
C3: B3^(2)
A3: 1
m1: {{A1, B1, C1}, {A2, B2, C2}, {A3, B3, C3}}
m1inv: m1^(-1)
m2: {{C5}, {C6}, {C7}}
m3: (m1inv * m2)
A4: 1
B4: 4
C4: B4^(2)
D1: B1^(3)
D2: B2^(3)
D3: B3^(3)
D4: B4^(3)
m4: {{A1, B1, C1, D1}, {A2, B2, C2, D2}, {A3, B3, C3, D3}, {A4, B4, C4, D4}}
m4inv: m4^(-1)
a: x(P_0)
b: x(P_2)
m: (a + b) / 2
A: (a, 0)
B: (b, 0)
M: (m, 0)
c = Integral(f, a, b)
d = Integral(g, a, b)
p(x) = g(x) - f(x)
e = IntegralBetween(g, f, a, m)
i = IntegralBetween(g, f, m, b)
j = Integral(p, a, m)
k = Integral(p, m, b)
l = Segment(P_0, A)
n = Segment(P_1, M)
q = Segment(P_2, B)
C8: 1
B7: 3
B5: 1
B6: 2
B8: 4