# Duhamel's principle

In mathematics, and more specifically in partial differential equations, Duhamel's principle is a general method for obtaining solutions to inhomogeneous linear evolution equations like the heat equation, wave equation, and vibrating plate equation. It is named after Jean-Marie Duhamel who first applied the principle to the inhomogeneous heat equation that models, for instance, the distribution of heat in a thin plate which is heated from beneath. For linear evolution equations without spatial dependency, such as a harmonic oscillator, Duhamel's principle reduces to the method of variation of parameters technique for solving linear inhomogeneous ordinary differential equations. It is also an indispensable tool in the study of nonlinear partial differential equations such as the Navier–Stokes equations and nonlinear Schrödinger equation where one treats the nonlinearity as an inhomogeneity.
The philosophy underlying Duhamel's principle is that it is possible to go from solutions of the Cauchy problem (or initial value problem) to solutions of the inhomogeneous problem. Consider, for instance, the example of the heat equation modeling the distribution of heat energy u in R$^n$. Indicating by u$_t$ (x, t) the time derivative of u(x, t), the initial value problem is ${\begin{cases}u_{t}(x,t)-\Delta u(x,t)=0&(x,t)\in \mathbb {R} ^{n}\times (0,\infty )\\u(x,0)=g(x)&x\in \mathbb {R} ^{n}\end{cases}}$ where g is the initial heat distribution. By contrast, the inhomogeneous problem for the heat equation, ${\begin{cases}u_{t}(x,t)-\Delta u(x,t)=f(x,t)&(x,t)\in \mathbb {R} ^{n}\times (0,\infty )\\u(x,0)=0&x\in \mathbb {R} ^{n}\end{cases}}$ corresponds to adding an external heat energy f (x, t) dt at each point. Intuitively, one can think of the inhomogeneous problem as a set of homogeneous problems each starting afresh at a different time slice t = t$_0$. By linearity, one can add up (integrate) the resulting solutions through time t$_0$ and obtain the solution for the inhomogeneous problem. This is the essence of Duhamel's principle.

## General considerations

Formally, consider a linear inhomogeneous evolution equation for a function $u:D\times (0,\infty )\to \mathbb {R}$ with spatial domain D in R$^n$, of the form ${\begin{cases}u_{t}(x,t)-Lu(x,t)=f(x,t)&(x,t)\in D\times (0,\infty )\\u|_{\partial D}=0&\\u(x,0)=0&x\in D,\end{cases}}$ where L is a linear differential operator that involves no time derivatives.
Duhamel's principle is, formally, that the solution to this problem is $u(x,t)=\int _{0}^{t}(P^{s}f)(x,t)\,ds$ where P$^s$f is the solution of the problem ${\begin{cases}v_{t}-Lv=0&(x,t)\in D\times (s,\infty )\\v|_{\partial D}=0&\\v(x,s)=f(x,s)&x\in D.\end{cases}}$ The integrand is the retarded solution $P^{s}f$, evaluated at time t, representing the effect, at the later time t, of an infinitesimal force $f(x,s)\,ds$ applied at time s. (The operator $P^{s}$ can be thought of as an inverse of the operator $\partial _{t}-L$ for the Cauchy problem with initial condition $f(x,s)$.)
Duhamel's principle also holds for linear systems (with vector-valued functions u), and this in turn furnishes a generalization to higher t derivatives, such as those appearing in the wave equation (see below). Validity of the principle depends on being able to solve the homogeneous problem in an appropriate function space and that the solution should exhibit reasonable dependence on parameters so that the integral is well-defined. Precise analytic conditions on u and f depend on the particular application.

## Examples
### Wave equation

