<s>[INST] Finding a particular solution to the non-homogenous system I have the following problem $\vec{x}^{'}(t)=\begin{pmatrix} 2 & -5\\1 & -2 \end{pmatrix}\vec{x} + \begin{pmatrix} \csc t\\ \sec t \end{pmatrix}$
Step 1) Find the Eigenvalues $(2-\lambda)(-2-\lambda)+5=0 \implies \lambda= \pm i$
Step 2) The eigenvectors are $e_1=\begin{pmatrix}5 \\ 2-i \end{pmatrix}$ and $e_2= \begin{pmatrix} 5 \\ 2+i \end{pmatrix} $
This means that the fundamental matrix will be $\begin{pmatrix} 5e^{it} & 5e^{-it}\\ (2-i)e^{it} & (2+i)e^{-it}\end{pmatrix}$ and its inverse will be $$\dfrac{1}{10i}\begin{pmatrix} (2+i)e^{-it} & -5e^{-it}\\ (i-2)e^{it} & 5e^{it} \end{pmatrix}$$
This is going to get really really messy.... Please tell me if I am on the right track and if so for the love of god tell me I can omit the imaginary part when apply euler's formula.
So I decided to go forth with this messy problem and I'll show where I am stuck. I decided to leave the $\dfrac{1}{10i}$ to the end. So far I multiply $X^{-1}(t)g(t)$ which is $$\dfrac{-i}{10}\begin{pmatrix} (2+i)(\cos t - i \sin t) & -5\cos t +5i\sin t\\(i-2)(\cos t+i\sin t)& 5\cos t +5i\sin t) \end{pmatrix}\begin{pmatrix}\csc t\\ \sec t \end{pmatrix}=\dfrac{i}{10}\begin{pmatrix} 2\cot t-2i +i\cot t +5i \tan t -4\\ i \cot t -2\cot t -2i+5i\tan t +4 \end{pmatrix}$$ I than proceeded to integrate this monstrosity to obtain $$\begin{pmatrix} 2\ln(\sin t)-2it+i\ln(\sin t)-5i\ln(\cos t)-4t\\ i\ln(\sin t)-2it-2\ln(\sin t)-5i\ln(\cos t) +4t \end{pmatrix}$$ I than factored in the $\dfrac{-i}{10}$ to get $$\begin{pmatrix}-\frac{i}{5}\ln(\sin t)-\frac{t}{5}+\frac{1}{10}\ln(\sin t)-\frac{1}{2}\ln(\cos t) -\frac{2ti}{5}\\ \frac{1}{10}\ln(\sin t)-\frac{t}{5}+\frac{i}{5}\ln(\sin t)-\frac{1}{2}\ln(\cos t)-\frac{2ti}{5} \end{pmatrix}$$
But now I have to multiply THAT matrix by $X$ which is even messier... Am I doing something wrong?
Proceding with the Amzoti's method as follows:
 $\phi(t)= \begin{pmatrix} 5\cos t&5 \sin t\\ 2\cos t + \sin t& 2\sin t-\cos t \end{pmatrix}$  $$\phi^{-1}(t)=\dfrac{1}{5}\begin{pmatrix} \cos t -2 \sin t & 5 \sin t\\ 2\cos t + \sin  t& -5\cos t \end{pmatrix}$$ I multiply by $g(t)$ and get $$\begin{pmatrix} \cot t-2+5 \tan t\\ 2\cot t +1 -5  \end{pmatrix}$$
Next I take the integral: $$\begin{pmatrix}\int \cot t -2+5 \tan t=\ln(\sin t) -2t -5\ln(\cos t)\\\\ \int 2\cot t+1-5 t=2\ln(\sin t)+t-5t \end{pmatrix}$$ thus $$\dfrac{1}{5} \begin{pmatrix} \ln(\sin t)-2t-5\ln(\cos t)+c_1\\2\ln(\sin t)-4t+c_2\\ \end{pmatrix}$$ The top part isn't matching but the bottom part is.EDIT The moral of the problem... do your work in latex to find silly mistakes....
The solution in the book is $[\frac{1}{5}\ln(\sin t)-\ln(-\cos t)-\frac{2}{5}t+c_1]\begin{pmatrix} 5\cos t \\ 2\cos t +\sin t\end{pmatrix}+[\frac{2}{5}\ln(\sin t)-\frac{4}{5}t+c_2]\begin{pmatrix} 5\sin t\\-\cos t+2\sin t \end{pmatrix}$
 [/INST] $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
$\ds{\vec{\rm x}'\pars{t} = A\vec{{\rm x}}\pars{t} + \vec{\fermi}\pars{t}.\quad
     A \equiv \pars{\begin{array}{rr}2 & -5 \\ 1 & - 2\end{array}}.\quad
     \vec{\fermi}\pars{t} \equiv {\csc\pars{t} \choose \sec\pars{t}}}$

The differential equation can be rewritten as:
  \begin{align}
\totald{\bracks{\expo{-At}\vec{\rm x}\pars{t}}}{t}&=\expo{-At}\vec{\fermi}\pars{t}
\quad\imp\quad
\vec{\rm x}\pars{t}=\expo{At}\vec{C} + \expo{At}\int\expo{-At}
\vec{\fermi}\pars{t}\,\dd t
\end{align}
  where $\ds{\vec{C}}$ is a vector constant.

Notice that $\ds{A^{2} = -1}$ such that
$\ds{\expo{-At} = \cos\pars{t} - \sin\pars{t} A}$ and
\begin{align}
\color{#00f}{\large\vec{\rm x}\pars{t}}&=\expo{At}\vec{C}
+
\expo{At}\int\bracks{%
\cos\pars{t} - \sin\pars{t}A}{\csc\pars{t} \choose \sec\pars{t}}\,\dd t
\\[3mm]&=
\expo{At}\vec{C}
+
\expo{At}\int{%
\cos\pars{t}\csc\pars{t}
- \sin\pars{t}\bracks{2\csc\pars{t} - 5\sec\pars{t}}
\choose
\cos\pars{t}\sec\pars{t}
-\sin\pars{t}\bracks{\csc\pars{t} - 2\sec\pars{t}}}\,\dd t
\\[3mm]&=
\expo{At}\vec{C}
+
\expo{At}\int{%
\cot\pars{t} - 2 + 5 \tan\pars{t} \choose 2\tan\pars{t}}\,\dd t
\\[3mm]&=
\expo{At}\vec{C}
\\[3mm]&\mbox{}+
\pars{%
\begin{array}{cc}
\cos\pars{t} + 2\sin\pars{t} & 5\sin\pars{t}
\\
\sin\pars{t} & \cos\pars{t} - 2\sin\pars{t}
\end{array}}{%
-2t - 5\ln\pars{\cos\pars{t}} + \ln\pars{\sin\pars{t}}
\choose -2\ln\pars{\cos\pars{t}}}
\end{align}

Just multiply the matrix by the vector !!!.

</s>