System of Equations


#1

Hello, I’ve written a code for the system of equations as follows. May you help me to plot x and y over a period pf time?
Thank you very much.

def f(z):

x = z[0]
y = z[1]

alpha = 3
beta = 1.5
gamma = 2

f = np.zeros(2)
f[0] = alpha*(x + 1)*(x - 3)*np.e**(beta*y)
f[1] = gamma*(y - 5)*(y + 7)**np.e**(gamma*x)
return f 

z = fsolve(f, [1.0, 1.0])
print(z)


#2

@mahdi1994 Would you clarify what kind of model and simulation you have in your mind?

It seems the model is static with endogenous variables x, y and exogenous parameters alpha, beta, gamma.


#4

Thank you for your attention.
I have a discrete-time dynamic deterministic system of equations. I am going to solve the system and plot each variables over a period of time to analyse their behavior.


#5

@mahdi1994 I think perfect_foresight from Dolo.jl would help you. Unfortunately, there is no documentation, but here is an example notebook.

If you want to start from arbitrary value of state variable, you may need to write your own code. This thread about dynare should be related.


#6

Thank you so much for your help.