The linear wave equation models the displacement u of an idealized dispersionless one-dimensional string, in terms of derivatives with respect to time t and space x:
${\frac {\partial ^{2}u}{\partial t^{2}}}-c^{2}{\frac {\partial ^{2}u}{\partial x^{2}}}=f(x,t).$
The function f (x, t), in natural units, represents an external force applied to string at the position (x, t). In order to be a suitable physical model for nature, it should be possible to solve it for any initial state that the string is in, specified by its initial displacement and velocity:
$u(x,0)=u_{0}(x),\qquad {\frac {\partial u}{\partial t}}(x,0)=v_{0}(x).$
More generally, we should be able to solve the equation with data specified on any t = constant slice:
$u(x,T)=u_{T}(x),\qquad {\frac {\partial u}{\partial t}}(x,T)=v_{T}(x).$
To evolve a solution from any given time slice T to T + dT, the contribution of the force must be added to the solution. That contribution comes from changing the velocity of the string by f (x, T) dT. That is, to get the solution at time T + dT from the solution at time T, we must add to it a new (forward) solution of the homogeneous (no external forces) wave equation
${\frac {\partial ^{2}U}{\partial t^{2}}}-c^{2}{\frac {\partial ^{2}U}{\partial x^{2}}}=0$
with the initial conditions
$U(x,T)=0,\qquad {\frac {\partial U}{\partial t}}(x,T)=f(x,T)dT.$
A solution to this equation is achieved by straightforward integration:
$U(x,t)=\left({\frac {1}{2c}}\int _{x-c(t-T)}^{x+c(t-T)}f(\xi ,T)\,d\xi \right)\,dT$
(The expression in parentheses is just $P^{T}f(x,t)$ in the notation of the general method above.) So a solution of the original initial value problem is obtained by starting with a solution to the problem with the same prescribed initial values problem but with zero initial displacement, and adding to that (integrating) the contributions from the added force in the time intervals from T to T+dT:
$u(x,t)={\frac {1}{2}}\left[u_{0}(x+ct)+u_{0}(x-ct)\right]+{\frac {1}{2c}}\int _{x-ct}^{x+ct}v_{0}(y)dy+{\frac {1}{2c}}\int _{0}^{t}\int _{x-c(t-T)}^{x+c(t-T)}f(\xi ,T)\,d\xi \,dT.$

### Constant-coefficient linear ODE

Duhamel's principle is the result that the solution to an inhomogeneous, linear, partial differential equation can be solved by first finding the solution for a step input, and then superposing using Duhamel's integral. Suppose we have a constant coefficient, m-th order inhomogeneous ordinary differential equation. $P(\partial _{t})u(t)=F(t)$ $\partial _{t}^{j}u(0)=0,\;0\leq j\leq m-1$ where $P(\partial _{t}):=a_{m}\partial _{t}^{m}+\cdots +a_{1}\partial _{t}+a_{0},\;a_{m}\neq 0.$
We can reduce this to the solution of a homogeneous ODE using the following method. All steps are done formally, ignoring necessary requirements for the solution to be well defined.
First let G solve $P(\partial _{t})G=0,\;\partial _{t}^{j}G(0)=0,\quad 0\leq j\leq m-2,\;\partial _{t}^{m-1}G(0)=1/a_{m}.$
Define $H=G\chi _{[0,\infty )}$, with $\chi _{[0,\infty )}$ being the characteristic function of the interval $[0,\infty )$. Then we have
$P(\partial _{t})H=\delta$
in the sense of distributions. Therefore
${\begin{aligned}u(t)&=(H\ast F)(t)\\&=\int _{0}^{\infty }G(\tau )F(t-\tau )\,d\tau \\&=\int _{-\infty }^{t}G(t-\tau )F(\tau )\,d\tau \end{aligned}}$
solves the ODE.

### Constant-coefficient linear PDE

More generally, suppose we have a constant coefficient inhomogeneous partial differential equation
$P(\partial _{t},D_{x})u(t,x)=F(t,x)$
where $D_{x}={\frac {1}{i}}{\frac {\partial }{\partial x}}.$
We can reduce this to the solution of a homogeneous ODE using the following method. All steps are done formally, ignoring necessary requirements for the solution to be well defined.
First, taking the Fourier transform in x we have $P(\partial _{t},\xi ){\hat {u}}(t,\xi )={\hat {F}}(t,\xi ).$
Assume that $P(\partial _{t},\xi )$ is an m-th order ODE in t. Let $a_{m}$ be the coefficient of the highest order term of $P(\partial _{t},\xi )$. Now for every $\xi$ let $G(t,\xi )$ solve $P(\partial _{t},\xi )G(t,\xi )=0,\;\partial _{t}^{j}G(0,\xi )=0\;{\text{ for }}0\leq j\leq m-2,\;\partial _{t}^{m-1}G(0,\xi )=1/a_{m}.$
Define $H(t,\xi )=G(t,\xi )\chi _{[0,\infty )}(t)$. We then have $P(\partial _{t},\xi )H(t,\xi )=\delta (t)$ in the sense of distributions. Therefore ${\begin{aligned}{\hat {u}}(t,\xi )&=(H(\cdot ,\xi )\ast {\hat {F}}(\cdot ,\xi ))(t)\\&=\int _{0}^{\infty }G(\tau ,\xi ){\hat {F}}(t-\tau ,\xi )\,d\tau \\&=\int _{-\infty }^{t}G(t-\tau ,\xi ){\hat {F}}(\tau ,\xi )\,d\tau \end{aligned}}$ solves the PDE (after transforming back to x).