---
tag: 0XRB469Z32
kind: concept
name: Method of undetermined coefficients
msc: [34A30]
uses: [0A6PGTTP2A, 0QDXMG46QW, 0GHWEH6H15]
sources:
  - url: https://en.wikipedia.org/wiki/Method_of_undetermined_coefficients
    locator: Description of the method
same_as:
  wikidata: Q1036452
  wikipedia: Method of undetermined coefficients
---

## Summary

The method of undetermined coefficients finds a particular solution of a [[linear equation with constant coefficients|0A6PGTTP2A]] $L y = b(x)$ when $b$ has a special form.
The right side must be a sum of terms $x^k e^{\lambda x}$, $x^k e^{\lambda x} \cos(\omega x)$ and $x^k e^{\lambda x} \sin(\omega x)$.
For such a term, one tries a function of the same type, with a general polynomial of degree $k$ and unknown coefficients. If $\lambda$ (or $\lambda + i\omega$) is a root of multiplicity $s$ of the [[characteristic polynomial|0QDXMG46QW]], one multiplies the trial function by $x^s$.
Substitution into the equation gives linear equations for the unknown coefficients.

## Remarks

Example: for $y'' + y = x$, try $y_p = A x + B$. Then $A x + B = x$, so $y_p = x$.
Example with resonance: for $y'' + y = \cos x$, the number $i$ is a simple root of $r^2 + 1$. So try $y_p = x (A \cos x + B \sin x)$, which gives $y_p = \frac{1}{2} x \sin x$.
The method works because the derivatives of these functions stay in a finite-dimensional space. For other right sides, use [[variation of parameters|0Y6TH5PQVS]].

## Explanations

### L1 human

Guess that the answer looks like the right side, with unknown numbers in it.
Put the guess into the equation and match the coefficients.
If the guess already solves the homogeneous equation, multiply it by $x$.
