where is a given function. By superposition, the general solution is
where is the general solution of the homogeneous system and is one particular solution of the full system. (The homogeneous part is a vector space, see solution space of an ODE.)
Let be linearly independent solutions of , collected as columns in the fundamental matrix
It satisfies and, by construction, .
Theorem
Let be a fundamental matrix of the homogeneous system . Then a particular solution of the non-homogeneous system is given by
Proof
Guess a particular solution with the shape of a homogeneous one, but let the constants vary with :
Observe that
The homogeneous part of the ansatz cancels, exactly because was built out of solutions of . What survives is , and the requirement becomes the ordinary system
Putting back gives the formula.
Remark
For
set , so that with the companion matrix and . Then is exactly the Wronskian of the homogeneous basis , and the method is the "variation of parameters" of the scalar literature.