Let be $f$ a linear map $ f: R_{\leq 3}[x] \rightarrow R_{\leq 3}[x] $ such that $$f(1+x+x^2)=f(x-x^3)=f(1)=f(x+x^2)$$ (i)Find the dimension of Kernel and Image. (ii) Let be $g$ the linear map that satisfy the property above and such that $$g(x)=1+2x+3x^2+4x^3$$ Find his matrix representation with respect to the basis $S=\{1,x,x^2,x^3 \} $ (so $M_S ^S (g)$ )
MY ATTEMPT (i) From that conditions I obtain that $f(1)=0$ and $f(x)=f(x^3)=-f(x^2)$, but now how can I find the dimension of $\ker(g)$ and $\operatorname{Im}(g)$? I would say that $\dim(\ker)=1$ and accordingly $\dim(\operatorname{Im})=3$. By doing point (ii) I find that it's not true!
(ii) I have $g(1)=0$ e $g(x)=g(x^3)=-g(x^2)=1+2x+3x^2+4x^3$ and $$ M_{S} ^{S} (g)=\left[\begin{matrix} 0 & 1 & -1 & 1 \\ 0 & 2 & -2 & 2 \\ 0 & 3 & -3 & 3 \\ 0 & 4 & -4 & 4\end{matrix}\right] $$
So $\dim(\operatorname{Im})=1 !$
How to do point (i)?