General Solution for a given system of equations

Find the general solution of this system of equations:

$$x' = \pmatrix{-1&0&0\\1&0&-1\\1&1&0}x$$

I got the eigenvalues to be: $\lambda = -1,\pm i$

The eigenvectors corresponding to each eigenvalue:

$v_1 = \pmatrix{1\\-1\\0}$, $v_2 = \pmatrix{0\\i\\1}$, $v_3 = \pmatrix{0\\-i\\1}$

But then how can I write the general solution?

-
Take $v_1 e^t+\mathrm{Re}\,[v_2 e^{ix}]+\mathrm{Im}\,[v_2 e^{ix}]$ – Artem Dec 7 '12 at 5:45
@Artem I know how $v_1$ will look, and $v_2$, $v_3$ exponential function will equal 1 so I dont have to worry about $e^{ix}$. But how can I plug in the weird symbols you have into my eigenvectors? – Q.matin Dec 7 '12 at 5:49
You should read about real and imaginary parts of a complex number. (and of course instead of $x$ should be $t$ in my comment above) – Artem Dec 7 '12 at 5:51
@Artem I see you changed your symbols, what does Re and Im mean? – Q.matin Dec 7 '12 at 5:57

I left a comment yesterday which had some typos, and still contains errors, therefore, I will post a full answer to the original question.

If you have a linear system of three equations this means that you need to find three linearly independent solutions which would form a basis of the set of solutions. If you have three distinct eigenvalues $\lambda_1,\lambda_2,\lambda_3$ and three corresponding eigenvectors $v_1,v_2,v_3$ then the general solution is $$y=c_1v_1e^{\lambda_1t}+c_2v_2e^{\lambda_2t}+c_3v_3e^{\lambda_3t},$$ where $c_1,c_2,c_3$ are arbitrary constants. This is a correct solution, however in many cases you are asked to find a real-valued solution if the original system has real coefficients. In this case you can use the real and imaginary parts of any of the solutions, e.g., $$y=c_1v_1e^{\lambda_1t}+c_2\mathrm{Re}\,[v_2e^{\lambda_2t}]+c_3\mathrm{Im}\,[v_2e^{\lambda_2t}].$$ In your case you have $$v_2e^{\lambda_2 t}= \begin{bmatrix} 0\\ i\\ 1 \end{bmatrix}e^{it}= \begin{bmatrix} 0\\ i\\ 1 \end{bmatrix}(\cos t+i\sin t)= \begin{bmatrix} 0\\ -\sin t+i\cos t\\ \cos t+i\sin t \end{bmatrix}= \begin{bmatrix} 0\\ -\sin t\\ \cos t \end{bmatrix}+i\begin{bmatrix} 0\\ \cos t\\ \sin t \end{bmatrix}.$$ Therefore $$\mathrm{Re}\,[v_2e^{\lambda_2 t}]=\begin{bmatrix} 0\\ -\sin t\\ \cos t \end{bmatrix},\quad \mathrm{Im}\,[v_2e^{\lambda_2 t}]=\begin{bmatrix} 0\\ \cos t\\ \sin t \end{bmatrix}.$$ Putting everything together $$y(t)=c_1\begin{bmatrix} 1\\ -1\\ 0 \end{bmatrix}e^{-t}+c_2 \begin{bmatrix} 0\\ -\sin t\\ \cos t \end{bmatrix}+c_3\begin{bmatrix} 0\\ \cos t\\ \sin t \end{bmatrix},$$ which is exactly the answer you have in your comments.

-
Thanks a lot Artem! This is what I was looking for but I am confused on one last thing, is $c_3$ the set of imaginary numbers right and $c_2$ isn't the set of imaginary numbers? And why would the solution set confuse me like that by splitting it up into two parts in $c_2$ and $c_3$? What was the point of splitting it up? – Q.matin Dec 7 '12 at 21:51
Ok, $c_1,c_2,c_3$ from the first line have nothing to do with $c_1,c_2,c_3$ in the last line. In the last line these are just arbitrary real constants. – Artem Dec 7 '12 at 23:38
Thats not what I was trying to say, let me clarify. Why did the solution set have this as the solution:$$x(t) = c_1e^{-t}\pmatrix{1\\-1\\0} = c_2[cos(t)\pmatrix{0\\0\\1} -sin(t)\pmatrix{0\\1\\0}] +c_3[sin(t)\pmatrix{0\\0\\1}+cos(t)\pmatrix{0\\1\\0}]$$ The way they written it is very confusing but the way you wrote it makes more sense to me. $$y(t)=c_1\begin{bmatrix} 1\\ -1\\ 0 \end{bmatrix}e^{-t}+c_2 \begin{bmatrix} 0\\ -\sin t\\ \cos t \end{bmatrix}+c_3\begin{bmatrix} 0\\ \cos t\\ \sin t \end{bmatrix}$$. Why did they write it like that instead of how you written it? What is the difference? – Q.matin Dec 8 '12 at 1:01
There is no difference. Except for the fact that where you have your second $=$ should be $+$. – Artem Dec 8 '12 at 1:27

