TT1 Question 4 (Main)
a).
Solve
\begin{equation}
y''-6y'+10y=2e^{3x}+39cosx
\end{equation}
First solve for
\begin{equation}
r^2-6r+10=0\\
\begin{split}
r & =\frac{-(-6)\pm \sqrt{(-6)^2-4(1)(10)}}{2(1)}\\
& = \frac{6\pm \sqrt{-4}}{2}\\
& = 3\pm i\\
\end{split}\\
y_c=c_1e^{3x}cosx+c_2e^{3x}sinx
\end{equation}
Then, we solve
\begin{equation}
y''-6y'+10y=2e^{3x}\\
y_{p1}=Ae^{3x} \qquad y_{p1}'=3Ae^{3x} \qquad y_{p1}''=9Ae^{3x}\\
9Ae^{3x}-6(3Ae^{3x})+10(Ae^{3x})=2e^{3x}\\
9A-18A+10A=2\\
A=2\\
y_{p1}=2e^{3x}
\end{equation}
Next, solve
\begin{equation}
y''-6y'+10y=39cosx\\
y_{p2}=Bcosx+Csinx \qquad y_{p2}'=-Bsinx+Ccosx \qquad y_{p2}''=-Bcosx-Csinx\\
(-Bcosx-Csinx)-6(-Bsinx+Ccosx)+10(Bcosx+Csinx)=39cosx\\
-Bcosx-6Ccosx+10Bcosx=39cosx\\
-Csinx+6Bsinx+10Csinx=0sinx\\
9B-6C=39\\
6B+9C=0\\
B=3 \qquad C=-2\\
y_{p2}=3cosx-2sinx
\end{equation}
Now, we add to the general form:
\begin{equation}
\begin{split}
y& =y_c+y_{p1}+y_{p2}\\
& =c_1e^{3x}cosx+c_2e^{3x}sinx+2e^{3x}+3cosx-2sinx
\end{split}\\
\end{equation}
b).
Input: y(0)=0 y'(0)=0
Get the final solution
\begin{equation}
\begin{split}
y(0)& =c_1e^0cos0+c_2e^{0}sin0+2e^{0}+3cos0-2sin0\\
& =c_1(1)+c_2(0)+2(1)+3(1)-2(0)\\
& =c_1+5\\
& =0\\
\end{split}\\
c_1=-5\\
\quad \\
y'=3c_1e^{3x}cosx-c_1e^{3x}sinx+3c_2e^{3x}sinx+c_2e^{3x}cosx+6e^{3x}-3sinx-2cosx\\
\begin{split}
y'(0)& =3c_1e^{0}(1)-c_1e^{0}(0)+3c_2e^{0}(0)+c_2e^{0}(1)+6e^{0}-3(0)-2(1)\\
& =3c_1+c_2+6-2\\
& =3(-5)+c_2+4\\
& =c_2-11\\
& =0
\end{split}\\
c_2=11\\
\end{equation}
Now we know the two constant c, we plug them into the solution, get:
\begin{equation}
y=-5e^{3x}cosx+11e^{3x}sinx+2e^{3x}+3cosx-2sinx
\end{equation}
OK. V.I.