What is a ring of differential operators? I am interested in the definition of the ring $\mathbb{R}[x, D]$ since it is mentioned in this lecture by Richard Borcherds in the Rings and Modules series.
In the lecture he says that $Dx = xD + 1$, this is the same as a comment on the Wikipedia page that, in some settings, $Dx - xD = 1$.
I'm having trouble understanding what this object is. What is it?
If I had to guess, I suspect that $\mathbb{R}[x, D]$ is intended to be thought of as some kind of formal ring (similar to $\mathbb{R}[x, y]$) with a ring action on the analytic functions $\mathbb{R} \to \mathbb{R}$ or some other set of functions defined as follows:
Note that $*$ denotes real multiplication and $\lambda x \mathop. e$ is a function literal, like in computer science.
$$ a \triangleright f = a * f \;\;\text{when $a$ is a real number} \\
   p(x) \triangleright f = \lambda t \mathop. p(t)*f(t) \;\;\text{when $p(x)$ is a polynomial} \\ 
   D \triangleright f = f' \;\;\text{where $f'$ is the derivative of $f$} \\
   (s+t) \triangleright f = (s \triangleright f) + (t \triangleright f) \\
   (st) \triangleright f = (s \triangleright (t \triangleright f)) $$
But I'm really not sure. This seems kinda like a more routine ring but with composition of functions as multiplication.
 A: There are multiple ways to make sense of this; one way is through algebra (considering the free monoid generated by two transcendentals $x,D$ over the ring $\mathbb{R}$, then the monoid ring, then factoring out the commutation relation,...). Another way is through calculus, one version of which goes like this:
Let $\mathcal{F}=C^\infty(\mathbb{R};\mathbb{R})$ be the set of all infinitely differentiable functions from the real line to itself (one can use a more [or less] restrictive space of functions, e.g. polynomial [or square integrable] functions etc.). Then $\text{DO}=\mathbb{R}[x,D]$ is by definition the smallest linear space of linear maps $\mathcal{F}\to\mathcal{F}$ such that

*

*$\text{DO}$ contains the linear map $\text{Pos}:f\mapsto [x\mapsto xf(x)]$ as well as the linear map $\text{Mom}: f\mapsto [x\mapsto f'(x)]$, where the derivative $f'$ of $f$ is defined as in calculus.

*$\text{DO}$ is closed under composition.

Then as in the lecture you shared, since from calculus
$$\forall f\in\mathcal{F}:\text{Mom}\circ \text{Pos}(f) = \text{Pos}\circ\text{Mom}(f)+f, $$
any element of $\text{DO}$ is of the form
$$\sum_{(p,q)\in\mathbb{Z}_{\geq0}^2} a_{(p,q)} \text{Pos}^{\circ p} \circ \text{Mom}^{\circ q}= \sum_{(p,q)\in\mathbb{Z}_{\geq0}^2} a_{(p,q)} \,\underbrace{\text{Pos}\circ \text{Pos}\circ \cdots \text{Pos}}_{p\text{ many}}\circ \underbrace{\text{Mom}\circ \text{Mom}\circ \cdots \text{Mom}}_{q\text{ many}},$$
with $a_\bullet:\mathbb{Z}_{\geq0}^2\to\mathbb{R}$  a function that is zero for all but finitely many $(p,q)$.
Abbreviating $\text{Pos}$ by $x$ and $\text{Mom}$ by $D$, this justifies the (arguably abusive) notation $\text{DO}=\mathbb{R}[x,D]$; indeed elements of $\text{DO}$ are polynomials in two variables $x$ and $D$ with real coefficients, with the caveat that there is an error term involved with switching the orders of $x$ and $D$. In this abbreviation any element of $\mathbb{R}[x,D]$ is of the form
$$\sum_{(p,q)\in\mathbb{Z}_{\geq0}^2} a_{(p,q)} x^p D^q.$$
Factoring the $D^q$'s we also see that $\text{DO}$ is the space of all linear differential operators with polynomial coefficients.
$$\sum_{(p,q)\in\mathbb{Z}_{\geq0}^2} a_{(p,q)} x^p D^q = \sum_{q\in\mathbb{Z}_{\geq0}}\,\,\, \underbrace{\left(\sum_{p\in\mathbb{Z}_{\geq0}} a_{(p,q)} x^p\right)}_{= a_q(x)}\,\,\,D^q = \sum_{q\in\mathbb{Z}_{\geq0}}a_q(x)D^q.$$
($\text{Pos}$ and $\text{Mom}$ themselves stand for the position and momentum operators, respectively.)

As a final note, probably an even better approach is through representation theory, where indeed the two approaches I mentioned above are united: there is a ring as mentioned in the algebraic approach that admits a representation as a ring of linear differential operators on some space of functions as mentioned in the calculus approach. The above account is more pedestrian.
