# The Method of Undetermined Coefficients

Author: John J Weber III, PhD Corresponding Textbook Sections:

• Section 4.4 – Nonhomogeneous Equations: The Method of Undetermined Coefficients
• Section 4.5 – The Superposition Principle and Undetermined Coefficients Revisited

## Expected Educational Results

• Objective 12–1: I can find particular solutions to nonhomogeneous equations.
• Objective 12–2: I can find general solutions to nonhomogeneous equations.
• Objective 12–2: I can solve higher-order nonhomogeneous IVPs.

## Method of Undetermined Coefficients

### Nonhomogeneous Linear Equations

#### Definition: Nonhomogeneous Linear Equations

$\displaystyle ay^{\,\prime\prime}+by^{\,\prime}+cy=f(t)$, $f(t)\ne 0$, $a\ne 0$.

#### Theorem: Superposition Principle

Let $y_1$ be a solution to $\displaystyle ay^{\,\prime\prime}+by^{\,\prime}+cy=f_1(t)$ and $y_2$ be a solution to $\displaystyle ay^{\,\prime\prime}+by^{\,\prime}+cy=f_2(t)$ Then for any constants $k_1$ and $k_2$, the function $k_1y_1+k_2y_2$ is a solution to the DE $\displaystyle ay^{\,\prime\prime}+by^{\,\prime}+cy=k_1f_1(t)+k_2f_2(t)$

#### Definition: Particular Solution

A solution to a nonhomogeneous DE is called the particular solution, $\displaystyle y_p(t)$.

Definition: General Solution

$\displaystyle y_g(t)=y_h(t)+y_p(t)$. $\displaystyle y(t)$ is an acceptable notation for the general solution.

### Method of Undetermined Coefficients – Procedure

NOTE: The terms in $y_p(t)$ must be linearly independent of the terms in $y_h(t)$. This method is valid only when $f(t)$ consists of polynomials, exponentials, sines, cosines, or sums and products of these functions.

1. Find the homogeneous solution, $y_h(t)$.

2. Let $P_m(t)$ be a polynomial of degree $m$, $Q_n(t)$ be a polynomial of degree $n$, $k=\text{max}(m,n)$.

3. $f(t)=P_m(t)e^{rt}$:

1. $r$ is not a root of the characteristic equation: $y_p(t)=(A_mt^m+\cdots+A_1t+A_0)e^{rt}$
2. $r$ is a root of the characteristic equation: $y_p(t)=t(A_mt^m+\cdots+A_1t+A_0)e^{rt}$
3. $r$ is a double root of the characteristic equation: $y_p(t)=t^2(A_mt^m+\cdots+A_1t+A_0)e^{rt}$
4. $f(t)=P_m(t)e^{\alpha t}\cos{(\beta t)}+Q_n(t)e^{\alpha t}\sin{(\beta t)}$, $\beta\ne 0$:

1. $\alpha\pm i\beta t$ is not a root of the characteristic equation: $y_p(t)=(A_kt^k+\cdots+A_1t+A_0)e^{\alpha t}\cos{(\beta t)}+(B_kt^k+\cdots+B_1t+B_0)e^{\alpha t}\sin{(\beta t)}$
2. $\alpha\pm i\beta t$ is a root of the characteristic equation: $y_p(t)=t(A_kt^k+\cdots+A_1t+A_0)e^{\alpha t}\cos{(\beta t)}+t(B_kt^k+\cdots+B_1t+B_0)e^{\alpha t}\sin{(\beta t)}$
5. Find coefficients by finding $y_p^{\,\prime}$, $y_p^{\,\prime\prime}$, etc. and substituting into the DE and solving for the coefficients.

6. Write the general solution, $y(t)=y_h(t)+y_p(t)$

#### Existence and Uniqueness

THeorem: Existence and Uniqueness of Nonhomogeneous DEs

