2

I am trying to replicate this formula with LaTeX:

enter image description here

However, I am struggling to make the fraction look the same. This is my attempt:

\begin{equation}

\label{eq:alphaK}

\alpha(k) = \frac{1}{(N-k)} \nicefrac{ \left( \displaystyle \sum_{i=k+1}^{N} \lambda_i \right) }{\left( \displaystyle \prod_{i=k+1}^N \lambda_i \right)^{\frac{1}{N-k}}}

\end{equation}

Which results in the following:

enter image description here

I am looking for a way to increase the size of the "slash" (/) that separates the numerator and denominator. I know I could use a normal \frac instead of \nicefrac but I like how it looks when num/den are displayed side by side.

Is there any way I can force the fraction to look more like the first pictured one?

2
  • 1
    welcome to tex.se! please, always provide complete small document (beginning with \documentclass followed by necessary preamble and ending with \end{document}).
    – Zarko
    Dec 12, 2018 at 16:50
  • 1
    My apologies, I will do so in future Dec 12, 2018 at 17:10

2 Answers 2

7

There are many ways. You will find two different in some variation below. The last one looks more like your desired output.

\documentclass{memoir}
\usepackage{amsmath,xfrac,mathtools}

\begin{document}
\begin{align}
    \alpha(k) 
        &=\frac{1}{(N-k)} 
            \left.
                \left(\sum_{i=k+1}^{N} \lambda_i \right)
            \right/
            \left(\prod_{i=k+1}^N \lambda_i \right)^{\sfrac 1{(N-k)}}\label{eq:alphaK}\\
        &=\frac{1}{N-k} 
            \left.
                \left(\sum_{i=k+1}^{N} \lambda_i \right)
            \middle/
                \left(\prod_{i=k+1}^N \lambda_i \right)^{\frac 1{N-k}}
            \right.\\
        &=\frac{1}{N-k} 
            \biggl(\,\sum_{i=k+1}^{N} \lambda_i \biggr) 
            \bigg/ 
            \biggl(\,\prod_{i=k+1}^N \lambda_i \biggr)^{1/{(N-k)}}\\
            %space added as suggested by Enrico Gregorio
        &=\frac
            {\sum\limits_{i=k+1}^{N} \lambda_i}
            {(N-k)\, \sqrt[N-k]{\prod\limits_{i=k+1}^N\lambda_i}} 
        &\geq 1 \textup{ (by the AM–GM inequality)}
\end{align}
\end{document}

enter image description here


Remarks.

4
  • 1
    in your solutions you can omit \displaystyle in both "fraction" terms. and if you use align, please add ampersands before equal signs.
    – Zarko
    Dec 12, 2018 at 17:07
  • @Zarko Right, I did not noticed that it was there. Dec 12, 2018 at 17:10
  • 2
    +1, for considering my comment :-)
    – Zarko
    Dec 12, 2018 at 17:25
  • @DavidScott You are welcome. Dec 12, 2018 at 23:23
4

a small variation of CampanIgnis answer (since he was to fast for my frozen fingers :-( ):

\documentclass{article}
\usepackage{nccmath}

\begin{document}
\begin{equation}%\label{eq:alphaK}
\alpha(k) = \frac{1}{(N-k)}
            \left(\sum_{i=k+1}^{N} \lambda_i \middle)
            \!\middle/\!
            \middle(\prod_{i=k+1}^N \lambda_i \right)^{\mfrac{1}{N-k}}
\end{equation}
\end{document}

enter image description here

4
  • Very nice :-)...for the frozen fingers.
    – Sebastiano
    Dec 12, 2018 at 21:15
  • @Zarko I then recommend you some お茶 for your fingers. Dec 12, 2018 at 23:13
  • @Zarko I have a general question on your solution: If one of the products would be much, much larger then all other three delimiters would grow, too. Is that intentional? Dec 12, 2018 at 23:20
  • 1
    @CampanIgnis, oh, it would be sufficient if I had a warm glove on my afternoon the walk :-). about size of nominator and donominator: size is slašš line depends on taste. in such cases will rather use the following aproach: \left(<nominator>\right)\left(<denominator>\right)^{-1}
    – Zarko
    Dec 12, 2018 at 23:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .