# Matrix-vector representation for a system of ODE's

I am aiming to explicitly write the matrix-vector representation of this system: \begin{aligned}y'_1 &= 5y_2 - y_1 + y_3\\ y_2' &= 3y_1 - y_2 + t^2\\ y_3' &= y_3 - ty_2\end{aligned}

This is what I have so far: $$\left[\begin{matrix}y_1'\\ y_2'\\y_3'\end{matrix}\right]=\left[\begin{matrix}-1 & \;\;5 &\; 1\\ \;\;\;3 & -1 & \;0 \\ \;\;\;0 & \;\;? &\; 1 \end{matrix}\right]\cdot \left[\begin{matrix}0\\t^2\\?\end{matrix}\right]$$

Just not sure how to attack $$-ty_2.$$
Any help would be appreciated, thanks guys.

• is it t2 as $t^2$? Commented Oct 17, 2015 at 1:46
• yes t^2 is the value Commented Oct 17, 2015 at 3:11
• Thank you, much appreciated Commented Oct 17, 2015 at 7:59

Just set $$\left(\begin{array}{c} y'_1\\ y'_2\\ y'_3 \end{array} \right)= \left(\begin{array}{ccc} -1&5&1\\ 3&-1&0\\ 0&-t&1 \end{array} \right) \left(\begin{array}{c} y_1\\ y_2\\ y_3 \end{array} \right)+ \left(\begin{array}{c} 0\\ t^2\\ 0 \end{array} \right).$$

• If you dont mind me asking do you use software to insert formulas in the forum? Commented Oct 17, 2015 at 8:39
• all is here, and you can visit meta.math.stackexchange.com/questions/5020/… , but also don't be afraid to press the edit button and see how anyone can write with $\LaTeX$ Commented Oct 17, 2015 at 11:40
• @Simon - a quick way to display a vector is \pmatrix{x \\ y \\ z} which renders to $$\pmatrix{x \\ y \\z}$$ In all honesty, find posts with math, right click on them and select show math as TeX. This is the best way to learn. Commented Dec 14, 2018 at 21:27

You have the following system of odes:

\begin{align*} y_1'&= -y_1+5y_2+y_3\\ y_2'&=3y_1-y_2+t^2\\ y_3'&=y_3-ty_2 \end{align*}

Then make $u=\begin{bmatrix} y_1&y_2&y_3 \end{bmatrix}^T$ and you get

$$u'= \begin{bmatrix}-1&5&1\\ 3&-1&0\\ 0&-t&1 \end{bmatrix}u+ \begin{bmatrix}0\\t^2\\0 \end{bmatrix}$$