Somme de Riemann d'une fonction croissante
Author: JPS

Nombre de subdivisions : 

BORNES DE L'INTERVALLE : 

d

aa

b = 10 (slider from 0 to 10, step 1)
f(x) = 5 * log(x + 4)
n = 3 (slider from 1 to 30, step 1)
a = -1 (slider from -1 to b, step 1)
h: (b - a) / n
aire_{Ld} = Sequence(Area[Polygon[(a + k * h, 0), (a + k * h, f(a + (k + 1) * h)), (a + (k + 1) * h, f(a + (k + 1) * h)), (a + (k + 1) * h, 0)]], k, 0, n - 1)
aire_{Lg} = Sequence(Area[Polygon[(a + k * h, 0), (a + k * h, f(a + k * h)), (a + (k + 1) * h, f(a + k * h)), (a + (k + 1) * h, 0)]], k, 0, n - 1)
poly1, c, d, e, g_1 = Polygon((a, 0), (a, f(a)), (a + h, f(a)), (a + h, 0))
Ld = Sequence(Polygon[(a + k * h, 0), (a + k * h, f(a + (k + 1) * h)), (a + (k + 1) * h, f(a + (k + 1) * h)), (a + (k + 1) * h, 0)], k, 0, n - 1)
Lg = Sequence(Polygon[(a + k * h, 0), (a + k * h, f(a + k * h)), (a + (k + 1) * h, f(a + k * h)), (a + (k + 1) * h, 0)], k, 0, n - 1)
Gauche = Sum(aire_{Lg})
text1: "L'aire des rectangles à gauche est : " + Gauche + ""
Droite = Sum(aire_{Ld})
text2: "L'aire des rectangles à droite est : " + Droite + ""
g = true
i = true
Z = Integral(f, a, b)
f_1(x) = -(x + 6.480252764612953) * (x - 3.5197472353870474) * (x - 5.519747235387047) * (x - 13.519747235387047) / 400 + 6.955766192733018
h_1: (b - a) / n
aire_1 = Sequence(Area[Polygon[(a + k * h_1, 0), (a + k * h_1, f_1(a + (k + 1) * h_1)), (a + (k + 1) * h_1, f_1(a + (k + 1) * h_1)), (a + (k + 1) * h_1, 0)]], k, 0, n - 1)
Droite_1 = Sum(aire_1)
text2_1: "L'aire sous la courbe est : " + Z + ""
j = false
A: (a, 0)
B: (b, 0)
c_1 = 0