The notion of $s(f,P)$ in Darboux sums I am trying to understand what does inf $s(f,P)$ or sup $s(f,P)$ means.
For example if I have $P=\{0,\frac{1}{4},\frac{1}{3},\frac{2}{3},\frac{8}{9},1\}$ a partition of $[0,1]$ and $f(x)=x^2$ does:
inf $s(f,P)=0*\frac{1}{4}+\frac{1}{16}*\frac{1}{12}+\frac{1}{9}*\frac{1}{3}+\frac{4}{9}*\frac{1}{3}+\frac{64}{81}*\frac{1}{9}=\frac{12979}{46656}=0.278$
Sup $s(f,P)=\frac{1}{16}*\frac{1}{4}+\frac{1}{9}*\frac{1}{12}+\frac{4}{9}*\frac{1}{3}+\frac{64}{81}*\frac{1}{3}+1*\frac{1}{9}=\frac{8515}{1552}=0.547$
If we refine the partition of the upper/lower sums, why do we then need to define upper\lower Darboux integral and not just to use the "most refined partition"?
 A: Note: The left hand side of OPs equations are lower and upper Darboux integrals whereas the right hand side are lower and upper Darbous sums. These are quite different things as we will see below.

Let us consider the bounded function $f(x)=x^2$ on $[0,1]$ and the partition $P=\{0,\frac{1}{4},\frac{1}{3},\frac{2}{3},\frac{8}{9},1\}$.
At first we want to calculate the lower Darboux sum $\underline{s}(f;P)$ which approximates the function $f$ from below with rectangles and the upper Darboux sum $\overline{s}(f;P)$ which approximates the function $f$ from above with rectangles with respect to a specific partition $P$.

$$ $$

Lower and upper Darboux sum
We consider a partition $P$ with $x_0=0<x_1<\ldots<,x_{n-1}<x_n=1$. With $I_k$ we denote the interval  $I_k:=[x_{k-1},x_k]$ for $1\leq k \leq n$. The length of each interval $|I_k|=|x_k-x_{k-1}|$ is the width of the rectangle we will use. The height $m_k$ of the rectangle with width $I_k$ is defined as
  \begin{align*}
m_k := \inf f(I_k)
\end{align*}
The lower Darboux sum $\underline{s}(f;P)$ is then defined as
  \begin{align*}
\underline{s}(f;P)=\sum_{k=1}^nm_k|I_k|\tag{1}
\end{align*}

Note that in (1) we use the infimum to define the lower Darboux sum, but they are in inner part of the sum. Analogously we define the upper Darboux sum $\overline{s}(f;P)$.

We define the height $M_k$ of the rectangle with width $I_k$ as
  \begin{align*}
M_k:=\sup f(I_k)
\end{align*}
  and define the upper Darboux sum $\overline{s}(f;P)$ as
  \begin{align*}
\overline{s}(f;P)=\sum_{k=1}^nM_k|I_k|\tag{1}
\end{align*}
Observe that foreach partition $P$ according to the construction above we obtain
  \begin{align*}
\underline{s}(f;P)\leq \overline{s}(f;P)
\end{align*}

