Matrix exponential

In mathematics, the matrix exponential is a matrix function on square matrices analogous to the ordinary exponential function. It is used to solve systems of linear differential equations.

Let X be an n × n real or complex matrix. The exponential of X, denoted by eX, exp X, or exp(X), is the n × n matrix defined by the power series

eX=∑k=0∞1k!Xk

where X0 is defined to be the n × n identity matrix I, and ⁠Xk=XXk−1⁠ for integer ⁠k>0⁠. The series always converges, so the exponential of X is well-defined.

Equivalently, eX=limk→∞(I+Xk)k for integer-valued k.

The matrix exponential is also the solution Y(t)=eXt of the (matrix) differential equation

ddtY(t)=XY(t),Y(0)=I, evaluated at t = 1.

If D is an n × n diagonal matrix, exp(D) is an n × n diagonal matrix with each diagonal element equal to the ordinary exponential function applied to the corresponding diagonal element of D.

The matrix exponential is a special case of the more general theory of matrix functions, see Chapter 10 of the book by Higham.

Properties

Elementary properties

Let X and Y be n × n complex matrices and let a and b be arbitrary complex numbers. We denote the n × n identity matrix by I and the zero matrix by 0. The matrix exponential satisfies the following properties, that are immediate consequences of the definition as a power series:

  • e0 = I
  • exp(XT) = (exp X)T, where XT denotes the transpose of X.
  • exp(X*) = (exp X)*, where X* denotes the conjugate transpose of X.
  • If Y is invertible then eYXY−1 = YeXY−1.
  • If XY=YX then eXeY=eX+Y.

The proof of this last identity is the same as the standard power-series argument for the corresponding identity for the exponential of real numbers. That is to say, as long as X and Y commute, it makes no difference to the argument whether X and Y are numbers or matrices. This identity typically does not hold if X and Y do not commute (see Golden-Thompson inequality below). Special cases of this identity include:

  • eaXebX = e(a + b)X
  • eXe−X = I

Using the above results, we can easily verify the following claims:

Finally, the Laplace transform of a matrix exponential amounts to the resolvent, ∫0∞e−tsetXdt=(sI−X)−1 for all sufficiently large positive values of ⁠s⁠.

Linear differential equation systems

One of the reasons for the importance of the matrix exponential is that it can be used to solve systems of linear ordinary differential equations with constant coefficients. The solution of ddty(t)=Ay(t),y(0)=y0, where A is a constant matrix and ⁠y⁠ is a column vector, is given by y(t)=eAty0.

The matrix exponential can also be used to solve the inhomogeneous equation ddty(t)=Ay(t)+z(t),y(0)=y0, using an integrating factor method. See the section on applications below for details and examples.

There is no closed-form solution for differential equations of the form ddty(t)=A(t)y(t),y(0)=y0, where A is not constant, but the Magnus series gives the solution as an infinite sum.

The determinant of the matrix exponential

By Jacobi's formula, for any complex square matrix the following trace identity holds:

det⁡(eA)=etr⁡(A) .

In addition to providing a computational tool, this formula demonstrates that a matrix exponential is always an invertible matrix. This follows from the fact that the right hand side of the above equation is always non-zero, and so det⁡(eA)≠0, which implies that eA must be invertible.

In the real-valued case, the formula also shows that the map exp⁡:Mn(ℝ)→GL(n,ℝ) is not surjective. This follows from the fact that, for real-valued matrices, the right-hand side of the formula is always positive, while there exist invertible matrices with a negative determinant.

Real symmetric matrices

The matrix exponential of a real symmetric matrix is positive definite. Let S be an n × n real symmetric matrix and x∈ℝn a column vector. Using the elementary properties of the matrix exponential and of symmetric matrices, we have:

xTeSx=xTeS/2eS/2x=xT(eS/2)TeS/2x=(eS/2x)TeS/2x=‖eS/2x‖2≥0.

Since eS/2 is invertible, the equality only holds for x=0, and we have xTeSx>0 for all non-zero x. Hence eS is positive definite.

The exponential of sums

For any numbers (scalars) a and b the exponential function satisfies ea+b = ea eb. The same is true for commuting matrices. If matrices X and Y commute (meaning that XY = YX), then eX+Y=eXeY.

However, for matrices that do not commute the above equality does not necessarily hold.

