f(x) = 3^((2 * x))
g(x) = 3^(x^(2))
A = Intersect(g, f, (-4.879263087047248E-12, 1))
B = Intersect(f, g, (1.999999999896425, 80.99999998156623))
tarkka = IntegralBetween(f, g, 0, 2)
teksti1 = LaTeX(tarkka, true, true)
h(x) = If[0 ≤ x ≤ 2, abs(f(x) - g(x))]
n = 19 (slider from 1 to 400, step 1)
l1 = Sequence(2 / ((2 * n)) + (2 / n * p), p, 0, n - 1, 1)
l2 = Sequence(h(2 / ((2 * n)) + (2 / n * p)), p, 0, n - 1, 1)
l3 = Sequence((2 / ((2 * n)) + (2 / n * p), h(2 / ((2 * n)) + (2 / n * p))), p, 0, n - 1, 1)
l4 = Sequence((2 / n * h(2 / ((2 * n)) + (2 / n * p))), p, 0, n - 1, 1)
keskipistearvio = Sum(l4)
teksti2 = LaTeX(keskipistearvio, true, true)