finding median with cumulative distribution function (absolute value) I am currently working on distribution with density function
$$f(x)=\begin{cases} \frac{2}{5}|x-2|,& \text{0 ≤ x ≤ 3} \\\\0 & \text{otherwise}\end{cases}$$
I have found that cumulative distribution function of $F(X)$ for $2 ≤ x ≤ 3$ which is $\frac{1}{5}x^2-\frac{4}{5}x + \frac{8}{5}$ and $F(X)$ for $0≤x≤2$ is $\frac{4x-x^2}{5}$.
I know that to find median you have to set 
$$\int_{-\infty}^x f(x)\,dx= 0.5.$$
But what $f(x)$ do I use to find the median of the probability distribution of $X$.
Also how do I find $E(X)$ for this distribution?
Do I just use integral of $xf(x)$? and what $f(x)$ should I use?
I just cannot find any distribution with absolute value thanks!

Did you graph $f_X(x)$? It should be clear that the median is in the interval $[0,2]$. Hence you could do
$$\int_0^c \frac{2}{5}(-x+2)\,dx = .5$$
from the outset, or, since you found $F_X(x)$, use
$$F_X(c) = .5$$
to find $c$, the median.
The expectation can be found from the usual
$$E[X] = \int_0^3 f_X(x)\,dx$$
or you could use the tail sum 
$$E[X] = \int_0^31-F_X(x)\,dx.$$
Of course, there are cases.
