How to write a differential equation with two enumeration like this P'_i,j (t) = beta * (i+1) * (j-1) * P_i+1,j-1 (t) - (beta * i * j + gamma * j) * P_i,j (t) + gamma * (j+1) * P_i,j+1 (t) in Sage Math. This is a stochastic SIR epidemic model where P_i,j (t) is the probability there are i susceptible, j infected and N-(i+j) recovered individuals at time t with 0<=i+j<=N.