Why this limit of integration? I've been solving problems from the book by DeGroot and Schervish and I can't understand why m is the upper limit of integration in the solution to this problem. Why not the lower one?
Here is the problem: 
Suppose that a random variable X has a continuous distribution for which the p.d.f. f is as follows:
$f(x) = 2x$ for $ 0< x <1, 0 $ otherwise
Determine the value of $d$ that minimizes $E(|X − d|)$.
Here is the solution:
$$ \int_0^m 2x \, dx=0.5  $$
Thank you very much in advance.

The value of $d$ that that minimizes $E(|X-d|)$ is the median value of $X$, i.e. the value $m$ such that
$$
\Pr(X\le m) = 0.5 = \Pr(X\ge m).
$$
Thus for continuous distirbutions it is the value of $m$ for which
$$
\int_{-\infty}^m f_X(x)\,dx = 0.5 = \int_m^\infty f_X(x)\,dx.
$$
In your case, you want
$$
\int_0^m 2x\,dx = 0.5 = \int_m^1 2x\,dx.
$$
So $m^2 -0^2 = 0.5 = 1^2-m^2$.  Consequently $m= \sqrt{0.5}= \sqrt{2}/2$.
