<s>[INST] Expanding $\frac{2x^2}{1+x^3}$ to series So I was doing some series expansion problems and stumbled upon this one ( the problem is from Pauls Online Notes ) 
$$f(x) = \frac{2x^2}{1+x^3}$$
The actual solution to this problem uses a different method then mine. Since this function is really seams nice for integration, i thought i could do:
$$h(x) = \int f(x) dx =\int \frac{2x^2}{1+x^3}dx = \frac{2}{3} \ln({1+x^3})$$
If we let $t=x^3$, and use Maclaurin series for $\ln{(1+t)}$ we have
$$\frac{2}{3} \ln({1+t}) = \frac{2}{3} \sum_{n=1}^{+\infty}(-1)^{n-1} \frac{t^n}{n} $$
No we can take the derivative part by part in  the radius of convergence we will get the original function series expansion:
$$f(x)= \frac{2}{3} \sum_{n=1}^{+\infty}(-1)^{n-1} t^{n-1} =  \frac{2}{3} \sum_{n=1}^{+\infty}(-1)^{n-1} (x^3)^{n-1}$$
But the solution from the course is :
$$\sum_{n=0}^{+\infty}2(-1)^{n} x^{3n+2}$$
Where did i go wrong? :(
Thanks. 
 [/INST] Intelligent question. The problem is that you first differentiate with respect to $t$, then substitute $t$ back for $x^3$. The correct approach is the reverse order: replace $t$ by $x^3$ and derive with respect to $x$. Otherwise, your solution is nice. Below you will find a slightly more direct one.
Assume $x \ne 0$. Then
$$\frac {2 x^2} {1+x^3} = \frac 1 x \frac {2 x^3} {1+x^3} = 2 - \frac 2 {1+x^3} = \frac 2 x - \frac 2 x \sum \limits _{n=0} ^\infty (-1)^n x^{3n} = - \frac 2 x \sum \limits _{n=1} ^\infty (-1)^n x^{3n} = \\ -\frac 2 x \sum \limits _{m=0} ^\infty (-1)^{m+1} x^{3m+3} = 2 \sum \limits _{m=0} ^\infty (-1)^m x^{3m+2} .$$
All computations are assumed to happen where they are defined (i.e. inside the interval of convergence).
Finally, you can see the this equality is also valid for $x=0$.
</s>