# Duhamel's formula

Duhamel's formula expresses the solution to a general inhomogeneous linear equation as a superposition of free solutions arising from both the initial data and the forcing term. For instance, the solution to the inhomogeneous initial value problem

$u_t - Lu = F; \quad u(0) = u_0$

for some spatial operator L, is given by

$u(t) = e^{tL} u_0 + \int_0^t e^{(t-t')L} F(t')\ dt',$

provided that L has enough of a functional calculus, and u, u0, F have enough regularity, to justify all computations. (If L is constant coefficient, then the Fourier transform can usually be used to justify everything so long as one works in the category of tempered distributions.) Note that the case L=0 is simply the fundamental theorem of calculus, indeed one can view Duhamel's formula as the fundamental theorem of calculus twisted (conjugated) by the free propagator etL.

For equations which are second order in time, the formula is slightly more complicated. For instance, the solution to the inhomogeneous initial value problem

$u_{tt} - Lu = F; \quad u(0) = u_0; \quad u_t(0) = u_1$

is given (formally, at least) by

$u(t) = \cos(t\sqrt{L}) u_0 + \frac{\sin(t\sqrt{L})}{\sqrt{L}} u_1 + \int_0^t \frac{\sin((t-t')\sqrt{L})}{\sqrt{L}} F(t')\ dt'.$

Anyhow, we note that in this case the solution can be cast in the standard form. So, let us introduce the vectors

${\underline y}=\left[\begin{matrix} u \\ w \end{matrix}\right]$

and

${\underline \Phi}=\left[\begin{matrix} 0 \\ F(t) \end{matrix}\right]$

with the matrix

${\hat M}=\begin{bmatrix} 0 & 1 \\ L & 0 \end{bmatrix}$
.

We can write the second order equation as

${\underline y}_{tt}-{\hat M}{\underline y}={\underline \Phi(t)}$

and write down the solution as expected in the original Duhamel's formula, that is

${\underline y}(t) = e^{t\hat M} {\underline y}_0 + \int_0^t e^{(t-t')\hat M} {\underline \Phi}(t')\ dt',$
.

Useful applications of this approach can be found for systems having a Hamiltonian flow.