I am confused about calculating the expected value of a function that is split, the question looks as follows:

and my solution is:

Which are incorrect.. can someone please help me to correct the answers. Or tell me what I'm doing wrong. Thank you
I am confused about calculating the expected value of a function that is split, the question looks as follows:

and my solution is:

Which are incorrect.. can someone please help me to correct the answers. Or tell me what I'm doing wrong. Thank you
You have the correct equation for calculating the expectation of a continuous random variable from its probability density function. However, that was not what you had been given.
You were given a Cumulative Distribution Function that belongs to a discrete random variable; and thus has a probability mass function.
$$p_X(x) =\begin{cases} 5/10 &:& x=0\\ 1/10 &:& x=1\\ 2/10 &:& x=2\\ 1/10 &:& x=3 \\ 1/10 & :& x=3.5 \\ 0 &:&\textsf{elsewhere} \end{cases}$$
As such the expectation is not an integral, but a series: $$\mathsf E(X) ~=~ \sum_{x\in\{0,1,2,3,3.5\}} x~p_X(x)$$
And similarly for the variance.