Let $\{a_n\}$ be a sequence of real numbers such that $\sum_{n=1}^\infty a_nx^n=0, \forall x \in(0,\infty)$.
Then is it true that $a_n=0, \forall n \ge 1$ ?
My try: Let $r>0$, then $\sum_{n=1}^\infty a_nr^n$ is convergent, so $\lim |a_nr^n|=0$. So $\sum_{n=1}^\infty a_n z^n$ converges absolutely $\forall z \in \mathbb C \cap D(0,r)$. Since $r>0$ was arbitrary, so the power series $\sum_{n=1}^\infty a_n z^n$ converges absolutely everywhere in the complex plane. Hence $f(z)=\sum_{n=1}^\infty a_nz^n$ defines an entire function . Since $f(z)=0$ in a set with cluster points, so $f=0$ and thus $a_n=\dfrac {f^{(n)}(0)}{n!}=0$.
Is this solution right ?
Since $x>0$, we may divide by $x$ to achieve \begin{equation}\tag{1}\sum_{n=0}^{\infty}a_{n+1}x^n=\sum_{n=1}^{\infty}a_nx^{n-1}=0.\end{equation} Since power series are continuous, we then have $$0=\lim_{x\rightarrow0^+}\sum_{n=0}^{\infty}a_{n+1}x^n=a_1.$$ Then $(1)$ takes the form $$\sum_{n=0}^{\infty}a_{n+2}x^{n+1}=\sum_{n=1}^{\infty}a_{n+1}x^n=0.$$ Can you see where this is going?