# Power series confusion

I'm having trouble with power series. Can someone walk me through this? My biggest problem is always figuring out what I need to break apart.

Find a power series representation for each function and determine its radius of convergence. $$g(x) = \frac{x}{(1-3x)^2}$$ $$g(x) = \ln(2+x)$$

Hint. Here is a useful evaluation: $$1+u+u^2+\cdots+u^n=\frac{1-u^{n+1}}{1-u}, \quad |u|<1. \tag1$$ Then by differentiating $(1)$ you get $$1+2u+3u^2+\cdots+nu^{n-1}=\frac{1-u^{n+1}}{(1-u)^2}+\frac{-nu^{n}}{1-u}, \quad |u|<1, \tag2$$ and by making $n \to +\infty$ in $(2)$ using $|u|<1$, gives $$1+2u+3u^2+\cdots+nu^{n-1}+\cdots=\frac{1}{(1-u)^2} \tag3$$ then put $u:=3x$ and multiply by $x$ to obtain a power series of $$g(x) = \frac{x}{(1-3x)^2}$$ and the radius of convergence is such that $|3x|<1$.
Similarly, setting $u \to -u$ in $(1)$, then integrating gives $$u-\frac{u^2}2+\frac{u^3}3+\cdots+(-1)^{n-1}\frac{u^n}n+\cdots=\ln (1+u), \quad |u|<1, \tag4$$ then write $$g(x) = \ln(2+x)=\ln 2+\ln\left(1+\frac x2\right)$$ and use $(4)$ with $u:=\dfrac x2$. The radius of convergence is such that $\left|\dfrac x2\right|<1$.