Assigning value to divergent integral I have an integral of the form
$$\int\nolimits^\infty_{-\infty}\mathrm d \omega \, \frac{\omega^2}{k^2 + \gamma^2 \omega^2}$$
which diverges. This integral should have a finite value, as it must related to some physical measurement. I am trying to assign a value to the integral, kind of like how one does using regularisation. In a few papers on theoretical physics (Which is the field I am in), I have seen people use the Cauchy principal value in the form
$$-\!\!\!\!\!\!\!\int^\infty_{-\infty}\mathrm dx \, f(x) = \lim_{L \to \infty} \,  \frac1{L} \int^L_{-L}\mathrm dx \, f(x)$$ 
but I am not sure how one deduces that from
http://en.wikipedia.org/wiki/Cauchy_principal_value
 A: We can evaluate $$
\int_{-L}^{L}\frac{\omega^{2}}{k^{2}+\gamma^{2}\omega^{2}}d\omega$$ completely. Our integral is $$\frac{1}{k^{2}}\int_{-L}^{L}\frac{\omega^{2}}{1+\frac{\gamma^{2}}{k^{2}}\omega^{2}}d\omega=\frac{k}{\gamma^{3}}\int_{-\frac{\gamma L}{k}}^{\frac{\gamma L}{k}}\frac{u^{2}}{1+u^2}d\omega=\frac{2L}{\gamma^2}-\frac{k}{\gamma^3}\arctan\left(\frac{\gamma}{k}L\right).$$ The last equality follows since the anti derivative of $\frac{u^{2}}{1+u^{2}}$  is $u-\arctan(u)$. 
The Average Value: From the above we can evaluate $\frac{1}{L}\lim_{L\rightarrow \infty}\frac{1}{2L} \int_{-L}^L \frac{\omega^{2}}{k^{2}+\gamma^{2}\omega^{2}}d\omega$.  In particular we have $$\lim_{L\rightarrow \infty}\frac{1}{2L} \int_{-L}^L \frac{\omega^{2}}{k^{2}+\gamma^{2}\omega^{2}}d\omega =\frac{1}{\gamma^2},$$ which means that the average value of the function on the real line is $\frac{1}{\gamma^2}$.  (notice I divided by $2L$ rather than $L$ because the interval is of length $2L$.)
A: Hint: Assume that $f(x)\to \ell_+$ when $x\to+\infty$ and $f(x)\to \ell_-$ when $x\to-\infty$. Then 
$$
\lim\limits_{L\to+\infty}\frac1{L}\int\limits_{-L}^Lf(x)\mathrm dx=\ell_++\ell_-.
$$
In your case $f(x)=\dfrac{x^2}{k^2+\gamma^2x^2}$ hence $\ell_+=\ell_-=\dfrac1{\gamma^2}$ and the limit is $\dfrac2{\gamma^2}$.
As you can see the result is robust in the sense that it has nothing to do with whether we know exactly a primitive of $f$ or not, nor even with the exact form of $f$.
A: I am not sure what $1/L$ is doing in your expression for the Cauchy principal value.  
In any case, your integral is as clearly infinite as $\dfrac{\int^\infty_{-\infty} d \omega}{\gamma^2}   $ is as the limit of the average value is $\dfrac{1}{\gamma^2}$.  
A: Average value is not that it usually meant as a regularized value of (say) series. One of the standard ways of regularization is to construct the analytical continuation. If it diverges at the point of interest, then the constant term of the expansion at this point  is taken as the regularized value. In this case it seems to work like follows. For $s>0$ consider convergent integrals
$$
\int_{-\infty }^{\infty } \frac{w^2}{\left(s^2 w^2+1\right) \left(k^2+\gamma ^2
   w^2\right)} \, dw=\frac{\pi }{\gamma  k s^2+\gamma ^2 s}=
\frac{\pi }{\gamma ^2 s}-\frac{\pi  k}{\gamma ^3}+O(s),
$$
$$
\int_{-\infty }^{\infty } \frac{w^2 e^{-s w^2}}{k^2+\gamma ^2 w^2} \, dw=
\frac{\sqrt{\pi }}{\gamma ^2 \sqrt{s}}-\frac{\pi  k}{\gamma
   ^3}+O\left(\sqrt{s}\right),
$$
$$
\int_{-\infty }^{\infty } \frac{w^2 e^{-s|w|}}{k^2+\gamma ^2 w^2} \, dw=
\frac{2}{\gamma ^2 s}-\frac{\pi  k}{\gamma ^3}+O(s).
$$
Note that the constant term $-\pi  k/\gamma ^3$ is the same in all three cases. So it's a candidate for the regularized value. 
