I don't necessarily need an answer to this particular case, but in general I have no idea how to solve this kind of problem or even how to Google for such a method. If it helps for this particular problem, the context in which this expression came up only positive integer values of x $\mathit{really}$ makes sense, but if possible I would delight in finding a function that works for any real number.
(Apologies for the lack of tags, I have no idea what field this would fall under)