Edit: I think skipped a step in the original argument - it is not immediately clear to me that $d$ commutes with $\mathbb C[Y]$ in $D(X)$ unless $d$ is a derivation. I have added an inductive argument for this below.

I believe this is true. Here is a sketch of an argument.

We will prove this by induction on the degree of the differential operator $d$. It is certainly true for differential operators of degree 0.

Suppose $d\in D(X)$ is of degree $\leq k$, and $d(f)=0$ for all $f\in \mathbb C[Y]$ (which I identify with a subring of $\mathbb C[X]$).

**Lemma**: *We have $[d,f]=0$ for all $f\in \mathbb C[Y]$.*

**Proof of lemma:** The differential operator $[d,f]$ is of order $\leq k-1$, and $[d,f](g)=0$ for all $g\in \mathbb C[Y]$. The lemma now follows from the inductive hypothesis.

It remains to show that any $\mathbb C[Y]$-linear differential operator $d\in D(X)$ is zero.

Consider the finite field extension $$K := \mathbb{C}(Y) \subseteq L := \mathbb{C}(X)$$

Note that $D(X)$ injects in to $D(L/\mathbb C)$ and $d$ lands in the subring $D(L/K)$. In other words $d$ may be considered as an element of the ring $D(L/K)$ (here I am using Grothendieck's definition of differential operators for a $K$-algebra).

I claim that $D(L/K)=L$, and thus $d=0$. Indeed, $L$ is a smooth $K$-algebra of dimension $0$ (as we are in characteristic $0$), and thus:

- The ring of $D(L/K)$ is generated by derivations $Der_K(L,L)$ and $L$.
- $Der_K(L,L)=0$.