Using integral definition to solve this integral I'm trying to solve this question using the definition of integral:


  $$\int^5_2 (4-2x)dx$$


Definition of integral:

We define first the inferior and superior sum:

Let $f:[a,b]\to \mathbb R$ be a bounded function and $P=\{t_0,\ldots,t_n\}$ a partition of [a,b], so we define:

$$s(f;P)=\sum_{i=1}^nm_i(t_i-t_{i-1})$$

$$S(f;P)=\sum_{i=1}^nM_i(t_i-t_{i-1})$$

Where $m_i=\inf\{f(x);x\in [t_i,t_{i-1}]\}$ and $M_i=\sup\{f(x);x\in [t_i,t_{i-1}]\}$ and ().

No we define the inferior and superior integral:

Inferior integral: $\underline\int^b_a=\sup_P s(f;P)$

Superior integral: $\bar\int^b_a=\inf_P s(f;P)$

At last, we define the integral being the superior or inferior integral when they are the same.

My attempt

I know:

$s(f,P)=\sum_{i=1}^n(4-2t_i)(t_i-t_{i-1})$ (because the function is decreasing)

But I don't know how to take the supreme of this sum.

Thanks.
The contributions from fellow users Mhenni Benghorbal and oks pave the way.

Using equidistant spacings one can perform the summation like this:
$$
\begin{align}
s(f,P') &amp;= \sum_{i=1}^n(4-2t_i)(t_i-t_{i-1}) \\
&amp;= \left(\sum_{i=1}^n 4 - 2 \left(a + \frac{b-a}{n} i \right) \right)\frac{b-a}{n} \\
&amp;= \left(4n - 2 \left(a n + (b-a) \frac{n+1}{2} \right) \right) \frac{b-a}{n} \\
&amp;= \left(4 - 2a - (b-a)\left(1+ \frac{1}{n}\right) \right) (b-a) \\
&amp;= \left(4 - 2a - (b-a)\right) (b-a) - \frac{(b-a)^2}{n} \\
\Rightarrow \sup s(f, P') &amp;= \left(4 - 2a - (b-a) \right) (b-a) \\
&amp;=4(b-a) -(b+a)(b-a) \\
&amp;=4(b-a) -(b^2 - a^2) 
\end{align}
$$
and
$$
\begin{align}
S(f,P') &amp;= \sum_{i=1}^n(4-2t_{i-1})(t_i-t_{i-1}) \\
&amp;= \left(\sum_{i=1}^n 4 - 2 \left(a + \frac{b-a}{n} (i-1) \right) \right)\frac{b-a}{n} \\
&amp;= \left(4n - 2 \left(a n + (b-a) \frac{n-1}{2} \right) \right) \frac{b-a}{n} \\
&amp;= \left(4 - 2a - (b-a)\left(1-\frac{1}{n}\right) \right) (b-a) \\
&amp;= \left(4 - 2a - (b-a)\right) (b-a) + \frac{(b-a)^2}{n} \\
\Rightarrow \inf S(f,P') &amp;= \left(4 - 2a - (b-a) \right) (b-a) \\
&amp;=4(b-a) -(b^2 - a^2) 
\end{align}
$$
Hint: if you are integrating over an interval $[a,b]$ then


  $$ \Delta t_i = t_i-t_{i-1} = \frac{b-a}{n}.  $$


Also, your function is a decreasing function then you should know what $m_i$ and $M_i$ are.