The Lie product formula

Even if X and Y do not commute, the exponential eX + Y can be computed by the Lie product formula eX+Y=limk→∞(e1kXe1kY)k.

Using a large finite k to approximate the above is basis of the Suzuki-Trotter expansion, often used in numerical time evolution.

The Baker–Campbell–Hausdorff formula

In the other direction, if X and Y are sufficiently small (but not necessarily commuting) matrices, we have eXeY=eZ, where Z may be computed as a series in commutators of X and Y by means of the Baker–Campbell–Hausdorff formula: Z=X+Y+12[X,Y]+112[X,[X,Y]]−112[Y,[X,Y]]+⋯, where the remaining terms are all iterated commutators involving X and Y. If X and Y commute, then all the commutators are zero and we have simply Z = X + Y.

Inequalities for exponentials of Hermitian matrices

For Hermitian matrices there is a notable theorem related to the trace of matrix exponentials.

If A and B are Hermitian matrices, then tr⁡exp⁡(A+B)≤tr⁡[exp⁡(A)exp⁡(B)].

There is no requirement of commutativity. There are counterexamples to show that the Golden–Thompson inequality cannot be extended to three matrices – and, in any event, tr(exp(A)exp(B)exp(C)) is not guaranteed to be real for Hermitian A, B, C. However, Lieb proved that it can be generalized to three matrices if we modify the expression as follows tr⁡exp⁡(A+B+C)≤∫0∞dttr⁡[eA(e−B+t)−1eC(e−B+t)−1].

The exponential map

The exponential of a matrix is always an invertible matrix. The inverse matrix of eX is given by e−X. This is analogous to the fact that the exponential of a complex number is always nonzero. The matrix exponential then gives us a map exp⁡:Mn(ℂ)→GL(n,ℂ) from the space of all n × n matrices to the general linear group of degree n, i.e. the group of all n × n invertible matrices. In fact, this map is surjective which means that every invertible matrix can be written as the exponential of some other matrix (for this, it is essential to consider the field C of complex numbers and not R).

For any two matrices X and Y, ‖eX+Y−eX‖≤‖Y‖e‖X‖e‖Y‖,

where ‖ · ‖ denotes an arbitrary matrix norm. It follows that the exponential map is continuous and Lipschitz continuous on compact subsets of Mn(C).

The map t↦etX,t∈ℝ defines a smooth curve in the general linear group which passes through the identity element at t = 0.

In fact, this gives a one-parameter subgroup of the general linear group since etXesX=e(t+s)X.

The derivative of this curve (or tangent vector) at a point t is given by

The derivative at t = 0 is just the matrix X, which is to say that X generates this one-parameter subgroup.

More generally, for a generic t-dependent exponent, X(t), ddteX(t)=∫01eαX(t)dX(t)dte(1−α)X(t)dα .

Taking the above expression eX(t) outside the integral sign and expanding the integrand with the help of the Hadamard lemma one can obtain the following useful expression for the derivative of the matrix exponent, e−X(t)(ddteX(t))=ddtX(t)−12![X(t),ddtX(t)]+13![X(t),[X(t),ddtX(t)]]−⋯

The coefficients in the expression above are different from what appears in the exponential. For a closed form, see derivative of the exponential map.

Directional derivatives when restricted to Hermitian matrices

