# Higher order derivatives using Lagrange's primes notation

In mathematics, the symbol(s) for the derivative of a function using Lagrange's primes notation is nice. This is because it doesn't look like other symbols in the expression.

Higher order derivatives are commonly denoted with a superscript arabic number in parentheses. This is not so nice, especially when a mathematical expression already has arabic numbers in the coefficient, subscript, and index.

Is there a proper way to represent higher order derivatives in Lagrange's primes notation using prime (and possibly backprime) symbols?

This is what I had been using but it doesn't look quite right:

\documentclass{article}
\usepackage{amsmath, amssymb}

\begin{document}

$y', y^{\prime\prime}, y^{\prime\prime\prime}, {y^{\prime\backprime\prime}}, {y^{\backprime\prime}}, {y^{\backprime\prime\prime}}, {y^{\backprime\prime\prime\prime}}, {y^{\backprime\prime\prime\prime\prime}},\dots$

\end{document}


### Output • @BenediktBauer \backprime is (not only) defined by amssymb. Nov 6, 2012 at 7:03
• What doesn't look “quite right”? What is your question? Why \backprime? Lagrange's notation doesn't use back primes. A superscripted number (roman or parenthesized arabic) is mostly used for derivates greater than three. For example: y^{(4)} Nov 6, 2012 at 7:12
• The superscripted number /\/ only looks a little bit like a roman four, Nov 6, 2012 at 7:21
• @UnkleRhaukus Is there any reference to the notation you're proposing? I feel it's very ambiguous; somebody uses Roman numerals for higher order derivatives, but it's not clearer than $f^{(4)}$ as mostly used nowadays. Nov 6, 2012 at 8:42
• @UnkleRhaukus and how would you do the Roman X for 10? Nov 6, 2012 at 9:47

  y^{\prime\prime}


is the normal rendering for multiple primes, but it can be more easily entered by using the input

y''


In math mode ' has a special definition that a run of adjacent ' turns itself into ^{\prime...} with as many \prime in the superscript as there were ' in the original source.

However as others have said in comments your input looks suspiciously as if intended to be roman numerals

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$y' \quad y'' \quad y'''$

$y^\mathrm{\romannumeral 1} \quad y^\mathrm{\romannumeral 2} \quad y^\mathrm{\romannumeral 3} \quad y^\mathrm{\romannumeral 4} \quad y^\mathrm{\romannumeral 5}$
\end{document}


Wikipedia suggests That the notation you want is primes for the first three, then Roman numerals so perhaps: \documentclass{article}

\usepackage{amsmath}

\begin{document}

$y' \quad y'' \quad y'''$

$y^\textrm{\romannumeral 1} \quad y^\textrm{\romannumeral 2} \quad y^\textrm{\romannumeral 3} \quad y^\textrm{\romannumeral 4} \quad y^\textrm{\romannumeral 5}$

\newcommand\lagrangeprime{^{%
\ifcase#1 \or\prime\or\prime\prime\or\prime\prime\prime\else\mathrm{\romannumeral #1}\fi}}

$y\lagrangeprime{1}\quad y\lagrangeprime{2}\quad y\lagrangeprime{3}\quad y\lagrangeprime{4}\quad y\lagrangeprime{5}$
\end{document}

• With \textrm, the roman numerals are typeset in textstyle, making them look rather large in their superscript position. More seriously, if the expression is typeset in an environment where the font shape is in italics (say, inside the statement of a theorem), the roman numerals will be typeset in italics as well. To get the sizing and upright-shape issues solved, it may be better to set ...\mathrm{\scriptsize\romannumeral #1} or -- using the \text command of the amsmath package -- ...\text{\upshape\romannumeral #1}.
– Mico
Nov 6, 2012 at 10:42
• @Mico oops add amsmath then they won't be, I will regenerate the image Nov 6, 2012 at 11:24
• done \textrm picks up \text so gets the correct size just by loading amsmath, the markup doesn't need to change apart from that) Nov 6, 2012 at 11:28
• Even with the amsmath package loaded, \textrm will still generate italic roman numerals if the expression occurs inside an italics environment (such as inside the body of a theorem environment). Inserting an \upshape directive guards against this possibility.
– Mico
Nov 6, 2012 at 12:50
• @Mico you are right of course:( Why don't I just use \mathrm and avoid the complication Nov 6, 2012 at 12:54

### Input

\documentclass{article}
\usepackage{amssymb}                    %  new commands %
\newcommand \bprime {\backprime\hspace{-.11em}      }   %  backstroke
\newcommand \xprime {\prime\hspace{-.25em}\backprime}   %  cross
\begin{document}
$$y', y^{\prime\prime}, y^{\prime\prime\prime}, y^{\prime\bprime\prime}, y^{\bprime\prime}, y^{\bprime\prime\prime}, y^{\bprime\prime\prime\prime}, y^{\bprime\prime\prime\prime\prime}, y^{\prime\xprime}, y^{\xprime}, y^{\xprime\prime} \dots$$
\end{document}


### Output • why???? would you want to fake Roman numerals out of primes and reverse primes rather than using letters??????? Jul 8, 2013 at 11:10
• This notation is completely unintelligible.
– Tom
May 25, 2019 at 14:14