Consider the Lie algebra $\text{sl}(2,\mathbb{C})$ (commutator as Lie bracket) with its standard basis consisting of $$e=\begin{pmatrix}0&1\\0&0\end{pmatrix},\quad f=\begin{pmatrix}0&0\\1&0\end{pmatrix},\quad h=\begin{pmatrix}1&0\\0&-1\end{pmatrix}.$$
Define the map $R: \text{sl}(2,\mathbb{C})\rightarrow \text{End}(\mathbb{C}[x,y])$ on the basis as $h\mapsto x\frac{\partial}{\partial x}-y\frac{\partial}{\partial y},~e\mapsto x\frac{\partial}{\partial y},~f\mapsto y\frac{\partial}{\partial x}.$
I want to show that this is a Lie algebra homomorphism where $\text{End}(\mathbb{C}[x,y])$ is equipped with the commutator as Lie bracket. For that I will use the relations $[e,f]=h,~[h,e]=2e,~[h,f]=-2f$.
$R$ is of course $\mathbb{C}$-linear since it is defined as a linear extension.
In order to show $R([A,B])=[R(A),R(B)]$ for alle $A,B\in\text{sl}(2,\mathbb{C})$, it is enough to show this on the basis.
But here is my issue: For example $R([e,f])=R(h)=x\frac{\partial}{\partial x}-y\frac{\partial}{\partial y}\neq 0=x\frac{\partial}{\partial y}y\frac{\partial}{\partial x}-y\frac{\partial}{\partial x}x\frac{\partial}{\partial y}=[R(e),R(f)]$.
What am I doing wrong?
Let's have a closer look at $[R(e),R(f)]$ and use the product rule:
$$x\frac{\partial}{\partial y}\left(y\cdot\frac{\partial}{\partial x}\right)-y\frac{\partial}{\partial x}\left(x\cdot\frac{\partial}{\partial y}\right)=x\left(\frac{\partial y}{\partial y}\frac{\partial}{\partial x}+y\frac{\partial}{\partial y}\frac{\partial}{\partial x}\right)-y\left(\frac{\partial x}{\partial x}\frac{\partial}{\partial y}+x\frac{\partial}{\partial x}\frac{\partial}{\partial y}\right)= \\ =x\frac{\partial}{\partial x}+xy\frac{\partial}{\partial x}\frac{\partial}{\partial y}-y\frac{\partial}{\partial y}-xy\frac{\partial}{\partial x}\frac{\partial}{\partial y}=x\frac{\partial}{\partial x}-y\frac{\partial}{\partial y}=R(h)$$