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

classification: secondorder, 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. 
Recommended Books on Amazon (affiliate links)  

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.
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.
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.
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 \)
Final Answer 

\( 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 \) 
\( (r3)(r2) = 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 \) 
Final Answer
\( 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 \)
Final Answer 

\(\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)\)
video by MIT OCW 

Final Answer
\(\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 \)
Final Answer 

\(\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
video by MIT OCW 

Final Answer
\(\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 \)
Final Answer 

\(\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.
video by PatrickJMT 

video by PatrickJMT 

Final Answer
\(\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 \)
Final Answer 

\( y = Ae^{3x} + Be^{2x} + x/3 + 7/9 \)
Problem Statement
\( y''  5y' + 6y = 2x + 3 \)
Solution
video by Dr Chris Tisdell 

Final Answer
\( 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} \)
Final Answer 

\( y = Ae^{3x} + Be^{2x} + 2e^{5x} \)
Problem Statement
\( y''  5y' + 6y = 12e^{5x} \)
Solution
video by Dr Chris Tisdell 

Final Answer
\( 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\)
Final Answer 

\(\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
video by Krista King Math 

Final Answer
\(\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} \)
Final Answer 

\(\displaystyle{ y = c_1e^{4x} + c_2e^{x}  \frac{1}{2} e^{2x} }\)
Problem Statement
\( y''  3y'  4y = 3e^{2x} \)
Solution
video by Khan Academy 

Final Answer
\(\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} \)
Final Answer 

\( y = Ae^{3x} + Be^{2x}  10xe^{2x} \)
Problem Statement
\( y''  5y' + 6y = 10e^{2x} \)
Solution
video by Dr Chris Tisdell 

Final Answer
\( 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
video by The Lazy Engineer 

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} \)
Final Answer 

\(\displaystyle{ y = c_1 + c_2e^{2x} + 6x^2  6x  \frac{1}{2}xe^{2x} }\)
Problem Statement
\( y'' + 2y' = 24x + e^{2x} \)
Solution
video by Krista King Math 

Final Answer
\(\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) \)
Final Answer 

\(\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
video by Krista King Math 

Final Answer
\(\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} \)
Final Answer 

\( y(t) = c_1e^{4t} + c_2e^{3t} + 3te^{3t} \)
Problem Statement
\( y'' + 7y' + 12y = 3e^{3t} \)
Solution
video by MIP4U 

Final Answer
\( 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
video by The Lazy Engineer 

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) \)
Final Answer 

\(\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
video by Khan Academy 

Final Answer
\(\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 \)
Final Answer 

\(\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
video by Khan Academy 

Final Answer
\(\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. 

Advanced
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
video by The Lazy Engineer 

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

Really UNDERSTAND Differential Equations
Log in to rate this page and to see it's current rating.
external links you may find helpful 

To bookmark this page and practice problems, log in to your account or set up a free account.
Do you have a practice problem number but do not know on which page it is found? If so, enter the number below and click 'page' to go to the page on which it is found or click 'practice' to be taken to the practice problem.
 
I recently started a Patreon account to help defray the expenses associated with this site. To keep this site free, please consider supporting me. 

Support 17Calculus on Patreon 
next: variation of parameters → 



Practice Instructions
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.