Here is my problem:

Find the expected value of g(X) = X^2 - 5X + 3, if the probability density is given by:

f(x) = { $\displaystyle \frac{x}{2} for 0<x<1$

$\displaystyle

\frac{1}{2} for 1<x<2$

$\displaystyle

\frac{3-x}{2} for 2<x<3$

0 elsewhere

Can anyone help???