2 added 11 characters in body

The answers already given are quite complete and say it all, but maybe the OP was in search of a very simple explanation of what is happening. Let me try.

You will agree that it is not necessary to work in the full generality of an n-th order equation; if we can do it for the first order case, it is easy to generalize by induction. Moreover, we can assume that the highest order coefficient is equal to 1 (just divide by it). So essentially the question is: let $u$ be a weak solution of the equation $$u' + a(x) u = f(x)$$ on an open interval, with $a(x)$ and $f(x)$ analytic. Then we want to prove that $u$ is also analytic. A further reduction is possible: multiply both sides by $\exp (A(x))$ where $A'=a$ and call $v = e^A u$, $g=e^A f$. Then we are reduced to proving the same thing for the simple equation $$v ' = g.$$ Is $v$ analytic if $g$ is analytic? A further reduction is possible! just call $w=v-G$, where $G'=g$. Nice trick eh? we are reduced to the even simpler equation $$w' = 0$$ and our serach will be over if we prove the fundamental fact that any weak solution of $w'=0$ must be a constant function. Notice that the same chain of arguments applies if the coefficients are $C^\infty$ (you get that $u$ is also $C^\infty$) or and if $f$ is just $C^k$.

Now, in the greatest possible generality, if $w$ is any distribution on an open interval, with vanishing derivative, then $w$ must be a constant. This is proved in the following way: by definition, we know that $w(\phi')=0$ for any test function $\phi$. Fix a test function $\chi$ with $\int\chi=1$. Let $\psi$ be an arbitrary test function, define $$\psi_1 = \psi-\chi \cdot \int \psi$$ and notice that $\int\psi_1=0$. This means that $\psi_1$ can be written as the derivative of another test function (guess which one?) $\psi_1=\psi_2'$ and hence $$w(\psi_1) = w(\psi_2') = 0$$ by assumption. This implies $$w(\psi) = w(\chi) \cdot \int \psi$$ which in the language of distributions means precisely that $w$ is equal to the constant $w(\chi)$ (notice that $\chi$ is fixed once and for all). That's it.

1

The answers already given are quite complete and say it all, but maybe the OP was in search of a very simple explanation of what is happening. Let me try.

You will agree that it is not necessary to work in the full generality of an n-th order equation; if we can do it for the first order case, it is easy to generalize by induction. Moreover, we can assume that the highest order coefficient is equal to 1 (just divide by it). So essentially the question is: let $u$ be a weak solution of the equation $$u' + a(x) u = f(x)$$ on an open interval, with $a(x)$ and $f(x)$ analytic. Then we want to prove that $u$ is also analytic. A further reduction is possible: multiply both sides by $\exp (A(x))$ where $A'=a$ and call $v = e^A u$, $g=e^A f$. Then we are reduced to proving the same thing for the simple equation $$v ' = g.$$ Is $v$ analytic if $g$ is analytic? A further reduction is possible! just call $w=v-G$, where $G'=g$. Nice trick eh? we are reduced to the even simpler equation $$w' = 0$$ and our serach will be over if we prove the fundamental fact that any weak solution of $w'=0$ must be a constant function. Notice that the same chain of arguments applies if the coefficients are $C^\infty$ (you get that $u$ is also $C^\infty$) or just $C^k$.

Now, in the greatest possible generality, if $w$ is any distribution on an open interval, with vanishing derivative, then $w$ must be a constant. This is proved in the following way: by definition, we know that $w(\phi')=0$ for any test function $\phi$. Fix a test function $\chi$ with $\int\chi=1$. Let $\psi$ be an arbitrary test function, define $$\psi_1 = \psi-\chi \cdot \int \psi$$ and notice that $\int\psi_1=0$. This means that $\psi_1$ can be written as the derivative of another test function (guess which one?) $\psi_1=\psi_2'$ and hence $$w(\psi_1) = w(\psi_2') = 0$$ by assumption. This implies $$w(\psi) = w(\chi) \cdot \int \psi$$ which in the language of distributions means precisely that $w$ is equal to the constant $w(\chi)$ (notice that $\chi$ is fixed once and for all). That's it.