[Tex/LaTex] Higher order derivatives using Lagrange’s primes notation

math-modesymbols

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

Primes 1-8

Best Answer

  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:

enter image description here

\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[1]{^{%
\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}