How to evaluate the Jacobian for a system of differential equations when the terms aren't constants

93 Views Asked by At

For this system :

$$ \dot{x} = \frac{xr_1}{k_1}\left(k_1 - c_1 x - i_1 y \right) $$

$$ \dot{y} = \frac{y r_2}{k_2}\left(k_2 - c_2 y - i_2 x \right) $$

One of the fixed points is ( from $\dot{x} = \dot{y}$)

$$ \left( \frac{k_1 - k_2}{c_1 - i_2} , \frac{x(c_1 - i_2) - k_1 + k_2}{c_2 - i_1} \right) $$

Given that the Jacobian for this system is

$$ J = \begin{bmatrix} r_1 - \left(\frac{2r_1c_1x}{k_1}\right) - \left( \frac{r_1i_1 y}{k_1}\right) & - \left(\frac{r_1 i_1 x}{k_1}\right) \\ -\left(\frac{r_2 i_2 y}{k_2}\right) & r_2 - \left( \frac{2 r_2 c_2 y}{k_2} \right) - \left( \frac{r_2 i_2 x}{k_2} \right) \\ \end{bmatrix} $$

I'm not sure how I should go about evaluating this point.

edit - evaulation

# these should both be zero for the fixed points
def f1(x,y,k1,c1,i1):
    return(k1 - c1*x - i1*y)
def f2(x,y,k2,c2,i2):
    return(k2 - c2*x - i2*y)

# just to assign values of x,y more easily
def xx(k1,k2,c1,c2,i1,i2):
    return((i2*k2 - c2*k1)/(i1*i2 - c1*c2))
def yy(k1,k2,c1,c2,i1,i2):
    return(( i2*k1 - c1*k2 )/(i1*i2 - c1*c2))

# some constants to test
k1 = 1
c1 = 2
i1 = 3

k2 = 3
c2 = 5
i2 = 7


x = xx(k1, k2, c1, c2, i1, i2)
y = yy(k1, k2, c1, c2, i1, i2)

# these should then be zero
print(f1(x, y, k1, c1, i1))
print(f2(y, y, k2, c2, i2))

# Output :
# -2.1818181818181817
# 1.9090909090909092
1

There are 1 best solutions below

6
On

The fixed points are the locations for which both $\dot{x} = 0$ and $\dot{y} = 0$. In your case these are the points

\begin{eqnarray} (x^*, y^*)_1 &=& (0, 0) \\ (x^*, y^*)_2 &=& \left(0, \frac{k_2}{c_2} \right)\\ (x^*, y^*)_3 &=& \left(\frac{k_1}{c_1}, 0 \right)\\ (x^*, y^*)_4 &=& \left(\frac{i_2 k_2 - c_2 k_1}{i_1i_2 - c_1 c_2}, \frac{i_1 k_2 - c_2 k_1}{i_1i_2 - c_1 c_2}\right) \\ \end{eqnarray}