I'm sorry to sound so cranky, but I think figuring this out is a good and straightforward exercise for anyone who knows basic ODE theory
(both smooth and real analyticEDITED in tone)and is learning about linear elliptic differential operators and how they behave with distributions. The
I do not know any reference for this, but the proof is almost exactly the same (but easier) than the one for higher dimensions. What's nice about the $1$-dimensional case is that you really can work with $C^k$, where $k$ is any integer, and don't need to mess with Sobolev or Holder spaces as you do in higher dimensions.
So here's an outline of a proof that does not rely on any results from elliptic PDE's and uses only freshman calculus, basic results from ODE's, and the notion of a weak solution:
Use the fundamental theorem of calculus to show that $D$ is an elliptic operator in the sense that if $u$ is a weak solution to $Du = f$, then $u$ has one more order differentiability than $f$.
Use #1 to show that $D^n$ is elliptic in the sense that if $u$ is a weak solution to $D^nu = f$, then $u$ has $n$ more orders of differentiability than $f$.
Now use the standard bootstrapping argument to show that $a_n D^n + \cdots + a_0$ is an elliptic DO.
Now use the results above along with the uniqueness theorems for smooth and real analytic ODE's to conclude that if $f$ is real analytic, so is $u$.