Completeness condition involving continuum states Consider a potential $V(x)$ in 1d. Suppose that $V(|x| > a )= 0$ for some positive $a$. 
We then know that the hamiltonian $H = - \frac{\partial^2}{\partial x^2 } + V(x)$ has non-normalizable or scattering eigenstates. Label them by the eigenenergy $E$, so the eigenstate with eigenenergy $E$ is $\psi_E(x)$. 
We expect a completeness relation 
$$ \delta(x_1 - x_2 ) = \int_0^\infty d E \psi_E^*(x_1) \psi_E(x_2) + \sum_n \phi_n^*(x_1)\phi_n (x_2) , $$
where $\phi_n $ denotes the normalizable eigenstates. 
The trouble here is that for the non-normalizable state $\psi_E(x)$, unlike for the normalizable states, we are free to choose their amplitude. Specifically, $f(E)\psi_E(x)$ is also an eigenstate with eigenenergy $E$, where $f(E)$ is a smooth function of $E$. 
Is there a routine to choose the function $f$ so that the completeness relation holds? 
 A: This issue is too  technical to  explain in a Stack-Exchange answer but is discussed at length in my book with Paul Goldbart. 
An online draft version is at: 
http://www.goldbart.gatech.edu/PostScript/MS_PG_book/bookmaster.pdf
Start looking  at page 234 or so.  (If you like the book it is published by CUP)
The basic strategy is to start form a finite system and allow the volume to become large so that sums become integrals. It is important to track the density of states per unit eigenvalue and the normalization of the states. This changes because the potential means that the extended states are no longer plane waves. Our book provides tricks for doing this, and also worked examples.  
A: We consider the case when we have a single observable, $\xi$ forming by itself a complete commuting set, that is there is only one eigenstate of $\xi$ belonging to any eigenvalue, $\xi'$. We require this so that we can label its eigenkets with the corresponding eigenvalues when we set up a representation in terms of its eigenkets. We assume that $\xi$ has both discrete and continuous eigenvalues, $\xi^r$, $\xi^s$ and $\xi'$, $\xi''$.  
We usually require the following to hold $$\langle\xi^r|\xi^s\rangle=\delta_{\xi^r\xi^s}, \quad\quad\langle\xi^r|\xi'\rangle=0, \quad\quad\langle\xi'|\xi''\rangle=\delta(\xi'-\xi'').$$ 
However as per convenience we can make the following relation hold $$\langle\xi'|\xi''\rangle=c(\xi')\delta(\xi'-\xi'')$$ with the previous case then being a special case when $c$ is the constant function $1$. $\frac{1}{c}$ is called the weight function of the representation, $\frac{d\xi'}{c(\xi')}$ being the 'weight' attached to a small volume element of the space of the variable $\xi$.
For example, when working in spherical polar coordinates, with $2$ of the variables being $\theta$ and $\phi$ then one takes the weight function to be $sin(\theta')$.
Note: Some of the terminology in this answer may be outdated as I learnt these things through Dirac's book and I know of some cases where this is true. 
