Let $R$ be a commutative $k$-algebra, $k$ is a field of characteristic zero. Take an arbitrary $w \in R-k$.
Is it possible to define/find a $k$-algebra endomorphism of $R$, call it $f$, such that $f(w)=w$ (and $f \neq 1$)?
I guess this question is too general, so examples of algebras $R$ with this property are ok as a partial answer (perhaps this is still too general?).
Remark: A non-answer: $R=\mathbb{C}[x,y]$, $w=x^2+y^2$. It is clear that the exchange involution $\alpha: (x,y) \mapsto (y,x)$ fixes $w$. But in my question it is not known if $w$ is symmetric with respect to some involution on $R$, if $R$ has an involution (in my question $w$ is arbitrary, and we wish to find an endomorphism of $R$ which fixes $w$).
Actually, I wish to find an answer to the (probably) more difficult following question:
Is it possible to define/find a $k$-algebra endomorphism of $R$, call it $f$, such that $f(w)=w$ and $f(u) \neq u$, where $u \in R-k$ is another arbitrary element.
Thank you very much!
Certainly not in general. For instance, if $w$ generates $R$ as a $k$-algebra, then if $f(w)=w$ that automatically means $f$ is the identity. Slightly less trivially, it is entirely possible that $R$ has no endomorphisms besides the identity, even if $w$ does not generate $R$. For instance, the ring $\mathbb{R}$ has no endomorphisms besides the identity so you could take $R=\mathbb{R}$ and $k$ to be any subfield of $\mathbb{R}$. More generally, I don't know how to make this precise, but I would suspect that a "random finitely generated $k$-algebra" will typically have no endomorphisms besides the identity.
Here's an example of a nontrivial finitely generated $k$-algebra for which it is true. Let $V$ be any $k$-vector space of (finite) dimension $>1$ and let $R=k\oplus V$ with multiplication defined by $(a,x)\cdot(b,y)=(ab,ay+bx)$. Note that any linear map $g:V\to V$ gives an endomorphism $f:R\to R$ defined by $f(a,x)=(a,g(x))$. So in particular, given $w=(a,x)\in R$, you can take any linear map $g:V\to V$ that fixes $x$ but is not the identity (this is possible since $\dim V>1$), and this will give an endomorphism $f:R\to R$ which fixes $w$ and is not the identity.
Another case where it is true is if $R$ is an infinite-degree Galois extension field of $k$. Then for any $w\in R$, $k(w)$ is finite-dimensional and hence a proper subfield of $R$, and so $R$ has many automorphisms over $k(w)$.
As for your final question, the answer is trivially no since if $f(w)=w$ and $u$ is in the subalgebra generated by $w$, then $f(u)=u$ as well.