suppose x follows a distribution with density function: f(x)=C*abs(x-2), 0 =suppose x follows a distribution with density function:
f(x)=C*|x-2|, 0 <=x<=3; f(x)=0 otherwise.


*

*find the cumulative distribution function of F(x) for 2<=x<=3

*Find the Median of the probabiity distribution of x.

*find E(x)

*Find the cumulative distribution function of F(x) for 0<=x<=2 


my solve is 
|x-2|=  (x-2  , x-2>0      : 2-x , x-2<0)
x-2 >0  ,  x >2    
x-2<0   ,x< 2 
f(x)={(c(x-2),    0≤x≤2    : c(2-x)   ,   2≤x≤3   )
To find C
∫(0 to 2) c(x-2) +∫(2 to 3) C(2-x) =1
c[x^2/2-2x] +c[2x-x^2/2]  =1
C= -2/5
f(x)={(-2/5 (x-2),    0≤x≤2   : -2/5 (2-x)   ,   2≤x≤3   )
my solution is right in this point or something wrong ?
please need help in other parts  how to compute them
 A: 1) If you get a negative constant which multiplied by a non-negative function is supposed to give a density, you can be certain you did something wrong without asking. Such reasonableness checks are elementary to this kind of exercise.
2) The median will have at least half the probability is to the left of it (including itself) and half to the right (ditto). So find the smallest value, $\stackrel{\sim}{x}$ (or whatever other symbol you like for the population median) such that the integral of the density up to that point gives at least $\frac{1}{2}$. Or, if you have computed the distribution, $F$, the smallest value $\stackrel{\sim}{x}$ such that $F(\stackrel{\sim}{x})\geq\frac{1}{2}$.
3) This is a simple integration, that follows from 
$$\text{E}[X] = \int_{-\infty}^\infty x f(x)\, \mathrm{d}x\, $$.
You will want to split the integral up as you did when evaluating $C$.
4) This is another simple integration (indeed, aside from your sign error, you did all the hard work back in Q1, having already done the integration work required).
$$F_X(x) = \int_{-\infty}^x f_X(t)\,dt\,$$.
Note that here $t$ is a "dummy" variable. (This seems to be a stumbling block for many students when dealing with integrals and sums.)
