So, I was studying about orthogonal polynomials and saw general examples of inner products on $\mathbb{R}[x]$, mostly of the forms $$\langle f,g\rangle=\int f(x)g(x)q(x)dx,$$ for some kind of density $q$; and an inner product of the form $$\langle f,g\rangle=\sum_{k=1}^n f(x_k)g(x_k),$$ for some fixed set of $x_1,...,x_n$ (mostly the eigenvalues of some matrix). As it happens, in both cases we have that the product is of the form $$\langle f,g\rangle=\int fgd\mu,$$ for some measure $\mu$ defined on the borelians (the first case the absolut continuous $d\mu =qdm$ and the second the dirac measure supported on $x_j$)
My intuition is that for all cases there should be some measure, which we can define from the inner product. This intuition comes from Riez-Markov theorem, but there is no topological structure to be used here, so I cannot use it.
so the question is:
Is it true that every positive semi-definide inner product on $\mathbb{R}[x]$ is of the kind $$\langle f,g\rangle=\int fgd\mu,$$ for some measure $\mu$ that can be determined by the inner product?
If not I would really apreciate a counterexample, as I am new to this area...
No. You'll need some additional hypotheses to make this work; in particular you haven't required your inner product to be compatible with the multiplicative structure of $\mathbb{R}[x]$. Consider the inner product defined by forcing monomials to be orthonormal: $$\langle \sum_{k=0}^n a_k x^n, \sum_{k=0}^n b_k x^n\rangle = \sum_{k=0}^n a_k b_k.$$ This is a positive-definite inner product on $\mathbb{R}[x]$. If we have $\langle \cdot, \cdot \rangle$ in the form
$$\langle f, g \rangle = \int fg d\mu$$
then we have
$$0 = \langle 1, x^2\rangle = \int x^2 d\mu = \langle x, x \rangle = 1.$$
Perhaps if you also require a hypothesis such as $$\langle fg,h \rangle = \langle g, fh\rangle$$ then you can get some representation theorem.