Example: We consider the special case $P=\left\{0,\frac{1}{4},\frac{1}{3},\frac{2}{3},\frac{8}{9},1\right\}$ and $f(x)=x^2$ and calculate lower and upper Darboux sums. We obtain
\begin{align*}
\underline{s}(f;P)&=\sum_{k=1}^5 m_k|I_k|\\
&=m_1|I_1|+m_2|I_2|+m_3|I_3|+m_4|I_4|+m_5|I_5|\\
&=0^2\cdot\frac{1}{4}+\left(\frac{1}{4}\right)^2\cdot\frac{1}{12}+\left(\frac{1}{3}\right)^2\cdot\frac{1}{3}
+\left(\frac{2}{3}\right)^2\cdot\frac{2}{9}+\left(\frac{8}{9}\right)^2\cdot\frac{1}{9}\\
&=\frac{10675}{46656}\doteq 0.22880
\end{align*}
\begin{align*}
\overline{s}(f;P)&=\sum_{k=1}^5 M_k|I_k|\\
&=M_1|I_1|+M_2|I_2|+M_3|I_3|+M_4|I_4|+M_5|I_5|\\
&=\left(\frac{1}{4}\right)^2\cdot\frac{1}{4}+\left(\frac{1}{3}\right)^2\cdot\frac{1}{12}+\left(\frac{2}{3}\right)^2\cdot\frac{1}{3}
+\left(\frac{8}{9}\right)^2\cdot\frac{2}{9}+1^2\cdot\frac{1}{9}\\
&=\frac{21449}{46656}\doteq 0.45973
\end{align*}
Note that in order to calculate the lower Darboux sum $\underline{s}(f;P)$ for a specific partition $P$ we do not need any $\inf$ or $\sup$ in front of it. The same holds for the upper Darboux sum with respect to a specific partition.

Lower and upper Darboux integral
Here we consider all partitions and define the lower Darboux integral $\underline{\int_0^1}f(x)\,dx$ and the upper Darboux integral $\overline{\int_0^1}f(x)\,dx$ as
\begin{align*}
\underline{\int_0^1}f(x)\,dx:=\sup_{P} \underline{s}(f;P)\qquad \qquad\overline{\int_0^1}f(x)\,dx:= \inf_{P}\overline{s}(f;P)
\end{align*}
The lower Darboux integral is the supremum of lower Darboux sums over all partitions. Analogously is the upper Darboux integral the infimum of upper Darboux sums over all partitions.
We note that according to the construction lower and upper Darboux integral fulfil
  \begin{align*}
 \underline{\int_0^1}f(x)\,dx\leq\overline{\int_0^1}f(x)\,dx
\end{align*}
  but equality is not always given as we can see in the next example.

Example: We consider the nowhere continuous Dirichlet function $D(x)$  on                                               $[0,1]$ defined as
\begin{align*}
D(x)=
\begin{cases}
1&\qquad x\in [0,1]\cap\mathbb{Q}\\
0&\qquad x\in [0,1]\setminus \mathbb{Q}
\end{cases}
\end{align*}
then
\begin{align*}
 0=\underline{\int_0^1}D(x)\,dx\ne\overline{\int_0^1}D(x)\,dx=1
\end{align*}
So, even if lower and upper Darboux integral exist, we cannot necessarily define them as the Darboux integral, since they need not be equal. But if they are equal, then ...

Darboux integral
Let $f$ be a bounded function defined on $[a,b]$. If the lower Darboux integral  $\underline{\int_0^1}f(x)\,dx$ and the upper Darboux integral $\overline{\int_0^1}f(x)\,dx$ exist and they are equal we define them as the Darboux Integral $\operatorname{D-}\int_0^1 f(x)\,dx$.
  \begin{align*}
\operatorname{D-}\int_0^1 f(x)\,dx:=\underline{\int_0^1}f(x)\,dx
\end{align*}

Note: It can be shown, that the Darboux integral and the Riemann integral coincide. Each Darboux integrable function is Riemann integrable and vice versa. Both integrals give the same value.
A: For a Riemann Integrable function:
for inf $s(f,P)$ : you take the minimum value of $f$ in each partition and multiply it by the size of that partition and then add the result from each partition. As the size of each partition tends to zero the sum approaches a limit inf $s(f,P)$ 
for sup $s(f,P)$ : you take the maximum value of $f$ in each partition and multiply it by the size of the partition  and then add the result from each partition. As the size of each partition tends to zero the sum approaches a limit sup $s(f,P)$ 
A function is Riemann integrable if and only if inf $s(f,P)$=sup $s(f,P)$. Interestingly a function can be discontinuous on dense set and yet still Riemann integrable.
