Let $(a_n)_{n \geq 1} \subset \mathbb{R}$ and $|q| \in (0,1)$. Define $$x_n=\sum_{k=1}^na_kq^k$$ Prove that if $(a_n)_{n \geq 1}$ is bounded, then $(x_n)_{n \geq 1}$ is convergent. Also, give an example of a sequence $(a_n)_{n \geq 1}$, unbounded, such as $(x_n)_{n \geq 1}$ to be convergent.
For the first part, I proved that $(x_n)_{n \geq 1}$ is bounded, since there is a positive $M$ such that $|a_n| \leq M, \forall n$: $$|x_n|=|\sum_{k=1}^na_kq^k| \leq \sum_{k=1}^n|a_k||q^k| \leq M \sum_{k=1}^n|q^k|=M|q|\frac{1-|q|^n}{1-|q|} \leq M\frac{|q|}{1-|q|}$$ Obviously, since $a_n$ can be either positive or negative, $(x_n)_{n \geq 1}$ is not necessary monotonic and thus the convergence doesn't follow immediately.