gear method for stiff set of differential equation

1.1k Views Asked by At

I have a set of 3 differential equation:

$\begin{cases}\dfrac{dy_1}{dt}=s(y_2+y_1-y_1y_2-qy_1^2)\\\dfrac{dy_2}{dt}=\dfrac{1}{s}(-y_2+y_3-y_1y_2)\\\dfrac{dy_3}{dt}=w(y_1-y_3)\end{cases}$

where $s=77.27$ , $w=0.161$ , $q=8.375\times10^{-6}$

Initial condition: $y_1(0)=4$ , $y_2(0)=1.1$ and $y_3(0)=4$

I want to solve above equation for interval $t=[0,1500]$

The set is stiff and I want to solve it by gear method.

I want to write a Matlab code for solving above equation and I don't have permission to use ready functions of Matlab for example ode15s or other functions.

But my question is:

I want to use below formula:

Problem Picture http://upcity.ir/images2/70779463920887716017.jpg

for a set of $3$ equations, first phrase is a $12\times1$ matrix, and $r$ matrix is $12\times1$. So phrases $P$ and $q$ (in above picture) should be $1\times1$ . What would I put instead of $f(x_{n+1},y_{n+1})$ ? In other words, how I use above equation?

Thank you for your help.