The differential operator in the first form can be written as
dd1[n_] := (Sum[a[k] D[#, {t, k}], {k, 0, n}]) &
and is applied for example as
dd1[1][x[t]]
a[0] x[t] + a[1] Derivative[1][x][t]
and
dd1[2] @x[t]
a[0] x[t] + a[1] Derivative[1][x][t] + a[2] (x^\[Prime]\[Prime])[t]
In the second (product) form we would perhaps try
d2[n_] := a[n] Expand[Product[D[#, t] - r[k], {k, 0, n}]] &
But application leads to
d2[2][x[t]]
a[2] (-r[0] r[1] r[2] + r[0] r[1] Derivative[1][x][t] +
r[0] r[2] Derivative[1][x][t] + r[1] r[2] Derivative[1][x][t] -
r[0] Derivative[1][x][t]^2 - r[1] Derivative[1][x][t]^2 -
r[2] Derivative[1][x][t]^2 + Derivative[1][x][t]^3)
which is not the result we want.
So let us proceed step by step.
First we refrain from using D[] immediately but replace it by the symbol d:
d2[n_] := a[n] Expand[Product[d - r[k], {k, 0, n}]]
d2[1]
a[1] (d^2 - d r[0] - d r[1] + r[0] r[1])
Ok. Now in this expression we replace d^m by D[#,[t,m}] for m=1, 2, ..., n which gives us
dd2[n_] := a[n]*Expand[Product[d - r[k], {k, 1, n}]] /.
d^(m_) -> D[#1, {t, m}] /. d -> D[#1, {t, 1}] &
Notice that we need to replace the the first power of d separately because it does not match te pattern d^m_.
Applying it
dd2[2][x[t]]
a[2] (r[1] r[2] - r[1] Derivative[1][x][t] -
r[2] Derivative[1][x][t] + (x^\[Prime]\[Prime])[t])
shows that it is correct.
Now the quantities r[i] are of course the roots of the equation
eq[n_] := 0 == Sum[a[k] r^k, {k, 0, n}]
eq[1]
0 == a[0] + r a[1]
eq[2]
0 == a[0] + r a[1] + r^2 a[2]
These can be written explicitly thus
r[n_, k_] := Root[Sum[a[j] #1^j , {j, 0, n}] &, k]
r[5, 2]
Root[a[0] + a[1] #1 + a[2] #1^2 + a[3] #1^3 + a[4] #1^4 + a[5] #1^5 &, 2]
Summarizing, we have provided all contructs requested in the question.
Regards,
Wolfgang
Solve
$ a_n x^n + a_{n-1} x^{n-1} +\cdots+a_1 x+a_0 = 0 $. $\endgroup$