given the following graph (the density function), what can we conclude about the expected value? I got stuck a little bit with that question and I would appreciate your help!
I found out that C must be equal $\frac{2}{7}$ that the distribution function would be valid (=1).
furthermore, I know that $E[x]=\int_{-\infty}^{\infty}xf(x)dx$. but here it's equal to: $\int_{1}^{2}x(\frac{1}{7}x-\frac{1}{7})dx+\int_{2}^{4}x(\frac{2}{7})dx+\int_{4}^{6}x(-\frac{1}{7}x+\frac{4}{7})dx$ (after calculating the functions that describe each part of the graph).
Now - from evaluating the above sum of integrals I get the value of about 0.2 while it doesn't seem reasonable! from the graph it should be more then 3 as I understand.
would appreciate your help and advice!

Your density can be split in three parts $f_1$, $f_2$ and $f_3$:
$f_1(x) \cdot x = -2/7 \cdot x + 2/7 \cdot x^2$
$f_2(x) \cdot x = 2/7 \cdot x$
$f_3(x) \cdot x = 6/7\cdot x -1/7 \cdot x^2$
Then then antiderivatives are:
$I_1(x) = -2/14\cdot x^2 + 2/21 \cdot x^3$
$I_2(x) = 2/14 \cdot x^2$
$I_3(x) = 6/14 \cdot x^2 -1/21 \cdot x^3$
And finally the sum of the integrals:
$E = (-2/14 \cdot 2^2 + 2/21 \cdot 2^3 + 2/14 \cdot 1^2 - 2/21 \cdot 1^3) + ( 2/14 \cdot 4^2 - 2/14 \cdot 2^2) + (6/14 \cdot 6^2 -1/21 \cdot 6^3 - 6/14 \cdot 4^2 + 1/21 \cdot 4^3) = (-8+2+32-8+216-96)/14 + (16-2-216+64)/21 = 23/7 \approx 3.285714$