5

I am trying to set five dots on the top of a letter in order to denote the fifth derivative in Newton’s notation. If I do one dot \dot{X}, two dots \ddot{X}, three dots \dddot{X}, four dots \dddot{X} it's fine. But when you are going to five dots this command is not working. like: five dots \dddddot{X}.

Do you have any idea how to set five dots?

  • This is not an answer to your question, but is it advisable to use Newton’s notation for such high-order derivatives? Having to count the number of dots is imho the red line; your readers might find d^5/dt^5 clearer. – Zozor Mar 30 '18 at 3:23
  • @Zozor: Yes, that is true indeed. But the point is that my 5th order diff equation is really big(You may look at the equation 8 of this paper: doi.org/10.1016/j.physleta.2018.03.011). Now, when you are explaining or solving certain things using this equation it's become really huge especially in two-column LaTeX format. Then it's easy to use dots instead of proper notation. – S.Biswas Mar 31 '18 at 11:16
11

The problem is that each macro has to be defined, and there is only up to \ddddot.

So I made two macros: \dddddot, and \multidots. For both of them I copied the definition of \ddddot and added dots.

\dddddot will put five dots on top of its argument. \multidots{n}{arg} will put n dots on top of arg.

enter image description here

\documentclass{article}

\usepackage{amsmath}

\makeatletter
\long\def\dddddot#1{%
  {\mathop {#1}\limits ^{\vbox to-1.4\ex@ {\kern -\tw@ \ex@ \hbox {\normalfont .....}\vss }}}%
}
\long\def\multidots#1#2{%
  \count@=0
  {{\mathop {#2}\limits ^{\vbox to-1.4\ex@ {\kern -\tw@ \ex@ \hbox {\normalfont %
  \loop%
  \ifnum#1>\count@%
  .%
  \advance\count@ by1%
  \repeat%
  }\vss }}}}%
}
\makeatother

\begin{document}

$\dot{X}$ two dots $\ddot{X}$ three dots $\dddot{X}$ four dots $\ddddot{X}$ five dots $\dddddot{X}$

$\multidots{1}{X}$ two dots $\multidots{2}{X}$ three dots $\multidots{3}{X}$ four dots $\multidots{4}{X}$ five dots $\multidots{5}{X}$ lots of dots $\multidots{15}{X}$
\end{document}

We can add an \hbox to 0pt to hide the width of the dots and make the spacing right on the sides of the X. Although the dots will go over the rest of the text... It's a matter of choice:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\makeatletter
\long\def\dddddot#1{%
  {\mathop {#1}\limits ^{\vbox to-1.4\ex@ {\kern -\tw@ \ex@ \hbox {\normalfont .....}\vss }}}%
}
\long\def\multidots#1#2{%
  \count@=0
  {{\mathop {#2}\limits ^{\hbox to 0pt{\vbox to-1.4\ex@ {\kern -\tw@ \ex@ \hbox {\normalfont %
  \loop%
  \ifnum#1>\count@%
  .%
  \advance\count@ by1%
  \repeat%
  }\vss }}}}}%
}
\makeatother

\begin{document}

$\dot{X}$ two dots $\ddot{X}$ three dots $\dddot{X}$ four dots $\ddddot{X}$ five dots $\dddddot{X}$

$\multidots{1}{X}$ two dots $\multidots{2}{X}$ three dots $\multidots{3}{X}$ four dots $\multidots{4}{X}$ five dots $\multidots{5}{X}$ lots of dots $\multidots{15}{X}$
\end{document}
  • @Phelype : Perhaps it is better to call \newcount outside the macro. Theoretically one could run out of count registers. Or even better, use \numexpr whose value is assigned to an ordinary token list variable (via \edef). – AlexG Mar 29 '18 at 19:12
  • @AlexG Indeed, thanks for pointing that out :) I used a temporary count register \count@. – Phelype Oleinik Mar 29 '18 at 21:55
3

Though @Phelype Oleinik said it more precisely and appropriate way. Here I find a shortcut and easiest way to set five dots to describe 5th derivative on top. Where you don't have to specify anything.

enter image description here

\documentclass{article}
\usepackage{amsmath}
   \overset{.....}{X}
  %\overset{<how many dots you want - put that many [dot]s here>}{X}
\end{document}
  • It's a very neat solution too :) Just one thing: notice the difference between \overset{.....}{X} and \overset{\hbox{.....}}{X}. I prefer the latter. Also, if you liked the second version of my answer, you can use \overset{\hbox to 0pt{.....}}{X} to hide the width of the dots. – Phelype Oleinik Mar 29 '18 at 21:55

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.