$\int_0^1 f(x)dx=?$ where
$f(x)= \begin{cases}0\qquad&0\le x<1/2 \\1/2\qquad&x=1/2\\0\qquad&1/2<x\le1\end{cases} $
since f is discontinuous only at one point then I know it is integrable and by calculating infimum of $U(P,f)$ and supremum of $L(P,f)$ where P is a partition ,I see that 0 is integral.But how to calculate it by general technique like $\int_0^1 f(x)dx=\left[g(x)\right]_0^1$
You can calculate as follows: $$\int_0^1 f(x)dx=\int_0^{1/2}0dx+\lim_{\epsilon\to0} \int_{\frac12-\epsilon}^{\frac12+\epsilon} \frac12dx+\int_{1/2}^1 0dx=0+\lim_{\epsilon\to0} \epsilon+0=0.$$