Just to offer an alternative solution, let
![f(x) = x + x(1-x^2) + x(1-x^2)^2 + \cdots = \displaystyle \sum_{n=0}^\infty x(1-x^2)^n](https://tex.z-dn.net/?f=f%28x%29%20%3D%20x%20%2B%20x%281-x%5E2%29%20%2B%20x%281-x%5E2%29%5E2%20%2B%20%5Ccdots%20%3D%20%5Cdisplaystyle%20%5Csum_%7Bn%3D0%7D%5E%5Cinfty%20x%281-x%5E2%29%5En)
Let <em>F(x)</em> denote the antiderivative of <em>f(x)</em>. Then by the fundamental theorem of calculus, we can write, for instance,
![F(x) = f(1) + \displaystyle \int_1^x f(t)\,\mathrm dt](https://tex.z-dn.net/?f=F%28x%29%20%3D%20f%281%29%20%2B%20%5Cdisplaystyle%20%5Cint_1%5Ex%20f%28t%29%5C%2C%5Cmathrm%20dt)
When <em>x</em> = 1, all terms in the sum corresponding to <em>n</em> ≥ 1 vanish, so that <em>f</em> (1) = 1.
Integrating the series and interchanging the sum and integral (terms and conditions apply - see Fubini's theorem) gives
![\displaystyle \int f(x)\,\mathrm dx = \int \sum_{n=0}^\infty x(1-x^2)^n\,\mathrm dx = C + \sum_{n=0}^\infty \int x(1-x^2)^n\,\mathrm dx](https://tex.z-dn.net/?f=%5Cdisplaystyle%20%5Cint%20f%28x%29%5C%2C%5Cmathrm%20dx%20%3D%20%5Cint%20%5Csum_%7Bn%3D0%7D%5E%5Cinfty%20x%281-x%5E2%29%5En%5C%2C%5Cmathrm%20dx%20%3D%20C%20%2B%20%5Csum_%7Bn%3D0%7D%5E%5Cinfty%20%5Cint%20x%281-x%5E2%29%5En%5C%2C%5Cmathrm%20dx)
The constant <em>C</em> here corresponds exactly to <em>f</em> (1).
In the integral, substitute
![y = 1-x^2 \implies \mathrm dy = -2x\,\mathrm dx](https://tex.z-dn.net/?f=y%20%3D%201-x%5E2%20%5Cimplies%20%5Cmathrm%20dy%20%3D%20-2x%5C%2C%5Cmathrm%20dx)
so that it transforms and reduces to
![\displaystyle -\frac12 \int y^n\,\mathrm dy = -\frac1{2(n+1)} y^{n+1} = -\frac1{2(n+1)}(1-x^2)^n](https://tex.z-dn.net/?f=%5Cdisplaystyle%20-%5Cfrac12%20%5Cint%20y%5En%5C%2C%5Cmathrm%20dy%20%3D%20-%5Cfrac1%7B2%28n%2B1%29%7D%20y%5E%7Bn%2B1%7D%20%3D%20-%5Cfrac1%7B2%28n%2B1%29%7D%281-x%5E2%29%5En)
Then we have
![F(x) = 1 - \displaystyle \frac12 \sum_{n=0}^\infty \frac{(1-x^2)^{n+1}}{n+1}](https://tex.z-dn.net/?f=F%28x%29%20%3D%201%20-%20%5Cdisplaystyle%20%5Cfrac12%20%5Csum_%7Bn%3D0%7D%5E%5Cinfty%20%5Cfrac%7B%281-x%5E2%29%5E%7Bn%2B1%7D%7D%7Bn%2B1%7D)
and by shifting the index to make the sum start at <em>n</em> = 1,
![F(x) = 1 - \displaystyle \frac12 \sum_{n=1}^\infty \frac{(1-x^2)^n}n](https://tex.z-dn.net/?f=F%28x%29%20%3D%201%20-%20%5Cdisplaystyle%20%5Cfrac12%20%5Csum_%7Bn%3D1%7D%5E%5Cinfty%20%5Cfrac%7B%281-x%5E2%29%5En%7Dn)
or equivalently,
![F(x) = 1 - \displaystyle \frac12 \sum_{n=1}^\infty \frac{(-(x^2-1))^n}n](https://tex.z-dn.net/?f=F%28x%29%20%3D%201%20-%20%5Cdisplaystyle%20%5Cfrac12%20%5Csum_%7Bn%3D1%7D%5E%5Cinfty%20%5Cfrac%7B%28-%28x%5E2-1%29%29%5En%7Dn)
Recall the Maclaurin expansion for ln(<em>x</em>) centered at <em>x</em> = 1, valid for |<em>x</em> - 1| < 1 :
![\ln(x) = \displaystyle -\sum_{n=1}^\infty \frac{(-(x - 1))^n}n](https://tex.z-dn.net/?f=%5Cln%28x%29%20%3D%20%5Cdisplaystyle%20-%5Csum_%7Bn%3D1%7D%5E%5Cinfty%20%5Cfrac%7B%28-%28x%20-%201%29%29%5En%7Dn)
By comparing to this series, we observe that the series in <em>F(x)</em> converges to
![\displaystyle -\sum_{n=1}^\infty \frac{(-(x^2-1))^n}n = \ln(x^2)](https://tex.z-dn.net/?f=%5Cdisplaystyle%20-%5Csum_%7Bn%3D1%7D%5E%5Cinfty%20%5Cfrac%7B%28-%28x%5E2-1%29%29%5En%7Dn%20%3D%20%5Cln%28x%5E2%29)
so long as |<em>x</em> ² - 1| < 1. Then
![F(x) = 1 + \dfrac12 \ln(x^2) = 1 + \ln(x)](https://tex.z-dn.net/?f=F%28x%29%20%3D%201%20%2B%20%5Cdfrac12%20%5Cln%28x%5E2%29%20%3D%201%20%2B%20%5Cln%28x%29)
Differentiate both sides to recover <em>f(x)</em> = 1/<em>x</em> .