I want to get the square of the derivative of theta 1. There are two options as far as I can see:




They produce different outputs. First one seems neater since 1 and 2 are of the same size and aligned but it is very condensed. Second one put 2 more top right but it seem a little unattached to the group. Here is a screenshot, first version is on the left, second version is on the right.


What is the best way to get the result?

  • Is your question which one to choose? As you said you are looking for the derivative of theta1, i think the second one one be more logical. But we have some math-experts here with the real expertise ;-) – Johannes_B Jun 2 '15 at 16:53
  • @Johannes_B Second one being more “logical”, but first one looking better (and, I think, the intended way of usage). I tend not to put braces whith single tokens accents, just \dot\theta_1^2. – Manuel Jun 2 '15 at 16:55
  • 2
    My preference would be (\dot\theta_1)^2, explicitly delimiting the term in parentheses, though it really depends on context. The second of examples you provided is, to my mind, not correct, because the dot is misplaced. – Steven B. Segletes Jun 2 '15 at 16:59
  • 1
    (In semi-response to Steven) Are there in your document the two different types? I mean, are there \dot{\theta_1} and \dot{\theta}_1 while both have different meanings and can be confused? I guess not, and, in case that's the situation, I would choose the best looking one \dot\theta_1^2; in case you need to differentiate the two forms (which are present and easily confusable) I would have Steven's suggestion in mind (\dot\theta_1)^2. – Manuel Jun 2 '15 at 17:04
  • @Manuel If one really preferred the exponent separated from the term, but did not want to use parens or to misplace the dot, one could also do (in math mode) \makebox{$\dot\theta_1$}^2 – Steven B. Segletes Jun 2 '15 at 17:06

$\dot\theta_1^2$, and, in my opinion ${\dot\theta_1}^2$ too, produces an ambiguous form: it is not clear if you mean the derivative of $\theta_1^2$ or the derivative $\theta_1$, squared.

Dots and primes are not a practical way of writing derivatives of larger expressions in general (and, as it appears, the square of something is large enough) because it is not clear what is being dotted or primed. (I keep seeing monstrous things like $\left[loads\right]^\cdot$ in physics manuscripts.) If you want to use the dot notation, write $(\dot\theta_1)^2$ because this makes explicit what you mean.

But maybe the best is, as @percusse said in the comments, to write $\left(\frac{d\theta_1}{dt}\right)^2$ if the spatial arrangement is not a problem. (A minor point for this: in proper typesetting, the differential d is not italic, it should be \mathrm{d}. The Not So Short Introduction recommends to define this symbol as a custom command. It is unfortunate that there is nothing built in for this in LaTeX, nor is it known widely enough.)

  • \dot{\theta_1}^2 is more correct in terms of form. However \dot{\theta}_1^2 makes sense since subscript is obviously belonging to theta. I have to choose between these two since \left(\frac{d\theta_1}{dt}\right)^2 would incredibly make formulas complex. – Mehmed Jun 2 '15 at 18:27
  • I see, \frac{d\theta}{dt} takes up a lot of space indeed. Then, if you want to be unambiguous, do use brackets. This is more of a matter of content than layout. – Attila Szabó Jun 2 '15 at 19:16
  • +1 for (\dot\theta_1)^2 and making it explicit – Martin Thoma Jun 3 '15 at 18:45

My preference would go to the simpler input


If you feel that the exponent is too near to the variable, you can try


enter image description here

However, I don't think the second way is preferable.

  • I have never thought using \, in superscript, thank you for the trick :) – Mehmed Jun 2 '15 at 17:42
  • It seems to me that the superscript needs to go vertically up not horizontally right. – percusse Jun 2 '15 at 17:45
  • @percusse I beg to disagree – egreg Jun 2 '15 at 17:47
  • It is of course a taste issue but how about $\alpha\dot{\theta}_{1}^{\,2}\gamma$? :) – percusse Jun 2 '15 at 17:51
  • @percusse I see no problem. But a tastefully applied \, can help in some cases. – egreg Jun 2 '15 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.