## 17Calculus Differential Equations - Undetermined Coefficients

##### 17Calculus

General Form: $$y'' + p(t)y' + q(t)y = g(t)$$

classification: second-order, linear, constant coefficients, inhomogeneous → $$g(t) \neq 0$$

The idea of this technique is to use $$g(t)$$ to guess what the form of the solution looks like.

For certain functions, the solutions will look a lot like the given $$g(t)$$. However, this works only for certain standard forms of $$g(t)$$. This technique for handling second order inhomogeneous linear differential equations is great when $$g(t)$$ is in a standard form. Here is a list of some of the standard forms that this technique will work with.

 1. polynomials (including constants) 2. exponentials in the form $$e^{at}$$ 3. trig functions $$\sin(bt)$$ and $$\cos(ct)$$

If $$g(t)$$ is not one of the standard forms above, the method of variation of parameters, which is a bit more involved, needs to be used.

General Inhomogeneous Solutions

The general solution to an inhomogeneous differential equation is made up of two parts, the homogeneous solution plus what many mathematicians call the particular solution. The idea is that you can add zero to anything you don't change the problem. So, you can look at the differential equation
$$\displaystyle{ y'' + p(t)y' + q(t)y = g(t) = 0 + g(t) }$$
So we find the homogeneous solution, $$y_H(t)$$ which solves $$y'' + p(t)y' + q(t)y = 0$$ and add it to the inhomogeneous solution or particular solution $$y_P(t)$$ which solves $$y'' + p(t)y' + q(t)y = g(t)$$ to get the general solution $$y(t) = y_H(t) + y_P(t)$$.

Before we start discussing how to get solutions to inhomogeneous equations using undetermined coefficients, let's watch a video talking about inhomogeneous equations in general.

### MIT OCW - solutions

video by MIT OCW

Method of Undetermined Coefficients

The discussion on this page assumes you know how to get the homogeneous solution or it is given to you. We will work to get the inhomogeneous solution. You need to know what the homogeneous solution is first before using this technique. The reason is that sometimes you will need to adjust your 'guess' based on the form of the homogeneous solution.

Let's start out with a video. This video explains very well, this idea of a general solution built from the homogeneous and particular solutions, as well as the method of undetermined coefficients. It is a bit longer than others you will find on this site but this one is especially worth taking the time to watch. He does several related examples that build on one another and will help you understand what to do. At the very end, he also explains why this technique works. So this is one video you don\'t want to skip.

### Dr Chris Tisdell - general solution

video by Dr Chris Tisdell

If you want another quick overview of this method, here is a quick video clip that might help cement this technique in your mind.

### PatrickJMT - quick overview [1mins-33secs]

video by PatrickJMT

Okay, let's look at each of the standard forms individually and see what your initial 'guesses' look like, as well as variations that are required to avoid duplication with the homogeneous solution. In the following tables, we are talking about the roots to the characteristic polynomial that you used to find the homogeneous solution.

Standard Form 1 - - Polynomials

$$g(t) = a_2t^2 + a_1t + a_0$$

basic form

$$y_P = At^2+Bt+C$$

variations

$$r=0$$ is a single root

$$y_P = ( At^2+Bt+C)t$$

$$r=0$$ is a double root

$$y_P = ( At^2+Bt+C)t^2$$

Note - - In the table above, we showed a second order polynomial. In general, your basic form polynomial needs to be of the same order as your $$g(t)$$ polynomial. For example, if $$g(t) = t^4$$, your basic polynomial is $$y_P = At^4 + Bt^3 + Ct^2 + Dt + E$$, then you would adjust based on the roots to the homogeneous solution, if necessary.

Standard Form 2 - - Exponentials

$$g(t) = e^{ct}$$

basic form

$$y_P = Ae^{ct}$$

variations

$$r=c$$ is a single root

$$y_P = Ate^{ct}$$

$$r=c$$ is a double root

$$y_P = At^2e^{ct}$$

Standard Form 3 - - Trig Functions

$$g(t) = a_0\sin(kt)$$ or $$g(t) = a_0\cos(kt)$$ or both

basic form

$$y_P = A\sin(kt)+B\cos(kt)$$

In each case, the function that you build based on $$g(t)$$ must be different than any factor in the homogeneous solution, i.e. it must not be a constant multiple of any other factor. You may need to multiply by $$t$$ or $$t^2$$ to accomplish this, but, as you saw in the first video above, doing so will resolve any conflicts.

After working some practice problems, you will be ready for the next topic, variation of parameters, which is a technique that handles a larger range of problems when $$g(t)$$ is not one of the above standard forms.

Practice

Unless otherwise instructed, find the general solution to each differential equation using the method of undetermined coefficients. If initial conditions are given, find the particular solution also. Give your answers in exact terms and completely factored.

Basic

$$y'' - 5y' + 6y = 4e^t$$

Problem Statement

$$y'' - 5y' + 6y = 4e^t$$

$$y(t) = 2e^t + c_1e^{2t} + c_2e^{3t}$$

Problem Statement

$$y'' - 5y' + 6y = 4e^t$$

Solution

First, we solve the homogeneous equation $$y'' - 5y' + 6y = 0$$

 The characteristic equation is $$r^2 - 5r + 6 = 0$$ $$(r-3)(r-2) = 0$$ So our homogeneous solution is $$y_H(t) = c_1e^{2t} + c_2e^{3t}$$

Now we will assume our particular solution is of the form $$y_p = Ae^t$$.

 $$y_p(t) = Ae^t$$ $$y'_p(t) = Ae^t$$ $$y''_p(t) = Ae^t$$ $$Ae^t - 5Ae^t + 6Ae^t = 4e^t$$ $$2Ae^t = 4e^t$$ $$A = 2$$

$$y(t) = 2e^t + c_1e^{2t} + c_2e^{3t}$$

Log in to rate this practice problem and to see it's current rating.

$$\dot{x} + 3x = t^2 + t$$

Problem Statement

$$\dot{x} + 3x = t^2 + t$$

$$\displaystyle{ x(t) = Ae^{-3t} + \frac{1}{3}t^2 + \frac{1}{9}t - \frac{1}{27} }$$

Problem Statement

$$\dot{x} + 3x = t^2 + t$$

Solution

In the video, he does not determine the homogeneous solution, which is recommended on this website and by most instructors. Here are the steps to do that.

$$\dot{x} + 3x$$ tells us that our characteristic equation is $$r + 3 = 0 \to r = -3$$. So our homogeneous solution is $$\displaystyle{x_H(t) = Ae^{-3t} }$$

He determines the particular solution. So the final solution is $$x(t) = x_H(t) + x_P(t)$$

### MIT OCW - 610 video solution

video by MIT OCW

$$\displaystyle{ x(t) = Ae^{-3t} + \frac{1}{3}t^2 + \frac{1}{9}t - \frac{1}{27} }$$

Log in to rate this practice problem and to see it's current rating.

$$\ddot{x} + \dot{x} = t^4$$

Problem Statement

$$\ddot{x} + \dot{x} = t^4$$

$$\displaystyle{ x(t) = A + Be^{-t} + \frac{1}{5}t^5 - t^4 + 4t^3 - 12t^2 + 12t }$$

Problem Statement

$$\ddot{x} + \dot{x} = t^4$$

Solution

### MIT OCW - 611 video solution

video by MIT OCW

$$\displaystyle{ x(t) = A + Be^{-t} + \frac{1}{5}t^5 - t^4 + 4t^3 - 12t^2 + 12t }$$

Log in to rate this practice problem and to see it's current rating.

$$y'' + 3y' + 2y = x^2$$

Problem Statement

$$y'' + 3y' + 2y = x^2$$

$$\displaystyle{ y(x) = c_1 e^{-x} + c_2e^{-2x} + \frac{1}{2}x^2 - \frac{3}{2}x + \frac{7}{4} }$$

Problem Statement

$$y'' + 3y' + 2y = x^2$$

Solution

The solution to this problem appears in two videos. The first video solves for the homogeneous solution. The second video uses the undetermined coefficient technique to finish the problem.

### PatrickJMT - 612 video solution

video by PatrickJMT

### PatrickJMT - 612 video solution

video by PatrickJMT

$$\displaystyle{ y(x) = c_1 e^{-x} + c_2e^{-2x} + \frac{1}{2}x^2 - \frac{3}{2}x + \frac{7}{4} }$$

Log in to rate this practice problem and to see it's current rating.

$$y'' - 5y' + 6y = 2x + 3$$

Problem Statement

$$y'' - 5y' + 6y = 2x + 3$$

$$y = Ae^{3x} + Be^{2x} + x/3 + 7/9$$

Problem Statement

$$y'' - 5y' + 6y = 2x + 3$$

Solution

### Dr Chris Tisdell - 613 video solution

video by Dr Chris Tisdell

$$y = Ae^{3x} + Be^{2x} + x/3 + 7/9$$

Log in to rate this practice problem and to see it's current rating.

$$y'' - 5y' + 6y = 12e^{5x}$$

Problem Statement

$$y'' - 5y' + 6y = 12e^{5x}$$

$$y = Ae^{3x} + Be^{2x} + 2e^{5x}$$

Problem Statement

$$y'' - 5y' + 6y = 12e^{5x}$$

Solution

### Dr Chris Tisdell - 614 video solution

video by Dr Chris Tisdell

$$y = Ae^{3x} + Be^{2x} + 2e^{5x}$$

Log in to rate this practice problem and to see it's current rating.

$$y'' + 3y' - 4y = 2e^x; y(0)=1, y'(0)=2$$

Problem Statement

$$y'' + 3y' - 4y = 2e^x; y(0)=1, y'(0)=2$$

$$\displaystyle{ y(x) = \frac{-3}{25}e^{-4x} + \frac{28}{25}e^x + \frac{2}{5}xe^x }$$

Problem Statement

$$y'' + 3y' - 4y = 2e^x; y(0)=1, y'(0)=2$$

Solution

### Krista King Math - 624 video solution

video by Krista King Math

$$\displaystyle{ y(x) = \frac{-3}{25}e^{-4x} + \frac{28}{25}e^x + \frac{2}{5}xe^x }$$

Log in to rate this practice problem and to see it's current rating.

$$y'' - 3y' - 4y = 3e^{2x}$$

Problem Statement

$$y'' - 3y' - 4y = 3e^{2x}$$

$$\displaystyle{ y = c_1e^{4x} + c_2e^{-x} - \frac{1}{2} e^{2x} }$$

Problem Statement

$$y'' - 3y' - 4y = 3e^{2x}$$

Solution

### Khan Academy - 616 video solution

video by Khan Academy

$$\displaystyle{ y = c_1e^{4x} + c_2e^{-x} - \frac{1}{2} e^{2x} }$$

Log in to rate this practice problem and to see it's current rating.

Intermediate

$$y'' - 5y' + 6y = 10e^{2x}$$

Problem Statement

$$y'' - 5y' + 6y = 10e^{2x}$$

$$y = Ae^{3x} + Be^{2x} - 10xe^{2x}$$

Problem Statement

$$y'' - 5y' + 6y = 10e^{2x}$$

Solution

### Dr Chris Tisdell - 615 video solution

video by Dr Chris Tisdell

$$y = Ae^{3x} + Be^{2x} - 10xe^{2x}$$

Log in to rate this practice problem and to see it's current rating.

$$y'' + y' - 2y = 3e^{-2t}$$

Problem Statement

Calculate $$y(t) = y_p + y_h$$ of $$y'' + y' - 2y = 3e^{-2t}$$ using undetermined coefficients.

Solution

### The Lazy Engineer - 2208 video solution

Log in to rate this practice problem and to see it's current rating.

$$y'' + 2y' = 24x + e^{-2x}$$

Problem Statement

$$y'' + 2y' = 24x + e^{-2x}$$

$$\displaystyle{ y = c_1 + c_2e^{-2x} + 6x^2 - 6x - \frac{1}{2}xe^{-2x} }$$

Problem Statement

$$y'' + 2y' = 24x + e^{-2x}$$

Solution

### Krista King Math - 622 video solution

video by Krista King Math

$$\displaystyle{ y = c_1 + c_2e^{-2x} + 6x^2 - 6x - \frac{1}{2}xe^{-2x} }$$

Log in to rate this practice problem and to see it's current rating.

$$y'' + 4y' + 4y = 130\cos(3x)$$

Problem Statement

$$y'' + 4y' + 4y = 130\cos(3x)$$

$$\displaystyle{ y(x) = e^{-2x}(c_1+c_2x) - \frac{50}{13}\cos(3x) + \frac{120}{13}\sin(3x) }$$

Problem Statement

$$y'' + 4y' + 4y = 130\cos(3x)$$

Solution

### Krista King Math - 623 video solution

video by Krista King Math

$$\displaystyle{ y(x) = e^{-2x}(c_1+c_2x) - \frac{50}{13}\cos(3x) + \frac{120}{13}\sin(3x) }$$

Log in to rate this practice problem and to see it's current rating.

$$y'' + 7y' + 12y = 3e^{-3t}$$

Problem Statement

$$y'' + 7y' + 12y = 3e^{-3t}$$

$$y(t) = c_1e^{-4t} + c_2e^{-3t} + 3te^{-3t}$$

Problem Statement

$$y'' + 7y' + 12y = 3e^{-3t}$$

Solution

### MIP4U - 2080 video solution

video by MIP4U

$$y(t) = c_1e^{-4t} + c_2e^{-3t} + 3te^{-3t}$$

Log in to rate this practice problem and to see it's current rating.

$$2y'' - y' - y = t^2+2t+5$$

Problem Statement

$$2y'' - y' - y = t^2+2t+5$$

Solution

### The Lazy Engineer - 2212 video solution

Log in to rate this practice problem and to see it's current rating.

$$y'' - 3y' - 4y = 2\sin(x)$$

Problem Statement

$$y'' - 3y' - 4y = 2\sin(x)$$

$$\displaystyle{ y = c_1e^{4x} + c_2e^{-x} - \frac{5}{17}\sin(x) + \frac{3}{17}\cos(x) }$$

Problem Statement

$$y'' - 3y' - 4y = 2\sin(x)$$

Solution

### Khan Academy - 617 video solution

video by Khan Academy

$$\displaystyle{ y = c_1e^{4x} + c_2e^{-x} - \frac{5}{17}\sin(x) + \frac{3}{17}\cos(x) }$$

Log in to rate this practice problem and to see it's current rating.

$$y'' - 3y' - 4y = 4x^2$$

Problem Statement

$$y'' - 3y' - 4y = 4x^2$$

$$\displaystyle{ y = c_1e^{4x} + c_2e^{-x} - x^2 + \frac{3}{2}x - \frac{13}{8} }$$

Problem Statement

$$y'' - 3y' - 4y = 4x^2$$

Solution

### Khan Academy - 618 video solution

video by Khan Academy

$$\displaystyle{ y = c_1e^{4x} + c_2e^{-x} - x^2 + \frac{3}{2}x - \frac{13}{8} }$$

Log in to rate this practice problem and to see it's current rating.

Calculate $$y_p$$ of $$\displaystyle{ \frac{1}{2}y'' - y' + y = t\cos(t) }$$.

Problem Statement

Calculate $$y_p$$ of $$\displaystyle{ \frac{1}{2}y'' - y' + y = t\cos(t) }$$.

Solution

### The Lazy Engineer - 2204 video solution

Log in to rate this practice problem and to see it's current rating.

When using the material on this site, check with your instructor to see what they require. Their requirements come first, so make sure your notation and work follow their specifications.

DISCLAIMER - 17Calculus owners and contributors are not responsible for how the material, videos, practice problems, exams, links or anything on this site are used or how they affect the grades or projects of any individual or organization. We have worked, to the best of our ability, to ensure accurate and correct information on each page and solutions to practice problems and exams. However, we do not guarantee 100% accuracy. It is each individual's responsibility to verify correctness and to determine what different instructors and organizations expect. How each person chooses to use the material on this site is up to that person as well as the responsibility for how it impacts grades, projects and understanding of calculus, math or any other subject. In short, use this site wisely by questioning and verifying everything. If you see something that is incorrect, contact us right away so that we can correct it.

Links and banners on this page are affiliate links. We carefully choose only the affiliates that we think will help you learn. Clicking on them and making purchases help you support 17Calculus at no extra charge to you. However, only you can decide what will actually help you learn. So think carefully about what you need and purchase only what you think will help you.

We use cookies on this site to enhance your learning experience.