# 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}$

• What is $\overline x$? – Jack M Apr 22 '14 at 23:54
• it is a vector well actually I meant to put the bar over the $x^{'}$ too – adam Apr 22 '14 at 23:55
• Any ideas ? Am I doing this right – adam Apr 23 '14 at 2:53
• @amzoti $0 <t <\frac {\pi}{2}$ I believe – adam Apr 23 '14 at 12:38
• @amzoti No its just a general solution – adam Apr 23 '14 at 12:47

We are given the nonhomogeneous system:

$$x'(t)=\begin{bmatrix} 2 & -5\\1 & -2 \end{bmatrix}\vec{x} + \begin{bmatrix} \csc t\\ \sec t \end{bmatrix}$$

We can write this as $X'(t) = A x(t) + F[t]$, where:

$$A = \begin{bmatrix} 2 & -5\\1 & -2 \end{bmatrix}, ~~ F[t] = \begin{bmatrix} \csc t\\ \sec t \end{bmatrix}$$

We first find the homogeneous solution. The eigenvalues and eigenvectors of $A$ are:

$$\lambda_1 = i, v_1 = (2+i, 1), \lambda_2 = -i, v_2 = (2-i, 1)$$

This gives us a solution of:

$$X_h(t) = \begin{bmatrix} x_h(t) \\ y_h(t) \end{bmatrix} = \begin{bmatrix}c_1(\cos (t)+2 \sin (t)) & -5c_2 \sin (t) \\ c_1\sin (t) & c_2(\cos (t)-2 \sin (t)) \end{bmatrix}$$

Now we need to find the particular solution using the Fundamental Matrix approach, by solving:

$$X(t) = e^{At}X_0 + \int_{t_0}^t e^{A(t-s)}F(s)~ds$$

So, we we use a linear combination from the components of the homogeneous solution to write:

• Write $\phi(t) = [x_1(t)~ | ~x_2(t)]$
• Find $\phi^{-1}(t)$
• Find $\phi^{-1}(t) \cdot F(t)$
• Now we integrate the previous result and this gives us: $w$
• Next, we find $X_p(t) = \begin{bmatrix} x_p(t) \\ y_p(t) \end{bmatrix} = \begin{bmatrix}\phi(t) \cdot w \end{bmatrix}$

Write the final solution as:

$X(t) = \begin{bmatrix} x(t) \\ y(t) \end{bmatrix} =\begin{bmatrix} -5 c_2 \sin (t)+c_1 (2 \sin (t)+\cos (t))+2 \sin (t) (\log (\sin (t))-2 t)+\cos (t) (-2 t+\log (\sin (t))-5 \log (\cos (t))) \\ \\ c_1 \sin (t)+c_2 (\cos (t)-2 \sin (t))-2 \cos (t) \log (\cos (t))+\sin (t) (-2 t+\log (\sin (t))-\log (\cos (t)))\end{bmatrix}$

Update

If we use your solution with the eigenvalues and eigenvectors, we have a solution of (we want to get rid of these imaginary components):

$$e^{it}\begin{pmatrix}5 \\ 2-i \end{pmatrix} = (\cos t + i \sin t)\begin{pmatrix}5 \\ 2-i \end{pmatrix} = \begin{pmatrix}5 \cos t + i(5 \sin t) \\ 2 \cos t + \sin t + i(2 \sin t - \cos t) \end{pmatrix}$$

So,

$$\phi(t) = \begin{pmatrix}5 \cos t & 5 \sin t \\ 2 \cos t + \sin t & 2 \sin t - \cos t \end{pmatrix}$$

Update 2

$$\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}$$

When you multiply out with $F(t)$ and do the integration, you get the same exact result as the author.

• I think you are missing the determinant fraction. The answer doesn't match what they got in the book sadly. – adam Apr 23 '14 at 13:20
• The answer they got was: $[\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}$ – adam Apr 23 '14 at 13:24
• Yes I'm staring at the book right now number for number trig for trig – adam Apr 23 '14 at 13:28
• Do you see any mistake in my calculations? I see that I am kinda close to the answer but I may be missing factors. – adam Apr 23 '14 at 13:31
• ahhh which one.... will it change my answer alot? – adam Apr 23 '14 at 17:40


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 !!!.

• That's a unique way of doing it. Is the first part a solution to the homogenous? $e^{At}\vec{C}$ – adam Apr 23 '14 at 23:50
• @adam Yes. $\displaystyle{\rm e}^{At}\vec{C}$ satisfies $\displaystyle{{\rm d}\left({\rm e}^{At}\vec{C}\right) \over {\rm d}t }=A\left({\rm e}^{At}\vec{C}\right)$. – Felix Marin Apr 24 '14 at 18:14