Compute by hand the Riemann sum:
\displaystyle\int_{0}^{B} a x \, dx.
Per definition we have
\displaystyle
\int_0^{B} f(x) \, dx =
\lim_{n \to \infty}
\left( \sum_{i=0}^{n-1} f(x_i) \Delta x \right).
We devide [0,B]
in n
partial intervals [x_i,x_{i+1}]
of the same width \displaystyle \Delta x =
\frac{B -0}n.
Therefore x_i = i \cdot \dfrac{B}n
.
Using this we determine the limit.
It follows:
\displaystyle
\lim_{n \to \infty}
\left( \sum_{i=0}^{n-1} f(x_i) \Delta x \right) =
\lim_{n \to \infty}
\left( \sum_{i=0}^{n-1} a \cdot i \cdot
\frac{B}{n} \cdot \frac{B}{n} \right)
= \lim_{n \to \infty}
\left( \dfrac{a*B*B}{n^2} \sum_{i=0}^{n-1} i \right)
.
Apply now that:
\displaystyle \sum_{i=0}^{n-1} i =
\frac{(n-1)n}{2}.
It yields:
\displaystyle
\lim_{n \to \infty}
\left( \frac{a*B*B}{{\color{blue}n^2}}
\sum_{i=0}^{n-1} i \right)
= \lim_{n \to \infty}
\left( \frac{a*B*B}{{\color{blue}n^2}} \cdot
\frac{(n-1)n}{2} \right)
= \dfrac{a*B*B}{2} \cdot
{\color{blue}\lim_{n \to \infty} \frac{(n-1)n}{n^2}}.
The limit is
\displaystyle
{\color{blue}\lim_{n \to \infty} \frac{(n-1)n}{n^2}}
= \lim_{n \to \infty} \frac{n^2-n}{n^2}
= \lim_{n \to \infty} 1-\frac{1}{n}
= \color{blue}1.
and eventually
\displaystyle
\int_{0}^{B} a x \, dx
= \dfrac{a*B*B}{2} \cdot {\color{blue}1} =
fractionReduce(a*B*B,2).