  The Askey-Wilson function transform is a q-analogue of the Jacobi function
transform with kernel given by an explicit non-polynomial eigenfunction of the
Askey-Wilson second order q-difference operator. The kernel is called the
Askey-Wilson function. In this paper an explicit expansion formula for the
Askey-Wilson function in terms of Askey-Wilson polynomials is proven. With this
expansion formula at hand, the image under the Askey-Wilson function transform
of an Askey-Wilson polynomial multiplied by an analogue of the Gaussian is
computed explicitly. As a special case of these formulas a q-analogue (in one
variable) of the Macdonald-Mehta integral is obtained, for which also two
alternative, direct proofs are presented.
