I type in my equations using ctrl+- to make it look nice and my answer outputs in "Subscript^(0,1)[a,b]" form? What is going on? In the answer some bits are displayed with the actual subscripts and some are displayed in the above form, even for the same variable.

Edit: more specifics I am taking the partial derivative of a function H wrt to b. H is a function of many variables one of which is a_b. Is it possible that Mathematica is trying to take the derivative of the subscript because there is a b in there?

H=d k2 + c^2 k4 + k5 s^2 + k1 U + 
 k3 \[Theta] + (g (1 - d - U - \[Theta]) \[Theta] - 
    U (1 + s Subscript[e, s])) Subscript[\[Lambda], 
  1] + (-c d + s U Subscript[e, s]) Subscript[\[Lambda], 2] + 
 U Subscript[\[Lambda], 3]


DHds = Simplify[D[H, s]]
  • $\begingroup$ How about a real example... $\endgroup$
    – ciao
    Commented Feb 7, 2014 at 2:43
  • 1
    $\begingroup$ It looks like you might be taking partial derivatives of subscripted variables. The most useful answer is: Don't use Ctrl- to make it "look nice"... that's the problem right there! They only look nice, but are a pain in the butt when you want to do other things with them (also depends on what you want to do). $\endgroup$
    – rm -rf
    Commented Feb 7, 2014 at 2:58
  • 1
    $\begingroup$ You can select the cell contained your code and press Ctrl+Shift+I to change it into InputForm before you paste your code here. $\endgroup$
    – xzczd
    Commented Feb 7, 2014 at 3:39
  • 2
    $\begingroup$ As rm-rf said, generally a PITA to use in the way you seem to want, but if you insist on "prettiness", you can just enclose the subscripts in your original definitions in double-quotes... $\endgroup$
    – ciao
    Commented Feb 7, 2014 at 3:48
  • 3
    $\begingroup$ Try this: use es instead of Subscript[e, s], λ1 instead of Subscript[λ, 1], etc. and do the computations. Finally, to "prettify" the output, do DHds /. {es -> Subscript[e, s], λ1 -> Subscript[λ, 1], λ2 -> Subscript[λ, 2]} $\endgroup$
    – rm -rf
    Commented Feb 7, 2014 at 4:40


Browse other questions tagged or ask your own question.