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

Suppose the CDF

So if x<1 we have F(x)=0. That is, the sum of all probabilities from - 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 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!