In the definition of probability density function, does it matter if the interval is open or closed? I can find two definitions of Probability Density Functions in the sources I have checked:
$$P(a < X < b) = \int^b_a f(x)dx$$
Ref: Hogg & Tanis, Probability and Statistical Inference and this from  Utah's math dept
and
$$P(a \leq X \leq b) = \int^b_a f(x)dx$$
Refs: Clarke & Cooke, A Basic Course in Statistics. Wolfram Mathworld: Probability density function
Which is correct? But if one defines the Cumulative Density Function as:
$$P( X \leq a) = D(a) = \int^a_{-\infty} f(x) dx$$
then
$$D(b) - D(a) = \int^b_a f(x) dx$$ 
so
$$P( X \leq b) - P( X \leq a) = \int^b_a f(x) dx = P( a < X \leq b) $$
Or am I making a silly mistake? 
 A: Both definitions are equal, because if X is a continous variable, the probability for X to take a single value is zero. This is true because an integral with equal upper and lower limits is always equal to zero:
$P(X=a)= \int_a^a f(x)dx= F(a)-F(a) = 0$.
Since the events $\{X=a\}$ and $\{X >a\}$  are distinct, it follows by sigma additivity that:
$P(a \leq X <b)= P(X=a) + P(a<X<b)= P(a<X<b)$.
A: Statchrist answer is the standard answer for random variables with a probability density function.
However you’re right: if the cdf is $F(x) = P(X\le x)$, then 
$$P(a < x \le b) = F(b) - F(a),$$
and this is true for all random variables. 
If the cdf $F(x)$ is has discontinuities, then $X$ does not have a density, but you can still define integrals
$$\int_a^b \phi(x) dF(x)$$
as the limit of the sums
$$\sum_{i=0}^{n-1} \phi(c_i)(F(x_{i+1})-F(x_i))$$
with $a = x_0 < \dots < x_n = b$ and $x_i \le c_i \le x_{i+1}$, the limit being taken when $\text{max}(x_{i+1}-x_i) \rightarrow 0$. This is the Stieltjes integral.
With this definition, for all random variables with pdf $F(x)$,
$$\int_{a}^b 1\,dF(x) = F(b) - F(a),$$
as all sums of the above form are $\sum_i F(x_{i+1})-F(x_i) = F(b) - F(a)$.
Thus,
$$\int_{a}^b 1\,dF(x) = F(b) - F(a) =  P(a < x \le b),$$
and this quantity can be different to $P(a \le X \le b)$ or $P(a< X<b)$.
