GeneralSize of the Integral sign and alignment

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
curiouslearn
Posts: 105
Joined: Fri Nov 30, 2007 11:32 pm

Size of the Integral sign and alignment

Post by curiouslearn »

Hello,

I have a the following math equation in the display environment.

Code: Select all

 \begin{displaymath}
                        m_{R}(m_{N},x) =
                        \begin{array}{l}
                                \int_{r_{L}}^{r_{H}}p(x)f(x+r)g(r)\md r - \int_{r_{L}}^{r_{H}}p'(x)[1-F(x+r)]g(r)\md r \\
                                \qquad \qquad+ p'(x)(1-F(x))(1-m_{N})-p(x)f(x)(1-m_{N}) \\
                                \hline 
                                \int_{r_{L}}^{r_{H}}p(x)f(x+r)g(r)\md r - \int_{r_{L}}^{r_{H}}p'(x)[1-F(x+r)]g(r)\md r]
                        \end{array}                
   \end{displaymath}

(1) The size of the Integral sign seems small. Is there a way to get a larger integral sign?
(2) Is there a way to align the " m_{R}(m_{N},x) = " part of the expression with the horizontal line? The way the code appears above this part of the expression occurs at the same height as the second line in the numerator.

Thanks in advance for your help.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

curiouslearn
Posts: 105
Joined: Fri Nov 30, 2007 11:32 pm

Size of the Integral sign and alignment

Post by curiouslearn »

A search on the internet revealed the mathtools package which allows me to take care of the second problem (the alignment problem) using the following code instead:

Code: Select all

               \begin{equation}
                        m_{R}(m_{N},x) =
                        \dfrac{
                                \splitdfrac{\int_{r_{L}}^{r_{H}}p(x)f(x+r)g(r)\md r - \int_{r_{L}}^{r_{H}}p'(x)[1-F(x+r)]g(r)\md r}
                                {+ p'(x)(1-F(x))(1-m_{N})-p(x)f(x)(1-m_{N})}}
                                {\int_{r_{L}}^{r_{H}}p(x)f(x+r)g(r)\md r - \int_{r_{L}}^{r_{H}}p'(x)[1-F(x+r)]g(r)\md r}
                \end{equation}

However, the integral signs are still small. Any suggestions for making them larger would be helpful.

Thanks.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Size of the Integral sign and alignment

Post by gmedina »

One possibility is to use the \mathlarger command provided by the relsize package, as the following example suggests:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{relsize}
\newcommand\md{\ }

\begin{document}
\begin{equation}
  m_{R}(m_{N},x) =
  \dfrac{
    \splitdfrac{\mathlarger{\int}_{r_{L}}^{r_{H}}p(x)f(x+r)g(r)\md r - 
        \mathlarger{\int}_{r_{L}}^{r_{H}}p'(x)[1-F(x+r)]g(r)\md r}
        {+ p'(x)(1-F(x))(1-m_{N})-p(x)f(x)(1-m_{N})}}
    {\mathlarger{\int}_{r_{L}}^{r_{H}}p(x)f(x+r)g(r)\md r - 
        \mathlarger{\int}_{r_{L}}^{r_{H}}p'(x)[1-F(x+r)]g(r)\md r}
\end{equation}

\end{document}
I had to define the \md command since I do not know how you originally defined it. Change it back to the original definition.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
curiouslearn
Posts: 105
Joined: Fri Nov 30, 2007 11:32 pm

Re: Size of the Integral sign and alignment

Post by curiouslearn »

Thanks very much gmedina. That worked very well. I was using the command \md as a shortform for \mathrm{d}.

It would have been perfect had the space between integrand and the integral sign been a little less. I tried using \mathclap available in mathtools, which reduces that space but creates the problem of the integral limits running into the integral sign (since they are not above or below) as in the summation sign. I suppose I can live with that.
balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Size of the Integral sign and alignment

Post by balf »

To reduce the space, apart from adding a \! before the integrand, you could try (it modify the very last integral from gmedina's post):

Code: Select all

\mathlarger{\int}_{r_{L}}^{\mathrlap{r_{H}}}p'(x)[1-F(x+r)]g(r)\md r}
Btw, the spacing would be better, I find, if you defined \md as \,\mathrm{d}.

B.A.
curiouslearn
Posts: 105
Joined: Fri Nov 30, 2007 11:32 pm

Re: Size of the Integral sign and alignment

Post by curiouslearn »

Thanks very much Balf. That worked great.
Post Reply