AbstractAskey-Wilson polynomials pn(x; a, b, c, d) are generalized to the case of non-integer values of n and arbitrary complex x. Appropriately normalized solutions of a three-term functional equation are introduced as Askey-Wilson functions of the first and second kind which approach the well-known Jacobi functions in the limit q → 1−. Prescription for evaluating these functions on the cut [−1, 1] is provided, which is then used to compute Cn2(cos θ; β ¦ q) + Dn2(cos θ; β ¦ q) as the sum of two balanced 5φ4 series, where Cn(x; β ¦ q) is Rogers' ultraspherical polynomial and Dn(x; β ¦ q) is the corresponding function of the second kind. Use of an integral of Askey is made to express this sum as an infinite integral