Hi, this is probably ultra trivial, but here it goes

We know that $\displaystyle \int_{-\infty }^{\infty}f(x)dx=\int_{-\infty}^{c}f(x)dx+\int_{c}^{\infty}f(x)dx $, where $\displaystyle \int_{-\infty}^{c}f(x)dx=\lim_{a->-\infty}\int_{a}^{c}f(x)dx $etc.

Now pdf for uniform dist is defined as:

$\displaystyle f(x)=\left\{\begin{matrix}

\frac{1}{b-a}\: \! ( \: a\leq x\leq b)\\

0 \; (x>b \; or \; x<

a)

\end{matrix}\right.$

so I apply the above formula, which yields 1+1 = 2

i.e. $\displaystyle \lim_{a->-\infty}\int_{a}^{c}f(x)dx = \lim_{a->-\infty}\left ( \frac{c-a}{b-a} \right )= (L'Hopital)\lim_{a->-\infty}\left ( \frac{1}{1} \right )=1$

and similarly 1 for the other one as well.

But all the probability books I'm checking says that $\displaystyle \int_{-\infty }^{\infty}f(x)dx=1$

Can anybody explain me what am I doing wrong?

Thanks