Term-by-term integration means integrating a power series one term at a time. Inside the interval of convergence the result is an antiderivative of the sum, with the same radius of convergence. It is the standard way to derive the series for arctangent and for the natural log of one plus x.
Starting from 1+x1=∑n=0∞(−1)nxn and integrating term by term gives ln(1+x)=∑n=0∞n+1(−1)nxn+1=x−2x2+3x3−⋯.
The same move on 1+x21=∑n=0∞(−1)nx2n produces arctanx=∑n=0∞2n+1(−1)nx2n+1=x−3x3+5x5−⋯, which is far faster than repeated differentiation.
The mistake
Forgetting the constant of integration. Integrating term by term introduces a +C that you pin down at the center. For ln(1+x), setting x=0 gives ln1=0, so C=0; skip that and the whole series is off by a constant.