Proving the integral of the Dirac delta function is 1 Was wondering if my solution is mathematically accurate enough:

The question in the book yields:


  Derive
  $$
1=\int_{-\infty}^{\infty} \delta(x-x_i)\ dx_i
$$
  From
  $$
f(x)=\int_{-\infty}^{\infty} f(x_i)\delta(x-x_i)\ dx_i 
$$
  [Hint: let $f(x)=1$]


My method is:


  $$
f(x)=\int_{-\infty}^\infty f(x_i)\delta(x-x_i)\ dx_i
$$
  
  $$
f(x)=1
$$
  
  so
  $$ 
1=\int_{-\infty}^{\infty} \delta(x-x_i)\ dx_i
$$


I think this is not correct. Does someone know is this is correct, or how to do it better?

Cheers
The error is that in the definition mentioned, f(x) has to be compactly supported and making it constant equal 1 is not correct.
If f(x) is a function of x, then it cannot be removed from the integral. Therefore this proof only works if f(x) is a constant.