  The Mattila integral, $$ {\mathcal M}(\mu)=\int {\left( \int_{S^{d-1}}
{|\widehat{\mu}(r \omega)|}^2 d\omega \right)}^2 r^{d-1} dr,$$ developed by
Mattila, is the main tool in the study of the Falconer distance problem. In
this paper, with a very simple argument, we develop a generalized version of
the Mattila integral. Our first application is to consider the product of
distances $$(\Delta(E))^k= \left\{\prod_{j=1}^k |x^j-y^j|: x^j, y^j\in
E\right\} $$ and show that when $d\geq 2$, $(\Delta(E))^k$ has positive
Lebesgue measure if $\dim_{\mathcal{H}}(E)>\frac{d}{2}+\frac{1}{4k-1}$. Another
application is, we prove for any $E,F,H\subset\mathbb{R}^2$,
$\dim_{\mathcal{H}}(E)+\dim_{\mathcal{H}}(F)+\dim_{\mathcal{H}}(H)>4$, the set
$$E\cdot(F+H)=\{x\cdot(y+z): x\in E, y\in F, z\in H\}$$ has positive Lebesgue.
