Mathematics
The Method of Undetermined Coefficients for Nonhomogeneous Differential Equations
Quick fact
The method of undetermined coefficients only 'guesses' a solution in the form of the forcing function, and if that guess appears in the homogeneous solution, you simply multiply it by x (the independent variable) to fix the overlap.
Why this is interesting
When a spring is driven by a rhythmic push, its motion is described by a differential equation with a forcing term. How can we predict the eventual steady oscillation?
Read the full explanation
Understanding The Method of Undetermined Coefficients for Nonhomogeneous Differential Equations
Think of a differential equation like a mechanical system: a mass on a spring with damping and an external force. The equation is y'' + p y' + q y = g(t). The left side represents the system's natural dynamics, while g(t) is the external push. The full solution is the sum of two parts: the homogeneous solution (what the system does on its own, with no push) and a particular solution (how it responds to the push). The method of undetermined coefficients assumes that the particular solution has the same 'shape' as the forcing function. For example, if g(t) is a polynomial, guess a polynomial of the same degree; if it's an exponential, guess a constant times that exponential; if it's a sine or cosine, guess a combination of sine and cosine. Then substitute the guess into the equation and solve for the unknown coefficients by matching terms.
A deeper explanation
Why does this work? For linear differential equations with constant coefficients, the derivative of a function like e^(rt), sin(ωt), or t^n is again a similar type of function. So by guessing a linear combination of such functions, the left side will produce the same family of functions, and we can equate coefficients to solve for the unknown constants. The pitfall is resonance: if the forcing function is itself a solution to the homogeneous equation (e.g., y'' + y = sin(t)), then the guess sin(t) would make the left side zero, giving no solution. The fix is to multiply the guess by t (or higher powers if needed) until it is no longer a solution of the homogeneous equation. This ensures we find a valid particular solution, and the method's power lies in turning a differential equation problem into a simple algebra problem.