# 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

${\displaystyle u_{t}-Lu=F;\quad u(0)=u_{0}}$

for some spatial operator L, is given by

${\displaystyle 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 ${\displaystyle u}$, ${\displaystyle u_{0}}$, ${\displaystyle 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 ${\displaystyle e^{tL}}$.

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

${\displaystyle u_{tt}-Lu=F;\quad u(0)=u_{0};\quad u_{t}(0)=u_{1}}$

is given (formally, at least) by

${\displaystyle 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

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

and

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

with the matrix

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

.

We can write the second order equation as

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

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

${\displaystyle {\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.