# Subscript and superscript symbols for chemical calculations

I have some very unhandy, big equations which contain quantities like

$$n_{AB}(^{13}C)$$, now i would like to adapt this notation also in Mathematica so I do not need to think of a new one. Is there a way?

Thanks

Zorg

Yes, there is a way, using either Subscript[] or the keyboard notation ctrl+_

or ctrl+6 for Superscript[]

producing for example,

Subscript[d, x] x^2

or

Superscript[d,x] x^2

However this can end up causing effects that you weren't intending, such as:

The derivative of $$\frac{\partial \left(x^2 d_x\right)}{\partial x}$$ would be simply $$2 x d_x$$.

However without taking special care, and using D[] unintended answers can happen such as:

D[Subscript[d, x] x^2, x]

$$x^2 \text{Subscript}^{(0,1)}(d,x)+2 x d_x$$

Which certainly isn't what one intended. Because of this, it's generally better to just give your variables names such as $$\left.n_{\text{ab}}(^{13}C\right)$$ as nAB13C or something appropriate. Always starting with a lowercase letter as uppercase letters are reserved for commands such as D[] this will avoid any problems with future calculations dealing with variables and sub/superscripts

Have a look at this answer referring to common pitfalls awaiting new users for other tips.