PAGE 1

3.5 Nonhomogeneous Eqs.: Undetermined Coefficients

\[ ay'' + by' + cy = f(t) \]

If \( f(t) = 0 \) (homogeneous) then \( y = c_1 y_1 + c_2 y_2 \)

eg. is linear, so principle of superposition applies

\[ y = c_1 y_1 + c_2 y_2 + Y(t) \]

if the eq. were homogeneous (\( f(t) = 0 \))

"complementary solution"

due to the nonhomogeneous part (\( f(t) \))

"particular solution"

To find \( Y(t) \), one method is undetermined coefficients

Basic idea: \( Y(t) \) resembles \( f(t) \)

  • if \( f(t) \) is polynomial, so is \( Y(t) \)
  • if \( f(t) \) is exponential, so is \( Y(t) \)
  • if \( f(t) \) is cosine or sine, so is \( Y(t) \)
PAGE 2

Example

\[ y'' - y' - 2y = -2t + 4t^2 \]

Find complementary solution: solve \( y'' - y' - 2y = 0 \)

\[ r^2 - r - 2 = 0 \]

\[ (r - 2)(r + 1) = 0 \]

\[ r = -1, \quad r = 2 \]

\[ y_c = c_1 e^{-t} + c_2 e^{2t} \]

\[ y(t) = c_1 e^{-t} + c_2 e^{2t} + Y(t) \]

\( Y(t) \) will look like \( f(t) \)

\( f(t) = 4t^2 - 2t \rightarrow \) 2nd-order polynomial

copy the form for \( Y(t) \)

\[ Y(t) = At^2 + Bt + C \]

undetermined coefficients: \( A, B, C \)

\( Y(t) \) is a solution of \( y'' - y' - 2y = -2t + 4t^2 \)

so it must satisfy the diff. eq.

PAGE 3

Solving the Differential Equation by Substitution

Plug \( Y \) into diff. eq. in place of \( y \)

\[ \begin{cases} Y = At^2 + Bt + C \\ Y' = 2At + B \\ Y'' = 2A \end{cases} \]\[ y'' - y' - 2y = -2t + 4t^2 \]
\[ 2A - (2At + B) - 2(At^2 + Bt + C) = -2t + 4t^2 \]\[ 2A - 2At - B - 2At^2 - 2Bt - 2C = -2t + 4t^2 \]\[ -2At^2 + (-2A - 2B)t + (2A - B - 2C) = 4t^2 - 2t + 0 \]

Solving for Coefficients

\[ \begin{aligned} -2A = 4 &\implies A = -2 \\ -2A - 2B = -2 &\implies B = 3 \\ 2A - B - 2C = 0 &\implies C = -7/2 \end{aligned} \]

So the solution is

\[ y(t) = c_1 e^{-t} + c_2 e^{2t} - 2t^2 + 3t - \frac{7}{2} \]

complementary

affected by initial conditions

particular

affected by \( f(t) \) only

PAGE 4

Example: Method of Undetermined Coefficients

\[ y'' - y' - 2y = 10e^t \]

Same left side, so \( y_c = c_1 e^{-t} + c_2 e^{2t} \)

\( Y(t) \) matches form of \( f(t) = 10e^t \)

\[ \begin{cases} Y(t) = Ae^t \\ Y'(t) = Ae^t \\ Y''(t) = Ae^t \end{cases} \]

into diff. eq.

\[ Ae^t - Ae^t - 2Ae^t = 10e^t \]\[ -2A = 10 \implies A = -5 \]

solution:

\[ y = c_1 e^{-t} + c_2 e^{2t} - 5e^t \]

Superposition Principle

what about \( y'' - y' - 2y = -2t + 4t^2 + 10e^t \)?

\[ y = c_1 e^{-t} + c_2 e^{2t} + (-2t^2 + 3t - \frac{7}{2}) - 5e^t \]

from \( -2t + 4t^2 \)

from \( 10e^t \)

PAGE 5

Method of Undetermined Coefficients: Trigonometric Forms

Notice if \( f(t) \) is polynomial, then \( Y, Y', Y'' \) remain polynomial.

If \( f(t) \) is exponential, same story.

But if \( Y = A \cos(t) \)

\[ Y' = -A \sin(t) \]

no longer cosine!

its form changed

for undetermined coefficients to work, the form must remain the same

If \( f(t) = \cos(t) \)

we "guess" \( Y(t) = A \cos(t) + B \sin(t) \) even though there is no \( \sin(t) \) in \( f(t) \)

because

\[ Y' = -A \sin(t) + B \cos(t) \]\[ Y'' = -A \cos(t) - B \sin(t) \]

form is kept!

→ ALWAYS include BOTH cosine and sine if \( f(t) \) has either or both

PAGE 6

Example: Solving a Second-Order ODE

Problem Statement

\[ y'' - y' - 2y = \sin(t) \]

\( y = c_1 e^{-t} + c_2 e^{2t} + Y \)

\( f(t) \) has \( \sin(t) \), so \( Y \) must contain BOTH \( \cos(t) \) and \( \sin(t) \)

Particular Solution Guess

\[ Y = A \cos(t) + B \sin(t) \]\[ Y' = -A \sin(t) + B \cos(t) \]\[ Y'' = -A \cos(t) - B \sin(t) \]
sub into \( y'' - y' - 2y = \sin(t) \)

Substitution and Simplification

\[ -A \cos(t) - B \sin(t) + A \sin(t) - B \cos(t) - 2A \cos(t) - 2B \sin(t) = \sin(t) \]\[ (-3A - B) \cos(t) + (A - 3B) \sin(t) = \sin(t) + 0 \cos(t) \]

Solving for Coefficients

\[ -3A - B = 0 \implies B = -3A \]\[ A - 3B = 1 \implies A + 9A = 1 \]
\[ A = \frac{1}{10} \]\[ B = -\frac{3}{10} \]
PAGE 7

\[ y = c_1 e^{-t} + c_2 e^{2t} + \frac{1}{10} \cos(t) - \frac{3}{10} \sin(t) \]

Example

\[ y'' - y' - 2y = t e^{3t} + e^t \cos(3t) \]

Term 1: \( t e^{3t} \)

1st-deg polynomial times exponential

Term 2: \( e^t \cos(3t) \)

exponential times cosine or sine

\[ Y_1 = (At + B) e^{3t} = At e^{3t} + B e^{3t} \quad \text{from } t e^{3t} \]

\[ Y_2 = (C \cos(3t) + D \sin(3t)) e^t \]

\[ Y = At e^{3t} + B e^{3t} + C e^t \cos(3t) + D e^t \sin(3t) \]

\[ Y' = \dots \]

\[ Y'' = \dots \]

plug into diff. eq.

\[ y = c_1 e^{-t} + c_2 e^{2t} + \frac{1}{4} t e^{3t} - \frac{5}{16} e^{3t} - \frac{11}{130} e^t \cos(3t) + \frac{3}{130} e^t \sin(3t) \]
PAGE 8

This method has one serious complication

\[ y'' - y' - 2y = e^{2t} \]

\[ y = c_1 e^{-t} + c_2 e^{2t} + Y \]

\( Y \) matches form of \( f(t) \)

\[ Y = A e^{2t} \]

matches a fundamental solution

\[ Y = ? \]