Let #f(x)# be such a function, a real valued function. If #f(3)=0# then certainly #f(x) = (x-3)g(x)#. Now regarding the next root, appliying the same procedure, #f(x)=(x-3)(x+1-sqrt(3))h(x)#. Now resuming, if #1+2i# is a root, #1-2i# also must be also a root because only this way the function #f(x)# will be real valued. So #f(x) = (x-3)(x+1-sqrt(3))(x-1+2i)(x-1-2i)r(x)# arriving at

#f(x) = (x-3)(x+1-sqrt(3))((x-1)^2+4)r(x)#. Now if #f(x)# is a polynomial and has no more roots,#r(x) = C^{te}# which is a constant

#f(x)=C^{te} (x-3)(x+1-sqrt(3))((x-1)^2+4)#