For a university assignment I've been given three systems of differential equations:
$$\bf{\dot{y}} = \begin{pmatrix}-2 & 1\\ 1 & -2\end{pmatrix} * \bf{y} + \begin{pmatrix}2 * \sin(t)\\ 2*(\cos(t) - \sin(t))\end{pmatrix}$$
$$\bf{\dot{y}} = \begin{pmatrix}-2 & 1\\ 998 & -999\end{pmatrix} * \bf{y} + \begin{pmatrix}2 * \sin(t)\\ 999*(\cos(t) - \sin(t))\end{pmatrix}$$
$$\bf{\dot{y}} = \begin{pmatrix}-2 & 1\\ -1.999 & 0.999\end{pmatrix} * \bf{y} + \begin{pmatrix}2 * \sin(t)\\ -0.999*(\cos(t) - \sin(t))\end{pmatrix}$$
For each system, the eigenvalues and the stiffness ratio $S = \frac{\left|Re(\lambda_{max})\right|}{\left|Re(\lambda_{min})\right|}$ have to be calculated. Then the systems should be solved using ode45 and an appropiate stiff solver in MATLAB.
This leads to the following results:
System 2 is clearly a stiff problem, right? But why isn't system three showing the same behaviour as the stiffness ratio $S$ is the same for both problems?
MATLAB-code for reference: https://pastebin.com/Zaj8Ca1j
EDIT: I just noticed i forgott to label the axes, the x-axis is the time $t$ and the y-axis is $y_1$ and $y_2$