Write the general solution as

$$y(t)=c_1 v_1 e^{\lambda_1 t}+c_2 v_1 e^{\lambda_2 t}+c_3 v_3 e^{\lambda_3 t},$$

where $c_1,c_2,c_3$ are arbitrary constants and simplify the expression. Here is the final solution computed by maple, so you can compare your answer

$$\left\{ x \left( t \right) ={\it C_3}\,{{\rm e}^{-t}},y \left( t \right) ={\it C_1}\,\cos \left( t \right) -{\it C_2}\,\sin \left( t \right) -{\it C_3}\,{{\rm e}^{-t}},z \left( t \right) ={\it C_1}\, \sin \left( t \right) +{\it C_2}\,\cos \left( t \right) \right\}$$

-
Thanks! The solution is $$x(t) = c_1e^{-t}\pmatrix{1\\-1\\0} = c_2[cos(t)\pmatrix{0\\0\\1} -sin(t)\pmatrix{0\\1\\0}] +c_3[sin(t)\pmatrix{0\\0\\1}+cos(t)\pmatrix{0\\1\\0}]$$ how did they get that? – Q.matin Dec 7 '12 at 6:59
@Q.matin: Write the expression as one vector and simplify it. Note that, you need to introduce new constants in terms of the old ones. – Mhenni Benghorbal Dec 7 '12 at 7:23

Let $V=\frac{1}{\sqrt{2}}\begin{bmatrix} 0 & 0 & 1 \\ 1 & 1 & -1 \\ -i & i & 0 \end{bmatrix}$. Some tedious work shows that $V^{-1}=\frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1 & i \\ 1 & 1 & -i \\ 2 & 0 & 0 \end{bmatrix}$.

Then $\Lambda = V^{-1} A V = \begin{bmatrix} i & 0 & 0 \\ 0 & -i & 0 \\ 0 & 0 & -1 \end{bmatrix}$. Solving $\dot{y} = \Lambda y$ gives $y(t) = e^{\Lambda (t-t_0)} y(t_0) =\begin{bmatrix} e^{i(t-t_0)} & 0 & 0 \\ 0 & e^{-i(t-t_0)} & 0 \\ 0 & 0 & e^{-(t-t_0)} \end{bmatrix} y(t_0)$.

Since $\dot{y} = \Lambda y$, we have $\dot{Vy} = V\Lambda y$, and letting $x = Vy$, we have $\dot{(V V^{-1} x)} = \dot{x} = V\Lambda V^{-1} x = A x$ (and $x(t_0) = V y(t_0)$, of course). Hence the solution is

$$x(t) = V e^{\Lambda (t-t_0)} V^{-1} x(t_0)$$

Note that $e^{\Lambda (t-t_0)} = e^{i(t-t_0)} e_1 e_1^T + e^{-i(t-t_0)} e_2 e_2^T +e^{-(t-t_0)}e_3 e_3^T$, we can compute $M_i = V e_1 e_1^T V^{-1}$, $M_{-i} = V e_2 e_2^T V^{-1}$ and $M_1 = V e_3 e_3^T V^{-1}$ to get

$$x(t) = (M_i e^{i(t-t_0)} + M_{-i} e^{-i(t-t_0)} + M_1 e^{-(t-t_0)}) x(t_0)$$

Grinding through the details gives $$M_i=\frac{1}{2}\begin{bmatrix} 0 & 0 & 0 \\ 1 & 1 & i \\ -i & -i & 1 \end{bmatrix},\ \ \ M_{-i} = \overline{M_i},\ \ \ M_1=\begin{bmatrix} 1 & 0 & 0 \\ -1 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}$$

Combining all of this together gives

$$x(t) = \begin{bmatrix} e^{-(t-t_0)} & 0 & 0 \\ \cos(t-t_0)-e^{-(t-t_0)} & \cos(t-t_0) & -\sin(t-t_0) \\ \sin(t-t_0) & \sin(t-t_0) & \cos(t-t_0) \end{bmatrix} x(t_0)$$

-
Thanks a lot!!! I haven't seen this type of general solution. In the solution set it gives: $$x(t) = c_1e^{-t}\pmatrix{1\\-1\\0} = c_2[cos(t)\pmatrix{0\\0\\1} -sin(t)\pmatrix{0\\1\\0}] +c_3[sin(t)\pmatrix{0\\0\\1}+cos(t)\pmatrix{0\\1\\0}]$$ is that and yours the samething? If not, how did they get that solution I just gave? – Q.matin Dec 7 '12 at 6:58
This would be the same with $x(t_0) = (c_1, c_3-c_1, c_2)^T$. – copper.hat Dec 7 '12 at 7:14
To see this, note that $x(t_0) = \sum_i [x(t_0)]_i e_i$ Then compute $x(t)$ with initial conditions $e_i$ and sum them together. Same answer. – copper.hat Dec 7 '12 at 7:17
Thanks a lot for explaining that to me! – Q.matin Dec 7 '12 at 21:52
I find the matrix approach simpler albeit computationally intensive. – copper.hat Dec 7 '12 at 22:19