As we know that the indefinite integral in Maple is defined up to a piecewise constant.
Due to the indeterminate range of variable n, int returns the piecewise function.
But in the other similar case, we get a generic solution rather than a piecewise function,
Why not to returns the result like this,
Thanks for any help.