Let X be a n×n Hermitian matrix with distinct eigenvalues. Let X=Ediag(Λ)E∗ be its eigen-decomposition where E is a unitary matrix whose columns are the eigenvectors of X, E∗ is its conjugate transpose, and Λ=(λ1,…,λn) the vector of corresponding eigenvalues. Then, for any n×n Hermitian matrix V, the directional derivative of exp⁡:X→eX at X in the direction V is Dexp⁡(X)[V]≜limϵ→01ϵ(eX+ϵV−eX)=E(G⊙V¯)E∗ where V¯=E∗VE, the operator ⊙ denotes the Hadamard product, and, for all 1≤i,j≤n, the matrix G is defined as Gi,j={eλi−eλjλi−λj if i≠j,eλi otherwise. In addition, for any n×n Hermitian matrix U, the second directional derivative in directions U and V is D2exp⁡(X)[U,V]≜limϵu→0limϵv→014ϵuϵv(eX+ϵuU+ϵvV−eX−ϵuU+ϵvV−eX+ϵuU−ϵvV+eX−ϵuU−ϵvV)=EF(U,V)E∗ where the matrix-valued function F is defined, for all 1≤i,j≤n, as F(U,V)i,j=∑k=1nϕi,j,k(U¯ikV¯jk∗+V¯ikU¯jk∗) with ϕi,j,k={Gik−Gjkλi−λj if i≠j,Gii−Gikλi−λk if i=j and k≠i,Gii2 if i=j=k.

Computing the matrix exponential

Finding reliable and accurate methods to compute the matrix exponential is difficult, and this is still a topic of considerable current research in mathematics and numerical analysis. A key paper in the field indicates this difficulty in its title: "Nineteen Dubious Ways to Compute the Exponential of a Matrix". The paper was first published in 1978 and an updated version appeared 25 years later.

Matlab, GNU Octave, R, and SciPy all use the Padé approximant combined with the scaling and squaring method, described below.

Taylor series method

The matrix exponential can in theory be computed directly from the Taylor series definition, since the series always converges. However, in practice this is a very poor method for most matrices. If the entries of the matrix are small, then the series converges rapidly. But if they are not, convergence is slow and the series typically includes terms which are large. These terms should almost cancel, but computationally this cancellation is badly affected by roundoff error. This issue also arises in the scalar case: consider computing ⁠e−10⁠ using the Taylor series.

Padé approximation method

The Padé approximation method uses the quotient of two polynomials to approximate a function. For example, the (1,1) Padé approximation for the scalar exponential function is P1,1(x)=1+x/21−x/2, and this can be implemented for a matrix by replacing the 1 by the identity matrix and the division by a matrix inverse. The notation (1,1) indicates that the numerator and denominator are both polynomials of degree 1.

The Padé method has some advantages over the Taylor series method, but fails for the same reason when the matrix entries become large.

Scaling and squaring method

The scaling and squaring method is based on the simple identity eM=(eM/2)2. The algorithm works as follows. Given a matrix ⁠M⁠, calculate its matrix norm and then choose an integer ⁠n⁠ so that the norm of ⁠M/2n⁠ is small (below some chosen threshold). Then ⁠eM/2n⁠ can be accurately computed with a low-order Padé approximation. The final step is to apply the squaring identity given above ⁠n⁠ times to find ⁠eM⁠.

According to Moler and van Loan, the scaling and squaring method is one of the most effective methods known for the computation of the matrix exponential. Several choices need to be made in the implementation of the method. These include the choice of matrix norm used to assess the size of the matrix (MATLAB uses the infinity norm), the threshold down to which the norm is scaled, and the number of terms used in the Padé approximation (MATLAB uses a 6,6 Padé approximant, meaning that the numerator and denominator are both polynomials of degree 6).

Diagonalizable case

If a matrix is diagonal: A=[a10⋯00a2⋯0⋮⋮⋱⋮00⋯an], then its exponential can be obtained by exponentiating each entry on the main diagonal: eA=[ea10⋯00ea2⋯0⋮⋮⋱⋮00⋯ean].

This result allows one to exponentiate diagonalizable matrices. If

A = UDU−1

then

eA = UeDU−1,

which is especially easy to compute since D is diagonal.

For example, the matrix A=[1411] can be diagonalized as [−2211][−1003][−2211]−1.

Thus, eA=[−2211]e[−1003][−2211]−1=[−2211][1e00e3][−2211]−1=[e4+12ee4−1ee4−14ee4+12e].

Nilpotent case

A matrix N is nilpotent if Nq = 0 for some integer q. In this case, the matrix exponential eN can be computed directly from the series expansion, as the series terminates after a finite number of terms:

eN=I+N+12N2+16N3+⋯+1(q−1)!Nq−1 .

Since the series has a finite number of steps, it is a matrix polynomial, which can be computed efficiently.

General case

Using the Jordan–Chevalley decomposition

By the Jordan–Chevalley decomposition, any n×n matrix X with complex entries can be expressed as X=A+N where

  • A is diagonalizable
  • N is nilpotent
  • A commutes with N

This means that we can compute the exponential of X by reducing to the previous two cases: eX=eA+N=eAeN.

Note that we need the commutativity of A and N for the last step to work.

Using the Jordan canonical form

A closely related method is, if the field is algebraically closed, to work with the Jordan form of X. Suppose that X = PJP−1 where J is the Jordan form of X. Then eX=PeJP−1.

Also, since J=Ja1(λ1)⊕Ja2(λ2)⊕⋯⊕Jan(λn),eJ=exp⁡(Ja1(λ1)⊕Ja2(λ2)⊕⋯⊕Jan(λn))=exp⁡(Ja1(λ1))⊕exp⁡(Ja2(λ2))⊕⋯⊕exp⁡(Jan(λn)).

Therefore, we need only know how to compute the matrix exponential of a Jordan block. But each Jordan block is of the form Ja(λ)=λI+N⇒eJa(λ)=eλI+N=eλeN.

where N is a special nilpotent matrix. The matrix exponential of J is then given by eJ=eλ1eNa1⊕eλ2eNa2⊕⋯⊕eλneNan

Projection case

If P is a projection matrix (i.e. is idempotent: P2 = P), its matrix exponential is:

eP = I + (e − 1)P.

Deriving this by expansion of the exponential function, each power of P reduces to P which becomes a common factor of the sum: eP=∑k=0∞Pkk!=I+(∑k=1∞1k!)P=I+(e−1)P .

Rotation case

For a simple rotation in which the perpendicular unit vectors a and b specify a plane, the rotation matrix R can be expressed in terms of a similar exponential function involving a generator G and angle θ. G=𝐛𝐚𝖳−𝐚𝐛𝖳P=−G2=𝐚𝐚𝖳+𝐛𝐛𝖳P2=PPG=G=GP , R(θ)=eGθ=I+Gsin⁡(θ)+G2(1−cos⁡(θ))=I−P+Pcos⁡(θ)+Gsin⁡(θ) .

The formula for the exponential results from reducing the powers of G in the series expansion and identifying the respective series coefficients of G2 and G with −cos(θ) and sin(θ) respectively. The second expression here for eGθ is the same as the expression for R(θ) in the article containing the derivation of the generator, R(θ) = eGθ.

In two dimensions, if a=[10] and b=[01], then G=[0−110], G2=[−100−1], and R(θ)=[cos⁡(θ)−sin⁡(θ)sin⁡(θ)cos⁡(θ)]=Icos⁡(θ)+Gsin⁡(θ) reduces to the standard matrix for a plane rotation.

The matrix P = −G2 projects a vector onto the ab-plane and the rotation only affects this part of the vector. An example illustrating this is a rotation of 30° = π/6 in the plane spanned by a and b,

𝐚=[100]𝐛=15[012] G=15[0−1−2100200]P=−G2=15[500012024]P[123]=15[5816]=𝐚+85𝐛R(π6)=110[53−5−2558+3−4+2325−4+232+43]

Let N = I - P, so N2 = N and its products with P and G are zero. This will allow us to evaluate powers of R.

R(π6)=N+P32+G12R(π6)2=N+P12+G32R(π6)3=N+GR(π6)6=N−PR(π6)12=N+P=I

Evaluation by Laurent series

By virtue of the Cayley–Hamilton theorem the matrix exponential is expressible as a polynomial of order n−1.

If P and Qt are nonzero polynomials in one variable, such that P(A) = 0, and if the meromorphic function f(z)=etz−Qt(z)P(z) is entire, then etA=Qt(A). To prove this, multiply the first of the two above equalities by P(z) and replace z by A.

Such a polynomial Qt(z) can be found as follows−see Sylvester's formula. Letting a be a root of P, Qa,t(z) is solved from the product of P by the principal part of the Laurent series of f at a: It is proportional to the relevant Frobenius covariant. Then the sum St of the Qa,t, where a runs over all the roots of P, can be taken as a particular Qt. All the other Qt will be obtained by adding a multiple of P to St(z). In particular, St(z), the Lagrange-Sylvester polynomial, is the only Qt whose degree is less than that of P.

Example: Consider the case of an arbitrary 2 × 2 matrix, A:=[abcd].

The exponential matrix etA, by virtue of the Cayley–Hamilton theorem, must be of the form etA=s0(t)I+s1(t)A.

(For any complex number z and any C-algebra B, we denote again by z the product of z by the unit of B.)

Let α and β be the roots of the characteristic polynomial of A, P(z)=z2−(a+d) z+ad−bc=(z−α)(z−β) .

Then we have St(z)=eαtz−βα−β+eβtz−αβ−α , hence s0(t)=αeβt−βeαtα−β,s1(t)=eαt−eβtα−β

if α ≠ β; while, if α = β, St(z)=eαt(1+t(z−α)) ,

so that s0(t)=(1−αt)eαt,s1(t)=teαt .

Defining s≡α+β2=tr⁡A2 ,q≡α−β2=±−det⁡(A−sI),

we have s0(t)=est(cosh⁡(qt)−ssinh⁡(qt)q),s1(t)=estsinh⁡(qt)q,

where sin(qt)/q is 0 if t = 0, and t if q = 0.

Thus,

etA=est((cosh⁡(qt)−ssinh⁡(qt)q) I +sinh⁡(qt)qA) .

Thus, as indicated above, the matrix A having decomposed into the sum of two mutually commuting pieces, the traceful piece and the traceless piece, A=sI+(A−sI) ,

the matrix exponential reduces to a plain product of the exponentials of the two respective pieces. This is a formula often used in physics, as it amounts to the analog of Euler's formula for Pauli spin matrices, that is rotations of the doublet representation of the group SU(2).

The polynomial St can also be given the following "interpolation" characterization. Define et(z) ≡ etz, and n ≡ deg P. Then St(z) is the unique degree < n polynomial which satisfies St(k)(a) = et(k)(a) whenever k is less than the multiplicity of a as a root of P. We assume, as we obviously can, that P is the minimal polynomial of A. We further assume that A is a diagonalizable matrix. In particular, the roots of P are simple, and the "interpolation" characterization indicates that St is given by the Lagrange interpolation formula, so it is the Lagrange−Sylvester polynomial.

At the other extreme, if P = (z - a)n, then St=eat ∑k=0n−1 tkk! (z−a)k .

The simplest case not covered by the above observations is when P=(z−a)2(z−b) with a ≠ b, which yields St=eat z−ba−b (1+(t+1b−a)(z−a))+ebt (z−a)2(b−a)2.

Evaluation by implementation of Sylvester's formula

A practical, expedited computation of the above reduces to the following rapid steps. Recall from above that an n × n matrix exp(tA) amounts to a linear combination of the first n−1 powers of A by the Cayley–Hamilton theorem. For diagonalizable matrices, as illustrated above, e.g. in the 2 × 2 case, Sylvester's formula yields exp(tA) = Bα exp(tα) + Bβ exp(tβ), where the Bs are the Frobenius covariants of A.

It is easiest, however, to simply solve for these Bs directly, by evaluating this expression and its first derivative at t = 0, in terms of A and I, to find the same answer as above.

But this simple procedure also works for defective matrices, in a generalization due to Buchheim. This is illustrated here for a 4 × 4 example of a matrix which is not diagonalizable, and the Bs are not projection matrices.

Consider A=[11000110001−18001212] , with eigenvalues λ1 = 3/4 and λ2 = 1, each with a multiplicity of two.

Consider the exponential of each eigenvalue multiplied by t, exp(λit). Multiply each exponentiated eigenvalue by the corresponding undetermined coefficient matrix Bi. If the eigenvalues have an algebraic multiplicity greater than 1, then repeat the process, but now multiplying by an extra factor of t for each repetition, to ensure linear independence.

(If one eigenvalue had a multiplicity of three, then there would be the three terms: Bi1eλit, Bi2teλit, Bi3t2eλit. By contrast, when all eigenvalues are distinct, the Bs are just the Frobenius covariants, and solving for them as below just amounts to the inversion of the Vandermonde matrix of these 4 eigenvalues.)

Sum all such terms, here four such, eAt=B11eλ1t+B12teλ1t+B21eλ2t+B22teλ2t,eAt=B11e34t+B12te34t+B21e1t+B22te1t .

To solve for all of the unknown matrices B in terms of the first three powers of A and the identity, one needs four equations, the above one providing one such at t = 0. Further, differentiate it with respect to t, AeAt=34B11e34t+(34t+1)B12e34t+1B21e1t+(1t+1)B22e1t ,

and again, A2eAt=(34)2B11e34t+((34)2t+(34+1⋅34))B12e34t+B21e1t+(12t+(1+1⋅1))B22e1t=(34)2B11e34t+((34)2t+32)B12e34t+B21et+(t+2)B22et ,

and once more, A3eAt=(34)3B11e34t+((34)3t+((34)2+(32)⋅34))B12e34t+B21e1t+(13t+(1+2)⋅1)B22e1t=(34)3B11e34t+((34)3t+2716)B12e34t+B21et+(t+3⋅1)B22et .

(In the general case, n−1 derivatives need be taken.)

Setting t = 0 in these four equations, the four coefficient matrices Bs may now be solved for, I=B11+B21A=34B11+B12+B21+B22A2=(34)2B11+32B12+B21+2B22A3=(34)3B11+2716B12+B21+3B22 ,

to yield B11=128A3−366A2+288A−80IB12=16A3−44A2+40A−12IB21=−128A3+366A2−288A+80IB22=16A3−40A2+33A−9I .

Substituting with the value for A yields the coefficient matrices B11=[0048−1600−8200100001]B12=[004−200−1120014−180012−14]B21=[10−4816018−200000000]B22=[018−2000000000000]

so the final answer is etA=[ettet(8t−48)et+(4t+48)e34t(16−2t)et+(−2t−16)e34t0et8et+(−t−8)e34t−2et+t+42e34t00t+44e34t−t8e34t00t2e34t−t−44e34t .]

The procedure is much shorter than Putzer's algorithm sometimes utilized in such cases.

Illustrations

Suppose that we want to compute the exponential of B=[21176−5−1−64416].

Its Jordan form is J=P−1BP=[40001610016], where the matrix P is given by P=[−1425414−2−14040].

Let us first calculate exp(J). We have J=J1(4)⊕J2(16)

The exponential of a 1 × 1 matrix is just the exponential of the one entry of the matrix, so exp(J1(4)) = [e4]. The exponential of J2(16) can be calculated by the formula e(λI + N) = eλ eN mentioned above; this yields

exp⁡([161016])=e16exp⁡([0100])==e16([1001]+[0100]+12![0000]+⋯)=[e16e160e16].

Therefore, the exponential of the original matrix B is exp⁡(B)=Pexp⁡(J)P−1=P[e4000e16e1600e16]P−1=14[13e16−e413e16−5e42e16−2e4−9e16+e4−9e16+5e4−2e16+2e416e1616e164e16].

Applications

Linear differential equations

The matrix exponential has applications to systems of linear differential equations. (See also matrix differential equation.) Recall from earlier in this article that a homogeneous differential equation of the form 𝐲′=A𝐲 has solution eAt y(0).

If we consider the vector 𝐲(t)=[y1(t)⋮yn(t)] , we can express a system of inhomogeneous coupled linear differential equations as 𝐲′(t)=A𝐲(t)+𝐛(t). Making an ansatz to use an integrating factor of e−At and multiplying throughout, yields e−At𝐲′−e−AtA𝐲=e−At𝐛⇒e−At𝐲′−Ae−At𝐲=e−At𝐛⇒ddt(e−At𝐲)=e−At𝐛 .

The second step is possible due to the fact that, if AB = BA, then eAtB = BeAt. So, calculating eAt leads to the solution to the system, by simply integrating the third step with respect to t.

A solution to this can be obtained by integrating and multiplying by e𝐀t to eliminate the exponent in the LHS. Notice that while e𝐀t is a matrix, given that it is a matrix exponential, we can say that e𝐀te−𝐀t=I. In other words, exp⁡𝐀t=exp⁡(−𝐀t)−1.

Example (homogeneous)

Consider the system x′=2x−y+zy′=3y−1zz′=2x+y+3z .

The associated defective matrix is A=[2−1103−1213] .

The matrix exponential is etA=12[e2t(1+e2t−2t)−2te2te2t(−1+e2t)−e2t(−1+e2t−2t)2(t+1)e2t−e2t(−1+e2t)e2t(−1+e2t+2t)2te2te2t(1+e2t)] ,

so that the general solution of the homogeneous system is [xyz]=x(0)2[e2t(1+e2t−2t)−e2t(−1+e2t−2t)e2t(−1+e2t+2t)]+y(0)2[−2te2t2(t+1)e2t2te2t]+z(0)2[e2t(−1+e2t)−e2t(−1+e2t)e2t(1+e2t)] ,

amounting to 2x=x(0)e2t(1+e2t−2t)+y(0)(−2te2t)+z(0)e2t(−1+e2t)2y=x(0)(−e2t)(−1+e2t−2t)+y(0)2(t+1)e2t+z(0)(−e2t)(−1+e2t)2z=x(0)e2t(−1+e2t+2t)+y(0)2te2t+z(0)e2t(1+e2t) .

Example (inhomogeneous)

Consider now the inhomogeneous system x′=2x−y+z+e2ty′=3y−zz′=2x+y+3z+e2t .

We again have A=[2−1103−1213] ,

and 𝐛=e2t[101].

From before, we already have the general solution to the homogeneous equation. Since the sum of the homogeneous and particular solutions give the general solution to the inhomogeneous problem, we now only need find the particular solution.

We have, by above, 𝐲p=etA∫0te(−u)A[e2u0e2u]du+etA𝐜=etA∫0t[2eu−2ue2u−2ue2u0−2eu+2(u+1)e2u2(u+1)e2u02ue2u2ue2u2eu][e2u0e2u]du+etA𝐜=etA∫0t[e2u(2eu−2ue2u)e2u(−2eu+2(1+u)e2u)2e3u+2ue4u]du+etA𝐜=etA[−124e3t(3et(4t−1)−16)124e3t(3et(4t+4)−16)124e3t(3et(4t−1)−16)]+[2et−2te2t−2te2t0−2et+2(t+1)e2t2(t+1)e2t02te2t2te2t2et][c1c2c3] , which could be further simplified to get the requisite particular solution determined through variation of parameters. Note c = yp(0). For more rigor, see the following generalization.

Inhomogeneous case generalization: variation of parameters

For the inhomogeneous case, we can use integrating factors (a method akin to variation of parameters). We seek a particular solution of the form yp(t) = exp(tA) z(t), 𝐲p′(t)=(etA)′𝐳(t)+etA𝐳′(t)=AetA𝐳(t)+etA𝐳′(t)=A𝐲p(t)+etA𝐳′(t) .

For yp to be a solution, etA𝐳′(t)=𝐛(t)𝐳′(t)=(etA)−1𝐛(t)𝐳(t)=∫0te−uA𝐛(u)du+𝐜 .

Thus, 𝐲p(t)=etA∫0te−uA𝐛(u)du+etA𝐜=∫0te(t−u)A𝐛(u)du+etA𝐜 , where c is determined by the initial conditions of the problem.

More precisely, consider the equation Y′−A Y=F(t)

with the initial condition Y(t0) = Y0, where

  • A is an n by n complex matrix,
  • F is a continuous function from some open interval I to Cn,
  • t0 is a point of I, and
  • Y0 is a vector of Cn.

Left-multiplying the above displayed equality by e−tA yields Y(t)=e(t−t0)A Y0+∫t0te(t−x)A F(x) dx .

We claim that the solution to the equation P(d/dt) y=f(t)

with the initial conditions y(k)(t0)=yk for 0 ≤ k < n is y(t)=∑k=0n−1 yk sk(t−t0)+∫t0tsn−1(t−x) f(x) dx ,

where the notation is as follows:

  • P∈ℂ[X] is a monic polynomial of degree n > 0,
  • f is a continuous complex valued function defined on some open interval I,
  • t0 is a point of I,
  • yk is a complex number, and

sk(t) is the coefficient of Xk in the polynomial denoted by St∈ℂ[X] in Subsection Evaluation by Laurent series above.

To justify this claim, we transform our order n scalar equation into an order one vector equation by the usual reduction to a first order system. Our vector equation takes the form dYdt−A Y=F(t),Y(t0)=Y0, where A is the transpose companion matrix of P. We solve this equation as explained above, computing the matrix exponentials by the observation made in Subsection Evaluation by implementation of Sylvester's formula above.

In the case n = 2 we get the following statement. The solution to y″−(α+β) y′+αβ y=f(t),y(t0)=y0,y′(t0)=y1

is y(t)=y0 s0(t−t0)+y1 s1(t−t0)+∫t0ts1(t−x)f(x) dx,

where the functions s0 and s1 are as in Subsection Evaluation by Laurent series above.

See also