<s>[INST] Find the sum of $\sum_{n=1}^\infty \frac{x^{n-1}}{3^nn}$ - What is wrong with my solution? I have to find the sum of the following power series:
NOTE: please assume that x is in the convergence domain.
$$\sum_{n=1}^\infty \frac{x^{n-1}}{3^nn}$$
My solution:

*

*$$S(x) = \sum_{n=1}^\infty \frac{x^{n-1}}{3^nn} = \sum_{n=1}^\infty\frac{1}{3^nn}x^{n-1}$$


*$$xS(x) = \sum_{n=1}^\infty \frac{1}{3^nn}x^n $$


*$$(xS(x))' = \sum_{n=1}^\infty \frac{1}{3^nn}nx^{n-1} = \sum_{n=1}^\infty \frac{1}{3^n}x^{n-1}$$


*$$x \cdot (xS(x))' = \sum_{n=1}^\infty \frac{1}{3^n}x^n = \sum_{n=1}^\infty \frac{x^n}{3^n} = \sum_{n=1}^\infty  \bigg(\frac{x}{3}\bigg)^n = \frac{\frac{x}{3}}{1 - \frac{x}{3}} = \frac{x}{3}(1 - \frac{3}{x}) = \frac{x}{3} - 1.$$


*$$(xS(x))' = \frac{1}{x}(\frac{x}{3}-1) = \frac{1}{3} - \frac{1}{x}.$$


*$$xS(x) = \int{\frac{1}{3} - \frac{1}{x}} = \int\frac{1}{3} - \int\frac{1}{x} = \frac{x}{3} -\ln|x|.$$


*$$S(x) = \frac{1}{x}(\frac{x}{3}-\ln|x|) = \frac{1}{3} - \frac{\ln|x|}{x}$$
So I got that $\sum_{n=1}^\infty \frac{x^{n-1}}{3^nn} = \frac{1}{3} - \frac{\ln|x|}{x}.$
My professor claims that $\sum_{n=1}^\infty \frac{x^{n-1}}{3^nn} = -\frac{1}{x} \ln|\frac{x}{3} - 1|.$
Where I made a mistake in my solution?
Thanks in advance!
 [/INST] Your mistake is in step 4, where you claim
$$\frac{\frac{x}{3}}{1-\frac{x}{3}} = \frac{x}{3}\left(1 - \frac{3}{x}\right).$$
The correct value is
$$\frac{\frac{x}{3}}{1-\frac{x}{3}} = \frac{x}{3-x},$$
which then leads to
$$\begin{gather}
(x\cdot S(x))' = \frac{1}{3-x}\\
x\cdot S(x) = -\log (3-x) + C\\
S(x) = -\frac{\log (3-x)}{x} + \frac{C}{x}.
\end{gather}$$
Looking at the series, we can determine the integration constant $C$ and obtain
$$S(x) = -\frac{1}{x}\log \left(1-\frac{x}{3}\right).$$
By the series, we have $S(0) = \frac13$, a finite value, so we must choose $C$ so that
$$\lim_{x\to 0} \frac{C - \log (3-x)}{x}$$
exists, and that means the numerator must vanish if we insert $x = 0$, so $C - \log (3-0) = 0 \iff C = \log 3$. Now we can write
$$\log 3 - \log (3-x) = \log \frac{3}{3-x} = -\log \frac{3-x}{3} = -\log \left(1-\frac{x}{3}\right).$$
</s>