I'm trying to solve problem 9.11 from Apostol's: Mathematical Analysis. Specifically I'm trying to show that: $$ \sum_{k=0}^{\infty} (-1)^k x^k (1-x)$$ converges uniformly on $[0,1]$
I have seen that Dirichlet's test can be used to prove that the series is uniformly convergent in $[0,1]$, but while solving the problem I seemed to find a contradiction. Could someone help me to check if my reasoning is correct?
For each $n \in \mathbb{N}$ let $f_n(x) = \sum_{k=0}^n (-1)^k x^k (1-x)$ so that $f_n(0)=f_n(1)=0$. Hence for each $x \in (0,1)$:
$$ f_n(x) = (1-x) \sum_{k=0}^n (-x)^k = \dfrac{1-x}{1+x} (1-(-x)^{n+1})$$ So that $\lim \limits_{n \to \infty} f_n(x) = \dfrac{1-x}{1+x}$ and therefore the sequence $(f_n)$ converges pointwise to the function:
$$ f(x) = \begin{cases} 0, \text{ if } x=0\\ \dfrac{1-x}{1+x}, \text{ if } 0<x<1\\ 0, \text{ if } x = 1 \end{cases}$$
But $f$ is not continuous on $[0,1]$, Isn´t this a contradiction for uniform convergence? (since each $f_n$ is continuous because it is the finite sum of continuous functions and the uniform limit of continuous functions must be a continuous function)
Put : $$f_n(x)=(-1)^n x^n (1-x) \implies |f_n(x)|=x^n(1-x) \; \; x \in (0,1)$$
Therfore : $$a_n = \sup_{x \in (0,1)} {|f_n(x)|} =|f_n\left({\frac{n-1}{n}}\right)|=\left({1-\frac{1}{n}}\right)^n\cdot \frac{1}{n}=\frac{(n-1)^n}{n^{n+1}}$$
We have : $$\sum a_n \text{divege} \implies \sum f_n(x) \text{ Not converges uniformly}$$