T444

f(x) = 2^((2 * x^(2)) + (4 * x))
g: y = 1
g
tarkka = IntegralBetween(g, f, -2, 0)
teksti1 = LaTeX(tarkka, true, true)
h(x) = g(x) - f(x)
A: (-2, 0)
C: (0, 0)
B: (-1, h(-1))
p = FitPoly({A, B, C}, 2)
simpson_ 2osavalia = Integral(p, -2, 0)
teksti2 = LaTeX(simpson_ 2osavalia, true, true)
D: (-1.5, h(-1.5))
E: (-0.5, h(-0.5))
q(x) = If[-2 ≤ x ≤ -1, FitPoly[{A, D, B}, 2]]
r(x) = If[-1 ≤ x ≤ 0, FitPoly[{B, E, C}, 2]]
a = Integral(q, -2, -1)
b = Integral(r, -1, 0)
simpson_4osasvalia: a + b
teksti3 = LaTeX(simpson_4osasvalia, true, true)