I am a bit confused here and really have to understand where I am lost.

Suppose the CDF $\displaystyle F(x) = 0 \ \ for \ \ x <1;\ \ \dfrac{x^2-2x+2}{2}\ \ for \ \ 1 \leqq x<2 \ \ and \ 1 \ \ for \ \ x \geqq 2$

So if x<1 we have F(x)=0. That is, the sum of all probabilities from -$\displaystyle \infty$ up to but not including 1 is 0. But F(1)=1. So I am concluding that f(1)=1 (f(x) is the pdf). So far I think I am ok and understanding things.

Now, given F(x), I claim f(x)= x-1 for 1$\displaystyle \leqq$x<2 and 0 elsewhere. Still seems good to me until....

Using my formula for f(x) I get f(1)=0 which contradicts what I got above. Also the integral from 1 to 2 of f(x)dx is not 1. What is going on here?

I am sure that what I am missing here is very important so I hope that someone can please carefully explain this to me.

Thank you!