f(x) = (1 / 3 * x^(2)) - (2 * x) + 4
teksti1 = LaTeX(f, true, true)
n = 7 (slider from 1 to 30, step 1)
l2 = Sequence((1 + (3 / n * p), 0), p, 0, n, 1)
l3 = Sequence(Cylinder[l2(p), l2(p + 1), y(Max[f, 1 + (3 / n * (p - 1)), 1 + (3 / n * p)])], p, 1, n, 1)
ylälieriöt = Sum(l3)
teksti2 = LaTeX(ylälieriöt, true, true)
l4 = Sequence(Cylinder[l2(p), l2(p + 1), y(Min[f, 1 + (3 / n * (p - 1)), 1 + (3 / n * p)])], p, 1, n, 1)
alalieriöt = Sum(l4)
teksti3 = LaTeX(alalieriöt, true, true)
tarkka = Integral((π * f(x)^(2)), 1, 4)
teksti4 = LaTeX(tarkka, true, true)
b: 1 ≤ x ≤ 4
l1 = Sequence(1 + (3 / n * p), p, 0, n, 1)
a = Surface(t, (f(t) * cos(s)), (f(t) * sin(s)), t, 1, 4, s, (-5 * π / 4), π / 2)
alasumma = LowerSum(f, 1, 4, n)
yläsumma = UpperSum(f, 1, 4, n)