# What is the intuition behind the method of undetermined coefficients?

Our teacher has recently begun teaching second-order differential equations and the methods used for solving them.

The method which we are taught to solve linear differential equations is currently the method of undetermined coefficients. I would like to know if there is a reason as to why the method works. My chief question is about why we're able to just "step-up" our guesses by an x term (i.e. if $$e^{ax}$$ does not work we're simply able to amend our guess to $$xe^{ax}$$ Secondly, why is it that when doing so the terms in between seem to nicely cancel out? An example is the differential equation in one of our tutorials $$\frac{d^2y}{dx^2}-6\frac{dy}{dx}+9y=e^{3x}$$

As the solution to the characteristic polynomial has repeated roots 3, I understand why guesses of the form $$Ae^3x$$ $$Axe^3x$$ fail to work (because they get "absorbed" into the general solution of the complementary solution) and as a result why my "guess" has to be $$Ax^2e^{3x}$$ but I do not understand why when plugging in the solved integrals that somehow I get this mess of an equation $$A(9x^2e^{3x}+12xe^{3x}+2e^{3x}-18x^2e^{3x}-12xe^{3x}+9x^2e^{3x})=e^{3x}$$ that somehow resolves nicely to $$A(2e^{3x})=e^{3x}$$

Thank you for taking the time to read this.

• Do you understand why the fundamental solutions of the homogeneous equation $y''-6y'+9y=0$, with characteristic equation $(r-3)^2=0$, are $y=e^{x}$ and $y=xe^{3x}$, or is that also a mystery?
– bof
Nov 18 '18 at 11:10
• I understand why they they are valid solutions and the intuition behind the characteristic polynomial and the idea of the solution set coming from the fact that differentiation is a linear operation but I don't really understand why those are the only "unique" solutions, if that is what you mean by fundamental solution. Nov 18 '18 at 12:16

Let's consider your example $$L[y]=y''-6y'+9y=e^{kx}$$ In operator notation $$D^2y-6Dy+9y=e^{kx}$$ $$(D^2-6D+9)y=e^{kx}$$ $$(D-3)(D-3)y=e^{kx}\tag1$$ What makes the "undetermined coefficients" method work here is the fact that $$y=e^{kx}$$ is a solution of the homogeneous linear equation $$(D-k)y=0$$. Therefore, multiplying the equation by $$D-k$$ will "annihilate" the input $$e^{3x}$$ and turn our nonhomogeneous second order equation into a homogeneous third order equation. (This is called the annihilator method.) $$(D-k)(D-3)(D-3)y=0\tag2$$ Assuming $$k\ne3$$, the general solution of the homogeneous equation $$(2)$$ is $$y=Ae^{kx}+(Bx+C)e^{3x}$$ where $$A,B,C$$ are arbitrary constants. However, not all solutions of $$(2)$$ are solutions of $$(1)$$; multiplying by $$D-k$$ introduced extraneous solutions; so we have to plug $$(3)$$ back into the original equation $$(1)$$ to see which values of the constants solve the original problem. $$L[Ae^{kx}+(Bx+C)e^{3x}]=e^{kx}$$ $$L[Ae^{kx}]+L[(Bx+C)e^{3x}]=e^{kx}$$ But we know that $$L[(Bx+C)e^{3x}]=0$$, because $$y=(Bx+C)e^{3x}$$ is the general solution of the homogeneous equation $$L[y]=0$$. Therefore $$B$$ and $$C$$ are arbitrary, and we have to determine $$A$$ by solving $$L[Ae^{kx}]=e^{kx}$$ In other words, the nonhomogeneous equation $$(1)$$ has a particular solution of the form $$y=Ae^{kx}$$.

That's assuming $$k\ne3$$. On the other hand, if $$k=3$$, then the general solution of $$(2)$$ is $$y=Ax^2e^{3x}+(Bx+C)e^{3x}$$ and in this case the particular soution takes the form $$y=Ax^2e^{3x}$$.

• This seems really interesting! I've never seen operator notation before, nor have I heard of the annhilator method. If you don't mind explaining, I'm a bit confused as to why it is possible to treat the operators as like "variables" and to "factorise" them? Do you have a recommendation for sources to read up on this concept? Nov 18 '18 at 14:42
• @Conrad See also this answer where I also explain it for both differential and differences equations. The key idea for the homogeneous equation is that we can factor the ("characteristic") operator polynomial into factors that commute (being constant coefficient), which allows us to decompose the solution space of the product into the sum of the solution spaces of each factor. Nov 18 '18 at 15:52
• @Bill Dubuque Thank you so much for referring me to your answer. It's actually given me more of an insight into the whole process of using characteristic polynomials and answered themany questions that I had when my teacher was going through recurrence relation but never found the time to ask. Suffice to say, it's a very enlightening answer! Nov 19 '18 at 23:47
• @Conrad Glad it was helpful. This is one of many topics that lie in-between elementary and advanced so often is not covered will in courses. Nov 19 '18 at 23:52

You can think of infinitely differentiable functions $$f:\mathbb{R}\rightarrow \mathbb{R}$$ as a vector space. It is definitely an infinite dimensional vector space. It has lots of finite dimensional subspaces, like the solution space to a homogeneous linear differential equation with constant coefficients. Call a function $$f$$ {\bf finite type} if the subspace $$V$$ that comes from taking linear combinations of all order derivatives of $$f$$ is finite dimensional. For instance, polynomials are finite type, the sine and cosine, $$e^{ax}$$ and their products are finite type. The method of undetermined coefficients works for solving linear constant coefficient differential equations where the function on the right hand side is of finite type.

The left hand side of the differential equation $$D:=\frac{d^2}{dx^2}+b\frac{d}{dx}+c$$ should be thought of as a linear map from the vector space of infinitely differentiable functions to itself. Let $$V$$ be the vector space spanned by all derivatives of $$f$$. By definition, the restriction of $$D$$ to $$V$$ maps $$V$$ into itself. Hence if $$D:V\rightarrow V$$ is onto, you can definitely solve the equation $$Dg=f$$ with some $$g\in V$$, you just choose $$g$$ in the inverse image of $$f$$. If $$D:V\rightarrow V$$ isn’t onto, then since a linear map from a finite dimensional vector space to itself is onto if and only if it is one-to-one, that means that $$V$$ has nontrivial intersection with the solution space of $$Dg=0$$. So, let $$W=\{x^sg|g\in V\}$$. This is a new vector space of the same dimension as $$V$$, and it has smaller intersection with the solution space of $$D$$.

If you choose too high a power $$s$$, $$D$$ will not map $$W$$ into $$V$$, but if you choose the smallest $$s$$ so that the intersection of $$W$$ with the solution space of $$D$$ is $$\{0\}$$, then $$D:W\rightarrow V$$ is onto, and there is a unique $$g\in W$$ with $$Dg=f$$.

• Thank you for your answer. It seems I have to read up more on the topics you used to explain this concept before revisiting this. Nov 18 '18 at 14:37
• I finally have an understanding of the concepts you used to explain this. This was a very informative answer, thank you. May 26 '19 at 2:29