1

I want to use a tabular-environment and within it some math formulas (limits). But I want \lim to be in displaystyle (without using display-function each time or defining a new command).

My MWE:

\documentclass[14pt,a4paper,headlines=6,headinclude=true]{scrartcl}

\usepackage[english,ngerman]{babel}         
\usepackage[utf8]{inputenc}                         

\usepackage{amsmath,amssymb,stmaryrd}       
\usepackage{enumitem}                                       
\usepackage{paralist}                                       
\usepackage{scrhack}                                        

\usepackage[left=1.5cm,right=1.5cm,top=4.5cm,bottom=0.5cm,includefoot]{geometry}        
\usepackage[colorlinks, linkcolor = black, citecolor = black, filecolor = black, urlcolor = blue, pdfborder ={0 0 0}, pdfstartview={FitH}]{hyperref} 

\usepackage{mwe}
\usepackage{scrlayer-scrpage}

\usepackage[compact,explicit]{titlesec}% http://ctan.org/pkg/titlesec
\titleformat{\section}[runin]{\large\bfseries}{}{0pt}{#1\quad\thesection}

\begin{document}
\begin{itemize}
    \item 1.) \textbf{Limits}: Calculate the following limits
        \begin{center} \begin{tabular}{ p{5cm} p{5cm} p{5cm} }
        \lim_{x \to -2} (x^2 + 5x) & \lim_{x \to 0} (x^2 + 3x - 4) & \lim_{x \to 2} (2x^2 + 5)^3   \\
        \\
        \lim_{x \to 0} \frac{x^2 - 2x -1}{x^5 - x^2 - 1 } & & \\
        & \lim_{x \to 4} \frac{2x^{\frac{3}{2}} - \sqrt{x}}{x^2 - 15} & \lim_{x \to a} A x^n 
        \end{tabular} \end{center}
\end{itemize}


\begin{align*}
    \lim_{x \to -2} (x^2 + 5x) &= \lim_{x \to -2} (x \cdot x) + \lim_{x \to -2} (5 \cdot x) \\
    &= \left( \lim_{x \to -2} x  \right) \left( \lim_{x \to -2} x  \right) + \left( \lim_{x \to -2} 5  \right) \left( \lim_{x \to -2} x  \right)
\end{align*}
\end{document}

enter image description here

Is there an easy way to set displaymode in tabular? Thank you

(2) Additional question, to the idea in the comments: How can I use this \everymath{\displaystyle} with align-environment? It doesnt work here:

\begin{center} \everymath{\displaystyle}
\begin{align*} 
    \lim_{x \to -2} (x^2 + 5x) &= \lim_{x \to -2} (x \cdot x) + \lim_{x \to -2} (5 \cdot x) \\
    &= \left( \lim_{x \to -2} x  \right) \left( \lim_{x \to -2} x  \right) + \left( \lim_{x \to -2} 5  \right) \left( \lim_{x \to -2} x  \right) \\
    &= (-2) (-2) + 5 \cdot (-2) = -6 \\
    \lim_{x \to 4} \frac{2x^{\frac{3}{2}} - \sqrt{x}}{x^2 - 15} &= \frac{2 \lim_{x \to 4} x^{\frac{2}{3}}- \lim_{x \to 4} \sqrt{x} }{\lim_{x \to 4} x^2 - 15} \\
    &= \frac{2 \cdot 4^{\frac{2}{3}} - \sqrt{4}}{4^2 - \sqrt{15}} = \frac{2 \cdot 8 - 2}{16 -15} = 14
\end{align*}
\end{center}

Thank you for your patience :)

(3) I Mean: Even within align-environment there's displaymode only in highest hierarchy (don't know to explain this better). Within a frac (see numerator) the limit is again small. I would like to use full displaymode in specified environment within all "under-layers" (or in the hole document in all under-layers).

\documentclass{article}

\usepackage{amsmath,array}

