Message Boards Message Boards

0
|
11721 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

how to type what you see in textbooks

Posted 10 years ago

Hello,

I am trying to write mathematical equations with subscripts and superscripts as I see them because it is more comfortable for me to see the actual equations in textbook format. I tried many times but I keep having problems with that.

Could you please give me a simple example (one equation) with an equation with two variables with subscripts and superscripts and if possible with power forms also.

Thanks.

Jones

POSTED BY: Tugrul Temel
5 Replies
Posted 10 years ago

Dear Miguel and Bruce,

I have solved my problem with your help. The solution is to write the model equations in Standard Input Form and then using "Convert to" command under "Cell" I convert the Standard form to Traditional form. Thereafter, I only use Traditional Form. This way I can solve the model and print it in Traditional Form (Textbook Form), which looks beautiful and neat.

Thank you for your kind help and time.

Best regards, Jones

POSTED BY: Tugrul Temel
Posted 10 years ago

Dear Miguel,

In fact, I knew what you explained in your message. I can write the dynamic model in the way you described, however, my intention is to write a short and compact Code in Traditional Format so that one can easily see the model equations without spending much effort to follow the long list of notations. My ultimate gola is to learn how to write the model Code using Traditional format. Is there any way to do so?

Thank you for your time and explanation.

With kind regards, Jones

POSTED BY: Tugrul Temel
Posted 10 years ago

You can write the time subscripts as arguments, i.e. type p[t], p[t+1], etc. As for other subscripts, you can just type y1, y2.

One more thing, you have to either write the expressions in different cells or separate them using semicolons instead of commas, see http://reference.wolfram.com/language/ref/CompoundExpression.html.

You might also want to define the expressions using :=, see http://reference.wolfram.com/language/tutorial/ImmediateAndDelayedDefinitions.html.

POSTED BY: Miguel Olivo-V
Posted 10 years ago

Dear Bruce,

My specific problem is to write a dynamic macroeconomic model with variables with double subscripts. Attached a JPEG file is a section in my model. You can see the type of equations I am dealing with. I like to run this model as it looks but when I run I get many errors. I would appreciate if you advice me how to input the below type of equations into a Mathematica notebook.

Tugrul

 Subscript[p, 1\[InvisibleComma]t] = 1,
    Subscript[k, 1\[InvisibleComma]t] = 
     Subscript[\[Alpha], 1]/(1 - Subscript[\[Alpha], 1]) Subscript[w, t]/
      Subscript[r, t],
    Subscript[k, 2\[InvisibleComma]t] = 
     Subscript[\[Alpha], 2]/(1 - Subscript[\[Alpha], 2]) Subscript[w, t]/
      Subscript[r, t],
    Subscript[k, 
     g\[InvisibleComma]t] = \[Gamma]/(1 - \[Gamma]) Subscript[w, t]/
      Subscript[r, t],
    Subscript[\[Eta], 1\[InvisibleComma]t] = 
     1/((-1 + Subscript[\[Alpha], 1]) Subscript[p, 1\[InvisibleComma]t])
       E^(-Subscript[\[Alpha], 1] Subscript[g, 
       1\[InvisibleComma]t - 1]) ((
       Subscript[w, t] Subscript[\[Alpha], 1])/(
       Subscript[r, t] - 
        Subscript[r, t] Subscript[\[Alpha], 1]))^-Subscript[\[Alpha], 
       1] , Subscript[\[Eta], 
     2\[InvisibleComma]t] = ((Subscript[w, t] Subscript[\[Alpha], 2])/(
      Subscript[r, t] - 
       Subscript[r, t] Subscript[\[Alpha], 2]))^-Subscript[\[Alpha], 
      2]/((-1 + Subscript[\[Alpha], 2]) Subscript[p, 2\[InvisibleComma]t]),
    Subscript[y, 
     1\[InvisibleComma]t] = (1 - Subscript[\[Eta], 
        1\[InvisibleComma]t]) E^(
      Subscript[\[Alpha], 1] Subscript[g, 1\[InvisibleComma]t - 1])
       Subscript[k, 1\[InvisibleComma]t]^Subscript[\[Alpha], 1],
    Subscript[y, 
     2\[InvisibleComma]t] = (1 - Subscript[\[Eta], 
        2\[InvisibleComma]t]) E^((1 - Subscript[\[Alpha], 2]) Subscript[g,
        2\[InvisibleComma]t - 1]) Subscript[k, 2\[InvisibleComma]t]^
      Subscript[\[Alpha], 2],
    Subscript[r, t + 1] = 
     Subscript[\[Alpha], 1] Subscript[p, 
      1\[InvisibleComma]t] (1 - Subscript[\[Eta], 
        1\[InvisibleComma]t])/(1 - 
        2 Subscript[\[Eta], 1\[InvisibleComma]t]) Subscript[y, 
      1\[InvisibleComma]t]/Subscript[k, 1\[InvisibleComma]t],
    Subscript[w, 
     t + 1] = (1 - Subscript[\[Alpha], 1]) Subscript[p, 
      1\[InvisibleComma]t] (1 - Subscript[\[Eta], 
        1\[InvisibleComma]t])/(1 - 
        2 Subscript[\[Eta], 1\[InvisibleComma]t]) Subscript[y, 
      1\[InvisibleComma]t]
Attachments:
POSTED BY: Tugrul Temel

Start with http://reference.wolfram.com/language/guide/MathematicalTypesetting.html
and links therein. Especially under Learning Resources and Tutorials (upper-right).

In case you have the misfortune to need to put typeset subscripted variables into executable code, a small tutorial on doing that is attached.

Attachments:
POSTED BY: Bruce Miller
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract