\magnification 2400
\parindent 0pt
\parskip 10pt
\hsize 7.5truein
\vsize 9.9truein
\hoffset -0.3truein
\voffset -0.6truein
\font\frm=cmr9
\def\f{\vskip -8pt}
\def\u{\vskip -5pt}
\def\v{\vskip 10pt}
\def\s{\vskip -1.6pt}
\def\hr{\vskip 5pt \hrule}
\def\hb{\hfil \break}

3.5:  Solving 2nd order linear non-homogeneous DE using method of undetermined coefficients.
\s
Example:  Solve  $y'' + 4y = 12t + 8sin(2t)$.
\hr


Step 1:  Solve homogeneous system, $y'' + 4y = 0$
\vskip 10pt
Step 2a:  Find one solution to  $y'' + 4y = 12t$\hb
Step 2b:  Find one solution to  $y'' + 4y = 8sin(2t)$
\vskip -3pt
To find general solution to non-homogeneous \hb LINEAR differential equation:  combine all solutions
\vskip 20pt

Step 3:  IF IVP, plug in intitial values to find constants.

\hr
\s
\hr

Step 1:  Solve homogeneous system,  $y'' + 4y = 0$
\vfill
\eject
Step 1:  Solve homogeneous system,  $y'' + 4y = 0$
\s
$r^2 + 4 = 0 ~~\Rightarrow~~ r^2 = -4 ~~\Rightarrow~~ r = \pm \sqrt{-4} = 0 \pm 2i$
\s
Hence homogeneous soln is $y = c_1cos(2t) + c_2sin(2t)$

\hr

Step 2a:  Find one solution to  $y'' + 4y = 12t$

\eject


Step 2a:  Find one solution to  $y'' + 4y = 12t$
\s
Possible guess:  $y = At + B$.  Then $y' = A$ and $y'' = 0$.
\s
Plug in: $ 0 + 4(At +B) = 12t$
$\Rightarrow$
$4At + 4B = 12t + 0$   
\s
Thus $4A = 12$ and $4B = 0 ~~\Rightarrow~~ A = 3$ and $B = 0$

Thus $y = 3t$ is a solution to $y'' + 4y = 12t$.

Simpler guess:  since there is no $y'$ term, we didn't need the B term in our guess.  We could have guessed $y = At$ instead for this particular problem (and other analogous problems).  If you make similar observations when you do your HW, you can save time when you do comparable problems.

Step 2b:  Find one solution to  $y'' + 4y = 8sin(2t)$
\vfill
\eject

Step 2b:  Find one solution to  $y'' + 4y = 8sin(2t)$

Incorrect guess:  $y = Asin(2t)$.  Then $y' = 2Acos(2t)$ and $y'' = -4Asin(2t)$.

Note:  since no $y'$ term, did not include a $Bcos(2t)$ term in guess.

Plug in:  $-4Asin(2t) +4Asin(2t) = 8sin(2t)$.  
\u\v
\centerline{Thus $0 = 8sin(2t)$.}
\u
Thus equation has no solution for $A$.  Hence guess is wrong.  

Note this guess is wrong because $y = sin(2t)$ is a homogeneous solution.  This is why we always solve homogeneous equations first.  If a function is a solution to a homogeneous equation, then no constant multiple of that function can be a solution to a non-homogeneous solution since it is a homogeneous solution.  

If your normal guess is a homogeneous solution: 
\v\u
\centerline{ Multiply it by $t$ }
\u
until it is no longer a homogeneous solution.

Incorrect guess:  $y = Atsin(2t)$.  
\u
Then $y' = Asin(2t)+ 2Atcos(2t)$ and
\u
 $y'' = 2Acos(2t) + 2Acos(2t)- 4Atsin(2t)$
\v\u
\rightline{$= 4Acos(2t)- 4Atsin(2t)$.}



Plug into  $y'' + 4y = 8sin(2t)$:
\u
$ 4Acos(2t)- 4Atsin(2t) + 4Atsin(2t) = 8sin(2t)$



\u
But this equation has no solution for $A$.  Note we need to add a cosine term to our guess so that we can cancel out the cosine term on LHS:

\hr

Better guess:  $y = t[Asin(2t) + Bcos(2t)]$.  %Then


%$y' =Asin(2t)+  Bcos(2t) + t[2Acos(2t)-2Bsin(2t)]$
%\u

%$y'' = 2Acos(2t)-2Bsin(2t) +2Acos(2t) - 2Bsin(2t)$
%%\u\v
%\rightline{$+ t[-4Asin(2t) - 4Bcos(2t)]  $}
%\u\v
%\rightline{$= 4Acos(2t) -4Bsin(2t) - 4t[sin(2t) + cos(2t)]$}

%Plug into  $y'' + 4y = 8sin(2t)$
%\u
%$ 4Acos(2t) -4Bsin(2t) - 4t[sin(2t) +cos(2t)] - 4t[Asin(2t) + Bcos(2t)] = 8sin(2t)$
%\u
%$ -4Bsin(2t)  = 8sin(2t)  ~~\Rightarrow~~ -4B = 8  ~~\Rightarrow~~B = -2$


%Thus $y = -2tcos(2t)$ is a solution to 

%\rightline{$y'' + 4y = 8sin(2t)$}

\hr

Best guess:  $y = Btcos(2t)$

Then $y' = Bcos(2t) - 2Btsin(2t)$
\u
and $y'' = -2Bsin(2t) - 2Bsin(2t) - 4Btcos(2t)  $

\rightline{$= -4Bsin(2t) - 4Btcos(2t)$}

Plug into  $y'' + 4y = 8sin(2t)$
\u
$ -4Bsin(2t) - 4Btcos(2t) + 4Btcos(2t) = 8sin(2t)$
\u
$ -4Bsin(2t)  = 8sin(2t)  ~~\Rightarrow~~ -4B = 8  ~~\Rightarrow~~B = -2$


Thus $y = -2tcos(2t)$ is a solution to 

\rightline{$y'' + 4y = 8sin(2t)$}

\hr

Note:  Guessing wrong is NOT a big deal.  You can use your wrong guess to determine a correct guess (though guessing right the first time will save you time).  

Recall you are looking for ONE solution to your NON-homogeneous equation. 

 $\bullet$ If you find 
an infinite number of solns, choose one. 

  $\bullet$ If your guess gives you one solution, use it.  

 $\bullet$ If your guess leads to no solutions, than make a different (improved) educated guess.

\hr


To find general solution to non-homogeneous \hb LINEAR differential equation:  combine all solutions
\v
\centerline{$y = c_1cos(2t) + c_2sin(2t) +3t -2tcos(2t)$}



\end