I'm having difficulties understanding this proof.
We want to show, that $$(u, \phi) = (\sum_{k = 0}^{m - 1} c_k \delta^{(k)}, \phi)$$ under the condition that $x^m u = 0, \quad u \in \mathcal{D}'(\mathbb{R}) \text{ set of distributions on }\mathbb{R}$
For this, we define $\phi$ as follows:
$$\phi(x) = x^m \Psi (x) + \eta(x) \sum_{k = 0}^{m-1} \frac{\phi^{(k)}(0)}{k!}x^k$$
where
$$ \eta (x) = \left\{ \begin{array}{@{}l@{\thinspace}l} 1 &: x \in K(0, \varepsilon)\\ 0 &: x \in K(0, 3 \varepsilon) \\ \end{array} \right. $$
and
$$ \Psi (x) = \left\{ \begin{array}{@{}l@{\thinspace}l} \frac{1}{x^m} (\phi(x) - \eta(x) \sum_{k=0}^{m-1} \frac{\phi^{(k)}(0)}{k!} x^k) &: x \neq 0\\ \frac{x^{(m)}}{m!} &: x = 0 \\ \end{array} \right. $$
We then use the linearity of the sum and the functional to get what we want
I understand this, but what I don't understand is why can we define an arbitrary $\phi$ in such a way? This just comes like out from nowhere. I mean, if it works, then it works and it's fine, but nevertheless our $\phi$ should still be arbitrary as $(u, \phi) = (\sum_{k = 0}^{m - 1} c_k \delta^{(k)}, \phi)$ should be true for any $\phi \in \mathcal{D}(\mathbb{R})$ (set of test functions on $\mathbb{R}$)
FYI: $K(0, \varepsilon)$ is an open ball with the center $0$ and radius $\varepsilon$.
Let $m\in\mathbb{N}$ and $\phi \in C^\infty_c(\mathbb{R}).$ Take $\eta\in C^\infty_c(\mathbb{R})$ such that $\eta(x)\equiv 1$ on a neighborhood of $x=0.$
Let $T_m(x) = \sum_{k=0}^{m-1} \frac{1}{k!}x^k\phi^{(k)}(0).$ Note that $T_m \in C^\infty(\mathbb{R}).$
Let $R_m = \phi - \eta\,T_m.$ We then have $R_m \in C^\infty_c(\mathbb{R})$ and $R_m^{(k)}(0)=0$ for $k=0,\ldots,m-1.$
We now want to show that there exists $\Psi \in C^\infty_c(\mathbb{R})$ such that $R_m(x)=x^m\Psi(x).$ This follows from the theorem below.
Lemma
Let $\phi \in C^\infty_c(\mathbb{R})$ with $\phi(0)=0.$ Then there exists $\psi \in C^\infty_c(\mathbb{R})$ such that $\phi(x) = x\psi(x).$
Proof
Let $\psi(x) = \int_0^1 \phi'(tx) \, dt.$ Then $\psi^{(k)}(x) = \int_0^1 t^k \phi^{(k+1)}(tx) \, dt$ is defined for all $k=0,1,2,\ldots$ and $x\in\mathbb{R}$ so $\psi\in C^\infty(\mathbb{R}).$ Also, $$ x\psi(x) = x \int_0^1 \phi'(tx) \, dt = \int_0^1 \phi'(tx) \, x \, dt = \int_0^x \phi'(u) \, du = \phi(x) - \phi(0) = \phi(x), $$ by substitution $u=xt$ and since $\phi(0)=0.$
Theorem
Let $\phi \in C^\infty_c(\mathbb{R})$ with $\phi^{(k)}(0)=0$ for $k=0,\ldots,m-1,$ where $m \geq 1.$ Then there exists $\psi \in C^\infty_c(\mathbb{R})$ such that $\phi(x) = x^m\psi(x).$
Proof
The case $m=1$ is given by the lemma.
Assume that the theorem is true for $m=p\geq 1.$ Let $\phi \in C^\infty_c(\mathbb{R})$ with $\phi^{(k)}(0)=0$ for $k=0,\ldots,p.$ Then, since $\phi^{(k)}(0)=0$ for $k=0,\ldots,p-1,$ by the assumption there is $\psi\in C^\infty_c(\mathbb{R})$ such that $\phi(x)=x^p \psi(x).$ Now, $0 = \phi^{(p)}(0) = p! \, \psi(0),$ so $\psi(0)=0$ which by the lemma implies that there is $\Psi\in C^\infty_c(\mathbb{R})$ such that $\psi(x)=x\Psi(x).$ Thus, $\phi(x)=x^p\psi(x)=x^p\cdot x\Psi(x)=x^{p+1}\Psi(x)$ so the theorem is true also for $m=p+1.$
By induction the theorem is true for all $m=1,2,3,\ldots$