<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper,12pt]{article}
\begin{document}

\parindent=0pt

QUESTION Find the solution of the differential equation
$$y''+2y'+2y=2x+1+e^x\cos x $$ which satisfies the boundary
conditions $y=y'=2$ at $x=0$.
\begin{description}

\item[(a)]
by using particular integral and complementary function,

\item[(b)]
by using Laplace transforms.

\end{description}

\bigskip

ANSWER
 $y''+2y'+2y=2x+1+e^x \cos x,\ \ y(0)=2,\ \ y'(0)=2$

\begin{description}

\item[(a)]
 $m^2+2m+2=0,\ (m+1)^2=-1,\ m_1=-1+i,\ m_2=-1-i\\
 y_{CF}=C_ne^{-x}\cos x + c_2 e^{-x} \sin x\\
 y''+2y'+2y=2x+1$ try $y=Ax +B\\
 2A+2(Ax+B)=2x+1\Rightarrow A=1,\ B=-\frac{1}{2}\\
 y''+2y'+2y=e^x \cos x=\textrm{Re}e^{(1+i)x}$\\
 Try $y=p(x)e^{(1+i)x}\\
 (D+1-i)(D+1+i)p(x)e^{(1+i)x}=e^{(1+i)x}\\
 \Rightarrow (D+2)(D+2+2i)p(x)=1\\
 p(x)=\frac{}{D+2}\frac{1}{D+2+2i}=\frac{1}{4(1+i)}=\frac{1-i}{8}\\
 y=\textrm{Re}\frac{1-i}{8}e^{(1+i)x}=\frac{1}{8}e^x(\cos x + \sin
 x)$\\
 General solution:
 \begin{eqnarray*}
  Y&amp;=&amp;e^{-x}(C_1\cos x+C_2 \sin x)+\frac{1}{8}e^x(\cos x+ \sin
  x)+x-\frac{1}{2}\\
  y(0)&amp;=&amp;C_1+\frac{1}{8}-\frac{1}{2}=2 \Rightarrow
  C_1=\frac{16+4-1}{8}=\frac{19}{8}\\
  y'(0)&amp;=&amp;C_2-C_1+\frac{1}{8}(1+1)+1=2\Rightarrow
  C_2=\frac{19-2-8+16}{8}=\frac{25}{8}
 \end{eqnarray*}

\item[(b)]
 $(s^2Y(s)-sy(0)-y'(0))+2(sY(s)-y(0))+2Y(s)={\cal{L}}(2x+1+e^x\cos
 x)\\
 (s^2+2s+2)Y(3)=2s+6+\frac{2}{s^2}+\frac{1}{s}+\frac{s-1}{(s-1)^2+1}$\\
 Use complex inversion formula \ldots

\end{description}

\end{document}
</pre></body></html>