Real Analysis : Value of $U(f,P)-L(f,P)$ in Darboux Integral? Given $f:[0,4]\rightarrow\mathbb{R}$ with the definition :
$f(x)=\begin{cases}
      2x+3, & 0 \leq x<1 \\
      3, & x=1 \\
      -x+1, & 1<x\leq 3 \\
      2, & 3<x\leq 4
    \end{cases}$
If we're given the partition $P=\{0,1-h,1+h,3-h,3+h,4\}\subset[0,4]$ for any $h\in(0,\frac{1}{2})$, find the value of $U(f,P)-L(f,P)$.
Can someone please help me? I get stuck every time. 

If $\mathcal P = \{x_0,\ldots,x_n\}$ is a partition then the upper and lower sums are
\begin{align}
U_f(\mathcal P) &= \sum_{j=0}^{n-1}\sup_{x\ \in\ [x_j,x_{j+1}]}f(x)(x_{j+1}-x_j)\\
L_f(\mathcal P) &= \sum_{j=0}^{n-1}\inf_{x\ \in\ [x_j,x_{j+1}]}f(x)(x_{j+1}-x_j).
\end{align}
So we compute 
\begin{align}
U_f(\mathcal P) &= \sup_{x\in[0,1-h]}f(x)(1-h-0) + \sup_{x\in[1-h,1+h]}f(x)((1+h)-(1-h)) + \sup_{x\in[1+h,3-h]}f(x)(3-h - (1+h)) + \sup_{x\in[3-h,4]}f(x)(4 - (3-h)) \\
&= (2(1-h)+3)(1-h) + (2+3)(2h) + (-h)(2-2h) + 2(1-h)\\
&= 7 - h + 4h^2
\end{align}
and
\begin{align}
L_f(\mathcal P) &= \inf_{x\in[0,1-h]}f(x)(1-h) + \inf_{x\in[1-h,1+h]}f(x)(2h) + \inf_{x\in[1+h,3-h]}f(x)(2h(h-1)) + \inf_{x\in[3-h,4]}f(x)(1-h) \\
&= 3(1-h) + (-h)(2h) + (-(2-h))(2h(h-1)) + (-2)(1-h)\\
&= 1+3h-8h^2+2h^3.
\end{align}
It follows that
\begin{align}
U_f(\mathcal P) - L_f(\mathcal P) &= 7 - h + 4h^2 - (1+3h-8h^2+2h^3)\\
&= 2(3-2h+6h^2-h^3).
\end{align}
