TransWikia.com

Difference Equation system

Mathematica Asked by Rodrigo Miyamoto on February 9, 2021

I am new in Mathematica and I have a very large system of difference equations like:

 a1*x[t] + a2*x[t-1] + a3*E{x[t+1]} + a4*y[t] + a5*y[t-1] + a6*E{y[t+1]} + ...=0 
 b1*x[t] + b2*x[t-1] + b3*E{x[t+1]} + b4*y[t] + b5*y[t-1] + b6*E{y[t+1]} + ...=0
 ...

where E{x[t+1]} is the expected value of x[t+1] in time t. In the real system I could have more lags (t-2, t-3) and more leads (E{x[t+2]},E{x[t+3]}). The system is linear.

Then I would like to:

  1. Input each equation separately (since are so many variables, I would like to input them in a arbitrary order of variables. For example, I would like the first equation to be written as

a2*x[t-1]+ a3*E{x[t+1]} +a5*y[t-1] + a6*E{y[t+1]} = -a1*x[t] -a4*y[t-1] + ...

  1. Put all the equations together in a system such that:

    M v[t] = N E{v[t+1]}

where M and N are matrices and v[t] is a vector such that v[t]={x[t],y[t],…} containing possible auxiliary variables , for example z[t]=x[t-1], to help to disappear with the variables with lags and lead more than 1.

  1. Finally, I expect that this system above may have the equations reorder such that we have 2 parts of matrices M=[M1;M2] and N=[N1;N2] where N2 is a matrix of zeros, i.e., the last equations of the system can be written as M2 v[t] = 0

Would anyone help me with some of these steps, please?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP