How this question How to create a reliable natural integral operator? a duplicate of this one Under what conditions does Mathematica give a natural antiderivative when integrating? ?
The older question asks about Mathematica's behavior, the later one asks how to construct a function. How they can be duplicates if they ask different things?