For any real numbers $a\ne 0$, $b$, $c$, $t_0$, $Y_0$, and $Y_1$, suppose $y_p(t)$ is a particular solution to $\displaystyle ay^{\,\prime\prime}+by^{\,\prime}+cy=f(t)$ on some interval containing $y_0$ and suppose $y_1(t)$ and $y_2(t)$ are linearly independent solutions to the homogeneous equation in the interval, then there exists a unique solution in the interval to the IVP $\displaystyle ay^{\,\prime\prime}+by^{\,\prime}+cy=f(t)$, $\displaystyle y(t_0)=Y_0$, $\displaystyle y^{\,\prime}(t_0)=Y_1$.

#### Investigation 01

Suppose $y_h(t)$ is the homogeneous solution to $ay^{\,\prime\prime}+by^{\,\prime}+cy=f(t)$. Let $y_p(t)$ be the particular solution to the DE. Show $y(t)=y_h(t)+y_p(t)$ is the general solution to the DE.

#### Investigation 02

Suppose the following are roots, $r$, to the characteristic equation and $f(x)$ is the nonhomogeneous function to the ode. Find the general solution, $y_g(x)=y_h(x)+y_p(x)$.

1. $\displaystyle r=-2i,2i$, $\displaystyle f(x)=e^{2x}$
2. $\displaystyle r=0,-3,3$, $\displaystyle f(x)=e^{3x}$
3. $\displaystyle r=1,1,1,3$, $\displaystyle f(x)=e^{x}$
4. $\displaystyle r=0,0,-2i,2i$, $\displaystyle f(x)=x+\sin{(x)}$
5. $\displaystyle r=1,2,1-2i,1+2i$, $\displaystyle f(x)=x^2-3x+2$
6. $\displaystyle r=1-2i,1+2i,1-2i,1+2i$, $\displaystyle f(x)=xe^{x}\cos{(2x)}$
7. $\displaystyle r=-1,2,-3i,3i$, $\displaystyle f(x)=x^2-e^{2x}+\cos{(x)}-e^x\sin{(2x)}$
8. $\displaystyle r=\frac{3-2i}{2},\frac{3+2i}{2}$, $\displaystyle f(x)=e^{3x}\sin{(2x)}$
9. $\displaystyle r=0,3,1-5i,1+5i$, $\displaystyle f(x)=x+x^2e^{x}\sin{(5x)}$

#### Investigation 03

Solve the following DEs:

1. $\displaystyle y^{\,\prime\prime}-6y^{\,\prime}+8y=3e^{2x}$
2. $\displaystyle y^{\,\prime\prime}-6y^{\,\prime}+9y=5xe^{3x}$
3. $\displaystyle y^{\,\prime\prime}-2y^{\,\prime}-3y=3x^2+4x-5$
4. $\displaystyle y^{\,\prime\prime}+y=\sin{(x)}$
5. $\displaystyle y^{\,\prime\prime}+4y=5\cos{(3x)}$
6. $\displaystyle y^{\,\prime\prime}-2y^{\,\prime}-3y=e^{2x}+3x^2+4x-5+5\cos{(2x)}$
7. $\displaystyle y^{\,\prime\prime}-8y^{\,\prime}+12y=x^2e^{6x}-7x\sin{(2x)}+4$
8. $\displaystyle y^{\,\prime\prime}+2y^{\,\prime}-3y=2e^x-10\sin{(x)}$
9. $\displaystyle y^{\,\prime\prime\prime}-y^{\,\prime}=4e^{-x}+3e^{2x}$
10. $\displaystyle y^{\,\prime\prime\prime\prime}-11y^{\,\prime\prime\prime}+31y^{\,\prime\prime}-61y^{\,\prime}+40y=x^3e^{2x}$
11. $\displaystyle y^{\,(4)}(t)-2y^{\,\prime\prime\prime}(t)+y^{\,\prime\prime}(t)-12y^{\,\prime}(t)+20y(t)=te^t+t^2-3e^{t}\cos{(2t)}$
12. $\displaystyle y^{\,(5)}(t)-y^{\,(4)}(t)-y^{\,\prime\prime\prime}(t)-y^{\,\prime\prime}(t)-2y^{\,\prime}(t)=t\sin{(t)}+e^{2t}+t$