How to write:log(1+1/x)<=y

in this constraint,x and y are all variables.thanks.

log(1 + 1/x) = rel_entr(x,x+1) + rel_entr(x+1,x)

rel_entr(x,x+1) + rel_entr(x+1,x) <= y

There are other formulations, but in this form, it is ready to go with CVXQUAD.

Thank you very much for your answer. According to your answer, I have successfully solved the problem and obtained satisfactory results. Thank you again.