This post is not about a specific Mathematica
problem but about to develop the best way to enter mathematical equations with subscripts and superscripts. I have a model of a large number of equations in which variables have subscripts, superscripts, and an index to create a set of equations using Table
.
I wonder if anybody can suggest me the best way to enter model equations such as those in dynamic stochastic equilibrium models. Equations have all kinds of subscripts and superscripts, and I like to know the best way of writing such equations in Mathematica.
EDIT 1
Here is an example of a model I aim to solve. Using the suggested subscript
and superscript
notation to write a Mathematica
code will be very complicated and there must be another way to code this model because Mathematica
is supposed to be powerful solve much more complicated and larger system of non-linear equations.
As can be easily seen from this example model, I could log-linearize the model and redefine the variables and solve the system. My question is not about solving this model but entering the model equations in an efficient format using Mathematica
. It is obvious to me that using long-subscript and superscripted variables is not the way forward. I am interested in a robust
and stable
coding of model of this kind.
I hope my question is clear.
Thanks.
y[a,b][c,d][x]
could denote a function with 2 sup and 2 superscripts and one variable. $\endgroup$Format
to define print forms, e.g.Format[y[a_, b_][c_, d_][z_]] := Subsuperscript[y, Row[{a, b}], Row[{c, d}]][z]
$\endgroup$