  We show that the method of separation of variables gives a natural
generalisation of integral relations for classical special functions of one
variable. The approach is illustrated by giving a new proof of the
``quadratic'' integral relations for the continuous q-ultraspherical
polynomials. The separating integral operator M expressed in terms of the
Askey-Wilson operator is studied in detail: apart from writing down the
characteristic (``separation'') equations it satisfies, we find its spectrum,
eigenfunctions, inversion, invariants (invariant q-difference operators), and
give its interpretation as a fractional q-integration operator. We also give
expansions of the A1 Macdonald polynomials into the eigenfunctions of the
separating operator M and vice versa.
