Kernel of the map $D^2+aD+b : k[[X]] \to k[[X]]$ , where $D :k[[X]] \to k[[X]]$ is the usual derivative map Let $k$ be a field . Let $P(X) \in  k[X]$ be a monic polynomial of degree $2$ which is not a perfect square in $ \bar k[X]$ i.e. $P(X)$ has no repeated roots in $\bar k$ , where $\bar k$ denotes the algebraic closure of $k$.
Let $D : k[[X]] \to k[[X]]$ be the usual derivation map i.e. $D (\sum_{n=0}^\infty a_nX^n)=\sum_{n=1}^\infty n a_n X^{n-1}$ . So then $P(D) : k[[X]] \to k[[X]]$ is also a $k$-linear map. Can we explicitly determine $\ker P(D)$ ?
Here $k[[X]]$ denotes the power series ring in one variable over $k$. 
If it is helpful, you may assume $[\bar k : k] \le 2$
 A: You are trying to solve the differential equation 
$$\frac{d^2 y}{d x^2} + a \frac{d y}{d x} + b = 0,$$ which, on the level of power series is 
$$n (n-1) a_n + a (n-1) a_{n-1 }+ b a_{n-2} = 0,$$ for $n \geq 2.$
Otherwise, if the roots of $P$ are real, this will be a linear combination of two exponentials, otherwise of sines and cosines.
A: Answer not using analysis.
We look for formal series solutions of $P(D)y(x)=0$ in the form $y(x)=\sum_{n=0}^\infty \frac{c_n}{n!} x^n$ where $n!=1\cdot2\cdot...\cdot n$. Then $Dy(x)=\sum_{n=0}^\infty \frac{c_{n+1}}{n!} x^n$. The equation $P(D)y(x)=0$ is satisfied if and only if $c_{n+2}+a\,c_{n+1}+b\,c_{n}=0$ for all nonegative integers $n$.
The solution sequences of this ''recurrence'' equation are determined by their ''initial'' terms $c_0,c_1$. Hence they form a vector space of dimension 2.
It is more convenient to express them in a different basis:
If $t^2+at+b=0$ has two roots $r,s$ in $k$, then use the sequences
$r^n, n\geq0$ and $s^n, n\geq0$. If $t^2+at+b=0$ has no roots in $k$, then it has two conjugate roots $r,\bar r$ in $\bar k$. A basis in $k[[x]]$ is then given by the sequences $r^n+\bar r^n, n\geq0$  and $r^{n+1}+\bar r^{n+1}, n\geq0$.  Here I use one assumption in the form that $\bar k=k[q]$, where $q^2\in k$ and therefore elements $f$ of $\bar k$ satisfying $\bar f=f$ are in $k$. I also used the assumption that there are no double roots of $t^2+at+b=0$.
Without wanting to use any analysis, let me indicate that $\sum_{n=0}^\infty \frac{r^n}{n!}x^n$ is the power series of an exponential function.
