# General solution to nth order linear inhomogeneous ode

I am trying to understand Problem 3.21 in Teschl's book on ODE's.

Prove that the solution to the inhomogeneous equation $$x^{(n)} + c_{n-1} x^{(n-1)} + \cdots + c_1 \dot{x} + c_0 x = g(t)$$ is given by $$x(t) = x_h(t) + \int_0^t u(t-s) g(s) ds$$ where $x_h(t)$ is an arbitrary solution of the homogeneous equation and $u(t)$ is the solution of the homogeneous equation corresponding to the initial condition $u(0) = \dot{u}= \cdots = u^{(n-2)} = 0$ and $u^{(n-1)}=1$. Hint: either reduce it to the general form of the inhomogeneous linear equation $$x(t) = Ax(t) + g(t)$$ which is given by $$x(t) = e^{tA} x_0 + \int_0^t e^{(t-s)A} g(s) ds$$ or verify it directly. I recommend doing both.

I am able to verify directly by repeated differentiation. However, I cannot seem to manipulate the nth order equation solution into the form of the solution of the inhomogeneous linear system despite the fact that the solutions look quite similar. I really want to understand this connection though and would very much appreciate some insight into how this reduction is done.

The equation $$\tag{1} x^{(n)} + c_{n-1} x^{(n-1)} + \cdots + c_1 \dot{x} + c_0 x = g(t)$$ can be rewriten as the system $$\tag{2} \frac{d\bar x}{dt}=A\bar x+f(t),$$ where $$\bar x=\begin{bmatrix} x\\ \dot x \\ \vdots \\\ x^{(n-1)} \end{bmatrix}, \quad A=\begin{bmatrix} 0&1&0&\ldots&0\\ 0&0&1&\ldots&0\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ 0&0&0&\ldots&1\\ -c_0&-c_1&-c_2&\ldots&-c_{n-1} \end{bmatrix}, \quad f(t)= \begin{bmatrix} 0\\0\\ \vdots\\0\\g(t) \end{bmatrix}.$$ The particular solution of the system (2) is equal to $$\bar x_p=\int_0^t e^{(t-s)A} f(s)\, ds=\int_0^t e^{(t-s)A} \begin{bmatrix} 0\\ \vdots\\g(s) \end{bmatrix}\, ds= \int_0^t e^{(t-s)A} \begin{bmatrix} 0\\ \vdots\\1 \end{bmatrix}g(s)\, ds.$$ We know that the solution of the IVP for the homogeneous system $\frac{d\bar x}{dt}=A\bar x$ is $e^{tA} \bar x(0)$, thus, $$e^{(t-s)A} \begin{bmatrix} 0\\ \vdots\\1 \end{bmatrix}= \begin{bmatrix} u(t-s)\\ \dot u(t-s) \\ \vdots \\ u^{(n-1)}(t-s) \end{bmatrix}.$$ The particular solution of the equation (1) corresponds with the first component of the column $\bar x_p$, hence, it is equal to $\int_0^t u(t-s)g(s)\,ds$ (for the analogous reason $x_h(t)$ is equal to the first row of $e^{tA} x_0$).