\begin{document}
\begin{align*} 
    \lim_{x \to -2} (x^2 + 5x) &= \lim_{x \to -2} (x \cdot x) + \lim_{x \to -2} (5 \cdot x) \\
    &= \left( \lim_{x \to -2} x  \right) \left( \lim_{x \to -2} x  \right) + \left( \lim_{x \to -2} 5  \right) \left( \lim_{x \to -2} x  \right) \\
    &= (-2) (-2) + 5 \cdot (-2) = -6 \\
    \lim_{x \to 4} \frac{2x^{\frac{3}{2}} - \sqrt{x}}{x^2 - 15} &= \frac{2 \lim_{x \to 4} x^{\frac{2}{3}}- \lim_{x \to 4} \sqrt{x} }{\lim_{x \to 4} x^2 - 15} \\
    &= \frac{2 \cdot 4^{\frac{2}{3}} - \sqrt{4}}{4^2 - \sqrt{15}} = \frac{2 \cdot 8 - 2}{16 -15} = 14
\end{align*}

\end{document}

enter image description here

  • Within an environment, so it's not global, (e.g., inside center environment), \everymath{\displaystyle} should do. – Manuel Mar 14 '15 at 20:32
  • I will try this, because later I got the same problem in align-environment. - But it doen't work... – Mac Mar 14 '15 at 20:46
  • You should consider use the tasks package fot this kind of job. – Bernard Mar 14 '15 at 21:34
3

Then use array to adjust the style for the columns you're interested in:

enter image description here

\documentclass{article}

\usepackage{amsmath,array}

\begin{document}

\begin{enumerate}
  \item \textbf{Limits}: Calculate the following limits
    \begin{center}
      \begin{tabular}{ *{3}{>{$\displaystyle}p{5cm}<{$}} }
        \lim_{x \to -2} (x^2 + 5x) & \lim_{x \to 0} (x^2 + 3x - 4) & \lim_{x \to 2} (2x^2 + 5)^3 \\
        \\
        \lim_{x \to 0} \frac{x^2 - 2x -1}{x^5 - x^2 - 1 } & & \\
        & \lim_{x \to 4} \frac{2x^{\frac{3}{2}} - \sqrt{x}}{x^2 - 15} & \lim_{x \to a} A x^n
      \end{tabular}
    \end{center}
\end{enumerate}

\begin{align*}
  \lim_{x \to -2} (x^2 + 5x) &= \lim_{x \to -2} (x \cdot x) + \lim_{x \to -2} (5 \cdot x) \\
  &= \left( \lim_{x \to -2} x  \right) \left( \lim_{x \to -2} x  \right) + \left( \lim_{x \to -2} 5  \right) \left( \lim_{x \to -2} x  \right)
\end{align*}

\end{document}

Insert something before every entry in that column using >{<stuff>} and add something after every entry using <{<stuff>}.

| improve this answer | |
2

Now the question has changed. If you want that $..$ gives you displaystyle, you can add (within a scope, i.e., inside an environment, so the setting is not global)

\everymath{\displaystyle}

On the other side, if you want fractions to use \displaystyle in both the numerator and the denominator, you can define a new command

\newcommand*\Dfrac[2]{\frac{\displaystyle#1}{\displaystyle#2}}

And use \Dfrac, but don't abuse it!

| improve this answer | |
  • You already have \dfrac and \cfrac in amsmath! – Bernard Mar 14 '15 at 21:32
  • I'm sorry, but \dfrac is for \displaystyle\frac and on my system, it uses \displaystyle. \textstyle\frac is obtained with \tfrac. As for \cfrac it can be used for fractions inside fractions, e.g. for conntinued fractions (hence the name of the command). – Bernard Mar 14 '15 at 21:40
  • 1
    @Bernard But the op doesn't want \displaystyle\frac but \frac{\displaystyle. With the first one (\dfrac) you get \textstyle inside the numerator/denominator. – Manuel Mar 14 '15 at 21:45
  • I suppose ypu're alluding to fractions inside fractions then. The \cfrac command is done for such situations. – Bernard Mar 14 '15 at 21:48
  • 1
    @Bernard But \cfrac still doesn't use \displaystyle inside numerator or denominator (it just uses it outside, and adds some \strut for a good output). This command \Dfrac does use \displaystyle in numerator/denominator, which is what OP wants. – Manuel Mar 14 '15 at 21:52

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.