<s>[INST] Investigate $\sum_{n\geq1}\frac{3^nx^n\left(\frac{1}{3}-x\right)}{n}$ for uniform convergence on $x\in [0, \frac{1}{3}]$: is my solution correct? 
Exercise:

Investigate $$\sum_{n\geq1}\frac{3^nx^n\left(\frac{1}{3}-x\right)}{n}$$ for uniform convergence on $x\in [0, \frac{1}{3}].$

Graphs:

From a few graphs, it seems to be uniformly convergent:



My solution:

in  $x=0$ and $x=\frac{1}{3}$, the limit function to which the graphs try to reach out takes value $0$.
Every other $x$ has form $\frac{1}{a}$, where $a>3$, $a\in\mathbb{R}$.
$$\frac{\left(\frac{3}{a}\right)^n\left(\frac{1}{3}-\frac{1}{a}\right)}{n},$$
in terms of convergence, is equivalent to 
$$\frac{3^n}{a^n\cdot n}=\frac{(1+2)^n}{a^n\cdot n}=\frac{1+n2+\cdots+2^n}{a^n\cdot n}<\frac{1+n2^n}{a^n \cdot n}=\frac{1}{a^n\cdot n}+\frac{2^n}{a^n\cdot n}.$$
$$\lim_{n\to\infty}\frac{a^n\cdot n}{a^{n+1}\cdot (n+1)}=\frac{1}{a}<1,$$
$$\lim_{n\to\infty}\frac{2^n\cdot 2\cdot a^n\cdot n}{a^{n+1}\cdot (n+1)\cdot 2^n}=\frac{2}{a}<1.$$
On the right-hand side, there's a sum of two converging entities, which is a converging entity. By the Weierstrass test, the original series is uniformly convergent for $0\leq x\leq \frac{1}{3}$.
Is my solution correct?
If not, how to do it correctly?
If possible, I would also love to know if there's a way to find the limit function.
Thank you.
 [/INST] Your solution shows pointwise convergence, but not uniform. To prove uniform convergence, we can use some calculus and the Weierstrass M-test. Define
$$g_n(x) = \frac{3^nx^n(\frac13-x)}{n}.$$
The function $g_n$ is continuous and non-negative on $[0,\frac13]$, and $g_n(0)=g_n(\frac13)=0$, so $g_n$ will take a maximum somewhere in $(0,1)$. To find this maximum, we differentiate:
$$g_n'(x) = \frac{3^n}n\Big[x^n\cdot(-1) + nx^{n-1}(\tfrac13 - x)\Big] = 3^nx^{n-1}\Big[\tfrac13 - (1+\tfrac1n)x\Big]. $$
Hence, for $x\in(0,\frac13)$, one has $g_n'(x) = 0$ if and only if $x=\frac1{3(1+\frac1n)}=\frac{n}{3(n+1)}$. This must be where $g_n$ takes its maximum, and its value is
$$M_n:= g\big(\tfrac{1}{3(1+\frac1n)}\big) = \frac{3^n(\frac{1}{3(1+\frac1n)})^n(\frac13-\frac{1}{3(1+\frac1n)})}{n} = \frac1{3(1+\frac1n)^nn(n+1)}.$$
Now since $M_n \le \frac1{n^2}$ for all $n\ge1$, and $0 \le g_n(x) \le M_n$ for all $x\in[0,\frac13]$ and $n\ge1$, it follows from the Weierstrass M-test that the series
$$\sum_{n=1}^\infty g_n(x)$$
converges absolutely and uniformly, giving you the desired conclusion.
Note also that one can also fairly easily evaluate the limit function. First, show $g_n(x) = (1-3x)\int_0^x(3t)^{n-1}$, and so since the convergence is uniform we have
$$\sum_{n=1}^\infty g_n(x) = (1-3x)\int_0^x\sum_{n=1}^\infty(3t)^{n-1} dt = (1-3x)\int_0^x\frac1{1-3t} dt = -\tfrac13(1-3x)\log(1-3x).$$
</s>