a

b

n

f(x) = x^(2)
a = 0 (slider from 0 to b, step 1)
b = 2 (slider from 0 to 5, step 1)
g: x = a
h: x = b
n = 5 (slider from 5 to 30, step 1)
c = Integral(f, a, b)
text2: "\begin{eqnarray}
S_n&=&\int_{a}^{b}{f(x)dx}\\
&=&\int_{" + (LaTeX[a]) + "}^{" + (LaTeX[b]) + "}f(x)dx
\end{eqnarray}"
text1: "S_n=\lim_{n\to\infty}\frac{1}{n}\sum_{k=1" + (LaTeX[If[a ≟ 0, "", a ≟ 1, "+n", a ≠ 1 ∧ a ≠ 1, "+" + a + "n"]]) + "}^{" + (LaTeX[If[b ≟ 1, "", "" + b]]) + "n}{f\left( \frac{k}{n}  \right) }\\
\lim_{n\to\infty}\frac{1" + (LaTeX[If[a ≟ 0, "", "+" + a]]) + "}{n}=" + (LaTeX[a]) + "\\
\lim_{n\to\infty}\frac{" + (LaTeX[If[b ≟ 1, "", "" + b]]) + "n}{n}=" + (LaTeX[b]) + ""
l1 = Sequence(Polygon[(i, 0), (i + 1 / n, 0), (i + 1 / n, f(i + 1 / n)), (i, f(i + 1 / n))], i, a, b - 1 / n, 1 / n)