# Magnus expansion

In mathematics and physics, the Magnus expansion, named after Wilhelm Magnus (1907–1990), provides an exponential representation of the product integral solution of a first-order homogeneous linear differential equation for a linear operator. In particular, it furnishes the fundamental matrix of a system of linear ordinary differential equations of order n with varying coefficients. The exponent is aggregated as an infinite series, whose terms involve multiple integrals and nested commutators.

## The deterministic case

### Magnus approach and its interpretation

Given the n × n coefficient matrix A(t), one wishes to solve the initial-value problem associated with the linear ordinary differential equation

${\displaystyle Y'(t)=A(t)Y(t),\quad Y(t_{0})=Y_{0}}$

for the unknown n-dimensional vector function Y(t).

When n = 1, the solution is given as a product integral

${\displaystyle Y(t)=\exp \left(\int _{t_{0}}^{t}A(s)\,ds\right)Y_{0}.}$

This is still valid for n > 1 if the matrix A(t) satisfies A(t1) A(t2) = A(t2) A(t1) for any pair of values of t, t1 and t2. In particular, this is the case if the matrix A is independent of t. In the general case, however, the expression above is no longer the solution of the problem.

The approach introduced by Magnus to solve the matrix initial-value problem is to express the solution by means of the exponential of a certain n × n matrix function Ω(t, t0):

${\displaystyle Y(t)=\exp {\big (}\Omega (t,t_{0}){\big )}\,Y_{0},}$

which is subsequently constructed as a series expansion:

${\displaystyle \Omega (t)=\sum _{k=1}^{\infty }\Omega _{k}(t),}$

where, for simplicity, it is customary to write Ω(t) for Ω(t, t0) and to take t0 = 0.

Magnus appreciated that, since d/dt (eΩ) e−Ω = A(t), using a Poincaré−Hausdorff matrix identity, he could relate the time derivative of Ω to the generating function of Bernoulli numbers and the adjoint endomorphism of Ω,

${\displaystyle \Omega '={\frac {\operatorname {ad} _{\Omega }}{\exp(\operatorname {ad} _{\Omega })-1}}A,}$

to solve for Ω recursively in terms of A "in a continuous analog of the BCH expansion", as outlined in a subsequent section.

The equation above constitutes the Magnus expansion, or Magnus series, for the solution of matrix linear initial-value problem. The first four terms of this series read

{\displaystyle {\begin{aligned}\Omega _{1}(t)&=\int _{0}^{t}A(t_{1})\,dt_{1},\\\Omega _{2}(t)&={\frac {1}{2}}\int _{0}^{t}dt_{1}\int _{0}^{t_{1}}dt_{2}\,[A(t_{1}),A(t_{2})],\\\Omega _{3}(t)&={\frac {1}{6}}\int _{0}^{t}dt_{1}\int _{0}^{t_{1}}dt_{2}\int _{0}^{t_{2}}dt_{3}\,{\Bigl (}{\big [}A(t_{1}),[A(t_{2}),A(t_{3})]{\big ]}+{\big [}A(t_{3}),[A(t_{2}),A(t_{1})]{\big ]}{\Bigr )},\\\Omega _{4}(t)&={\frac {1}{12}}\int _{0}^{t}dt_{1}\int _{0}^{t_{1}}dt_{2}\int _{0}^{t_{2}}dt_{3}\int _{0}^{t_{3}}dt_{4}\,\left({\Big [}{\big [}[A_{1},A_{2}],A_{3}{\big ]},A_{4}{\Big ]}\right.\\&\qquad +{\Big [}A_{1},{\big [}[A_{2},A_{3}],A_{4}{\big ]}{\Big ]}+{\Big [}A_{1},{\big [}A_{2},[A_{3},A_{4}]{\big ]}{\Big ]}+\left.{\Big [}A_{2},{\big [}A_{3},[A_{4},A_{1}]{\big ]}{\Big ]}\right),\end{aligned}}}

where [A, B] ≡ A BB A is the matrix commutator of A and B.

These equations may be interpreted as follows: Ω1(t) coincides exactly with the exponent in the scalar (n = 1) case, but this equation cannot give the whole solution. If one insists in having an exponential representation (Lie group), the exponent needs to be corrected. The rest of the Magnus series provides that correction systematically: Ω or parts of it are in the Lie algebra of the Lie group on the solution.

In applications, one can rarely sum exactly the Magnus series, and one has to truncate it to get approximate solutions. The main advantage of the Magnus proposal is that the truncated series very often shares important qualitative properties with the exact solution, at variance with other conventional perturbation theories. For instance, in classical mechanics the symplectic character of the time evolution is preserved at every order of approximation. Similarly, the unitary character of the time evolution operator in quantum mechanics is also preserved (in contrast, e.g., to the Dyson series solving the same problem).

### Convergence of the expansion

From a mathematical point of view, the convergence problem is the following: given a certain matrix A(t), when can the exponent Ω(t) be obtained as the sum of the Magnus series?

A sufficient condition for this series to converge for t ∈ [0,T) is

${\displaystyle \int _{0}^{T}\|A(s)\|_{2}\,ds<\pi ,}$

where ${\displaystyle \|\cdot \|_{2}}$ denotes a matrix norm. This result is generic in the sense that one may construct specific matrices A(t) for which the series diverges for any t > T.

### Magnus generator

A recursive procedure to generate all the terms in the Magnus expansion utilizes the matrices Sn(k) defined recursively through

${\displaystyle S_{n}^{(j)}=\sum _{m=1}^{n-j}\left[\Omega _{m},S_{n-m}^{(j-1)}\right],\quad 2\leq j\leq n-1,}$
${\displaystyle S_{n}^{(1)}=\left[\Omega _{n-1},A\right],\quad S_{n}^{(n-1)}=\operatorname {ad} _{\Omega _{1}}^{n-1}(A),}$

which then furnish

${\displaystyle \Omega _{1}=\int _{0}^{t}A(\tau )\,d\tau ,}$
${\displaystyle \Omega _{n}=\sum _{j=1}^{n-1}{\frac {B_{j}}{j!}}\int _{0}^{t}S_{n}^{(j)}(\tau )\,d\tau ,\quad n\geq 2.}$

Here adkΩ is a shorthand for an iterated commutator (see adjoint endomorphism):

${\displaystyle \operatorname {ad} _{\Omega }^{0}A=A,\quad \operatorname {ad} _{\Omega }^{k+1}A=[\Omega ,\operatorname {ad} _{\Omega }^{k}A],}$

while Bj are the Bernoulli numbers with B1 = −1/2.

Finally, when this recursion is worked out explicitly, it is possible to express Ωn(t) as a linear combination of n-fold integrals of n − 1 nested commutators involving n matrices A:

${\displaystyle \Omega _{n}(t)=\sum _{j=1}^{n-1}{\frac {B_{j}}{j!}}\sum _{k_{1}+\cdots +k_{j}=n-1 \atop k_{1}\geq 1,\ldots ,k_{j}\geq 1}\int _{0}^{t}\operatorname {ad} _{\Omega _{k_{1}}(\tau )}\operatorname {ad} _{\Omega _{k_{2}}(\tau )}\cdots \operatorname {ad} _{\Omega _{k_{j}}(\tau )}A(\tau )\,d\tau ,\quad n\geq 2,}$

which becomes increasingly intricate with n.

## The stochastic case

### Extension to stochastic ordinary differential equations

For the extension to the stochastic case let ${\textstyle \left(W_{t}\right)_{t\in [0,T]}}$ be a ${\textstyle \mathbb {R} ^{q}}$-dimensional Brownian motion, ${\textstyle q\in \mathbb {N} _{>0}}$, on the probability space ${\textstyle \left(\Omega ,{\mathcal {F}},\mathbb {P} \right)}$ with finite time horizon ${\textstyle T>0}$ and natural filtration. Now, consider the linear matrix-valued stochastic Itô differential equation (with Einstein's summation convention over the index j)

${\displaystyle dX_{t}=B_{t}X_{t}dt+A_{t}^{(j)}X_{t}dW_{t}^{j},\quad X_{0}=I_{d},\qquad d\in \mathbb {N} _{>0},}$

where ${\textstyle B_{\cdot },A_{\cdot }^{(1)},\dots ,A_{\cdot }^{(j)}}$ are progressively measurable ${\textstyle d\times d}$-valued bounded stochastic processes and ${\textstyle I_{d}}$ is the identity matrix. Following the same approach as in the deterministic case with alterations due to the stochastic setting[1] the corresponding matrix logarithm will turn out as an Itô-process, whose first two expansion orders are given by ${\textstyle Y_{t}^{(1)}=Y_{t}^{(1,0)}+Y_{t}^{(0,1)}}$ and ${\textstyle Y_{t}^{(2)}=Y_{t}^{(2,0)}+Y_{t}^{(1,1)}+Y_{t}^{(0,2)}}$, where with Einstein's summation convention over i and j

{\displaystyle {\begin{aligned}Y_{t}^{(0,0)}&=0,\\Y_{t}^{(1,0)}&=\int _{0}^{t}A_{s}^{(j)}\,dW_{s}^{j},\\Y_{t}^{(0,1)}&=\int _{0}^{t}B_{s}\,ds,\\Y_{t}^{(2,0)}&=-{\frac {1}{2}}\int _{0}^{t}{\big (}A_{s}^{(j)}{\big )}^{2}\,ds+{\frac {1}{2}}\int _{0}^{t}{\Big [}A_{s}^{(j)},\int _{0}^{s}A_{r}^{(i)}\,dW_{r}^{i}{\Big ]}dW_{s}^{j},\\Y_{t}^{(1,1)}&={\frac {1}{2}}\int _{0}^{t}{\Big [}B_{s},\int _{0}^{s}A_{r}^{(j)}\,dW_{r}{\Big ]}\,ds+{\frac {1}{2}}\int _{0}^{t}{\Big [}A_{s}^{(j)},\int _{0}^{s}B_{r}\,dr{\Big ]}\,dW_{s}^{j},\\Y_{t}^{(0,2)}&={\frac {1}{2}}\int _{0}^{t}{\Big [}B_{s},\int _{0}^{s}B_{r}\,dr{\Big ]}\,ds.\end{aligned}}}

### Convergence of the expansion

In the stochastic setting the convergence will now be subject to a stopping time ${\textstyle \tau }$ and a first convergence result is given by:[2]

Under the previous assumption on the coefficients there exists a strong solution ${\textstyle X=(X_{t})_{t\in [0,T]}}$, as well as a strictly positive stopping time ${\textstyle \tau \leq T}$ such that:

1. ${\textstyle X_{t}}$ has a real logarithm ${\textstyle Y_{t}}$ up to time ${\textstyle \tau }$, i.e.
${\displaystyle X_{t}=e^{Y_{t}},\qquad 0\leq t<\tau ;}$
2. the following representation holds ${\textstyle \mathbb {P} }$-almost surely:
${\displaystyle Y_{t}=\sum _{n=0}^{\infty }Y_{t}^{(n)},\qquad 0\leq t<\tau ,}$
where ${\textstyle Y^{(n)}}$ is the n-th term in the stochastic Magnus expansion as defined below in the subsection Magnus expansion formula;
3. there exists a positive constant C, only dependent on ${\textstyle \|A^{(1)}\|_{T},\dots ,\|A^{(q)}\|_{T},\|B\|_{T},T,d}$, with ${\textstyle \|A_{\cdot }\|_{T}=\|\|A_{t}\|_{F}\|_{L^{\infty }(\Omega \times [0,T])}}$, such that
${\displaystyle \mathbb {P} (\tau \leq t)\leq Ct,\qquad t\in [0,T].}$

### Magnus expansion formula

The general expansion formula for the stochastic Magnus expansion is given by:

${\displaystyle Y_{t}=\sum _{n=0}^{\infty }Y_{t}^{(n)}\quad {\text{with}}\quad Y_{t}^{(n)}:=\sum _{r=0}^{n}Y_{t}^{(r,n-r)},}$

where the general term ${\textstyle Y^{(r,n-r)}}$ is an Itô-process of the form:

${\displaystyle Y_{t}^{(r,n-r)}=\int _{0}^{t}\mu _{s}^{r,n-r}ds+\int _{0}^{t}\sigma _{s}^{r,n-r,j}dW_{s}^{j},\qquad n\in \mathbb {N} _{0},\ r=0,\dots ,n,}$

The terms ${\textstyle \sigma ^{r,n-r,j},\mu ^{r,n-r}}$ are defined recursively as

{\displaystyle {\begin{aligned}\sigma _{s}^{r,n-r,j}&:=\sum _{i=0}^{n-1}{\frac {\beta _{i}}{i!}}S_{s}^{r-1,n-r,i}{\big (}A^{(j)}{\big )},\\\mu _{s}^{r,n-r}&:=\sum _{i=0}^{n-1}{\frac {\beta _{i}}{i!}}S_{s}^{r,n-r-1,i}(B)-{\frac {1}{2}}\sum _{j=1}^{q}\sum _{i=0}^{n-2}{\frac {\beta _{i}}{i!}}\sum _{q_{1}=2}^{r}\sum _{q_{2}=0}^{n-r}S^{r-q_{1},n-r-q_{2},i}{\big (}Q^{q_{1},q_{2},j}{\big )},\end{aligned}}}

with

{\displaystyle {\begin{aligned}Q_{s}^{q_{1},q_{2},j}:=\sum _{i_{1}=2}^{q_{1}}\sum _{i_{2}=0}^{q_{2}}\sum _{h_{1}=1}^{i_{1}-1}\sum _{h_{2}=0}^{i_{2}}&\sum _{p_{1}=0}^{q_{1}-i_{1}}\sum _{{p_{2}}=0}^{q_{2}-i_{2}}\ \sum _{m_{1}=0}^{p_{1}+p_{2}}\ \sum _{{m_{2}}=0}^{q_{1}-i_{1}-p_{1}+q_{2}-i_{2}-p_{2}}\\&{\Bigg (}{{\frac {S_{s}^{p_{1},p_{2},m_{1}}{\big (}\sigma _{s}^{h_{1},h_{2},j}{\big )}}{({m_{1}}+1)!}}{\frac {S_{s}^{q_{1}-i_{1}-p_{1},q_{2}-i_{2}-p_{2},m_{2}}{\big (}\sigma _{s}^{i_{1}-h_{1},i_{2}-h_{2},j}{\big )}}{({m_{2}}+1)!}}}\\&\qquad \qquad +{\frac {{\big [}S_{s}^{p_{1},p_{2},m_{1}}{\big (}\sigma _{s}^{i_{1}-h_{1},i_{2}-h_{2},j}{\big )},S_{s}^{q_{1}-i_{1}-p_{1},q_{2}-i_{2}-p_{2},m_{2}}{\big (}\sigma _{s}^{h_{1},h_{2},j}{\big )}{\big ]}}{({m_{1}}+{m_{2}}+2)({m_{1}}+1)!{m_{2}}!}}{\Bigg )},\end{aligned}}}

and with the operators S being defined as

{\displaystyle {\begin{aligned}S_{s}^{r-1,n-r,0}(A)&:={\begin{cases}A&{\text{if }}r=n=1,\\0&{\text{otherwise}},\end{cases}}\\S_{s}^{r-1,n-r,i}(A)&:=\sum _{\begin{array}{c}(j_{1},k_{1}),\dots ,(j_{i},k_{i})\in \mathbb {N} _{0}^{2}\\j_{1}+\cdots +j_{i}=r-1\\k_{1}+\cdots +k_{i}=n-r\end{array}}{\big [}Y_{s}^{(j_{1},k_{1})},{\big [}\dots ,{\big [}Y_{s}^{(j_{i},k_{i})},A_{s}{\big ]}\dots {\big ]}{\big ]}\\&=\sum _{\begin{array}{c}(j_{1},k_{1}),\dots ,(j_{i},k_{i})\in \mathbb {N} _{0}^{2}\\j_{1}+\cdots +j_{i}=r-1\\k_{1}+\cdots k_{i}=n-r\end{array}}\operatorname {ad} _{Y_{s}^{(j_{1},k_{1})}}\circ \cdots \circ \operatorname {ad} _{Y_{s}^{(j_{i},k_{i})}}(A_{s}),\qquad i\in \mathbb {N} .\end{aligned}}}

## Applications

Since the 1960s, the Magnus expansion has been successfully applied as a perturbative tool in numerous areas of physics and chemistry, from atomic and molecular physics to nuclear magnetic resonance[3] and quantum electrodynamics.[4] It has been also used since 1998 as a tool to construct practical algorithms for the numerical integration of matrix linear differential equations. As they inherit from the Magnus expansion the preservation of qualitative traits of the problem, the corresponding schemes are prototypical examples of geometric numerical integrators.