Source

Adapted from my own handwritten and hand-typed notes from Year 1 to Year 3 of my EEE degree

Variation of parameters finds a particular solution of

for any continuous , including ones where undetermined coefficients cannot guess a form (like or ).

Idea

Start from of the homogeneous equation and let the constants vary:

Imposing the extra condition and substituting into the ODE gives the system

Formulas

Solving the system (Cramer's rule):

where is the Wronskian:

Note is the coefficient of : divide by it.

Method

  1. Solve the homogeneous equation and pick ,
  2. Identify and , and compute
  3. Compute and and integrate them (no constants needed)
  4. , and

Worked example

Solve .

Working:

  • , , so . Take ,
  • , ,
  • , so
  • , so

Which method to use

Method
polynomial, , , , sums and productsundetermined coefficients (usually faster)
anything else (, , , )variation of parameters