Let Gamma (x) denote the classical Euler gamma function. We set psi _{n}(x)=(-1)^{n-1}psi ^{(n)}(x) (nin mathbb{N}), where psi ^{(n)}(x) denotes the nth derivative of the psi function psi (x)=Gamma '(x)/Gamma (x). For λ, α, beta in mathbb{R} and m,nin mathbb{N}, we establish necessary and sufficient conditions for the functions L(x;λ,α,β)=ψm+n(x)−λψm(x+α)ψn(x+β)\\documentclass[12pt]{minimal}\t\t\t\t\\usepackage{amsmath}\t\t\t\t\\usepackage{wasysym}\t\t\t\t\\usepackage{amsfonts}\t\t\t\t\\usepackage{amssymb}\t\t\t\t\\usepackage{amsbsy}\t\t\t\t\\usepackage{mathrsfs}\t\t\t\t\\usepackage{upgreek}\t\t\t\t\\setlength{\\oddsidemargin}{-69pt}\t\t\t\t\\begin{document}$$ L(x;\\lambda ,\\alpha ,\\beta )=\\psi _{m+n}(x)-\\lambda \\psi _{m}(x+ \\alpha ) \\psi _{n}(x+\\beta ) $$\\end{document} and -L(x;lambda ,alpha ,beta ) to be completely monotonic on (-min (alpha ,beta ,0),infty ).As a result, we generalize and refine some inequalities involving the polygamma functions and also give some inequalities in terms of the ratio of gamma functions.