Probability density function, cumulative distribution functions

A quick question with regards to cumulative distribution function.

To find the probability density function of $X$ do you:

(1) $Pr(x\ <\ X\ <\ x+h)\ =\ F_x(x+h)\ -\ F_x(x)\ =\ h\frac{dF_x(x)}{dx}$

or

(2) $Pr(a\ \leq\ X\ \leq\ b)\ =\ \int_{a}^{b}f(x)dx$

Im getting confused as many sites say option 2, but I've been given the option 1.

Or are they just the same thing and im missing the connection?

-

For small $h$, under appropriate continuity conditions, the first is a good approximation. The second is fully correct.
The first can be a useful way of thinking: if $f_X(x)$ is the density function of $X$, then $\Pr(x\lt X \lt x+h)\approx hf_X(x)$. In general, $F_X(x)$ has a clear probabilistic meaning, It is harder to visualize $f_X(x)$ probabilistically.