3
\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb}
\usepackage{amsfonts}
\begin{document}
\[\displaystyle \lim_{x \to+\infty}f(x)=\frac{\lim_{x \to+\infty}1+\lim_{x \to+\infty}\frac{1}{x^2}+\lim_{x \to+\infty}\frac{3}{x^3}+\lim_{x \to+\infty}\frac{1}{x^4}}{\lim_{x \to+\infty}-4+\lim_{x \to+\infty}\frac{5}{x^3}-\lim_{x \to+\infty}\frac{1}{x^4}}=-\frac{1}{4}
\end{document}

enter image description here

how can I increase the row width? I want x->infty below the lim sign.

manh3
  • 363

3 Answers3

6

Just add \limits before each subscript:

    \documentclass[a4paper]{article}
    \usepackage{amsmath,amssymb}
    \usepackage{amsfonts}
\begin{document}

\[\lim\limits_{x \to+\infty}f(x)=\frac{\lim\limits_{x \to+\infty}1+\lim\limits_{x \to+\infty}\dfrac{1}{x^2}+\lim\limits_{x \to+\infty}\dfrac{3}{x^3}+\lim\limits_{x \to+\infty}\dfrac{1}{x^4}}{\lim\limits_{x \to+\infty}-4+\lim\limits_{x \to+\infty}\dfrac{5}{x^3}-\lim\limits_{x \to+\infty}\dfrac{1}{x^4}}=-\frac{1}{4} \]

\end{document}

enter image description here

Bernard
  • 271,350
6

To save yourself from having to type \lim\limits 7 or more times, I suggest you create a macro -- called \ddfrac in the code below -- that automatically renders the contents of the numerator and denominator of a \frac expression in \displaystyle math mode. To cut down on the visual clutter, I would also replace all 8 instances of +\infty with "just" \infty.

enter image description here

\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb}
%%\usepackage{amsfonts}  % amsfonts is loaded automatically by amssymb
\newcommand\ddfrac[2]{\frac{\displaystyle #1}{\displaystyle #2}}

\begin{document} [ \lim_{x\to\infty}f(x) =\ddfrac{\lim_{x\to\infty}1+\lim_{x\to\infty}\frac{1}{x^2} +\lim_{x\to\infty}\frac{3}{x^3}+\lim_{x\to\infty}\frac{1}{x^4}}% {\lim_{x\to\infty}-4+\lim_{x\to\infty}\frac{5}{x^3} -\lim_{x\to\infty}\frac{1}{x^4}} =-\frac{1}{4} ] \end{document}

Mico
  • 506,678
  • 1
    i appreciate this answer, i sometimes have trouble with correct bracketing numbers when the syntax is too long. – manh3 Sep 22 '22 at 01:55
3

Since you have decided to put limits underneath the \lim, you might also want to change format of this limit and normalise spacing between terms by setting custom values to \thinmuskip and \medmuskip.Note to keep those settings within a group so they won't affect the rest of the document.

Another problem is the limits are long. For this particular case, I'd use array instead of the \limits to: have more control over a gap between limits and \lim; align limits with operator \lim.

enter image description here

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

\NewDocumentCommand{\xlim}{e_}{% \mathop{ \begin{array}[t]{@{}l@{}} \lim \[\dimexpr7pt-\normalbaselineskip] \mathrlap{\scriptstyle#1} \[\dimexpr0.2\normalbaselineskip-4pt] \end{array}}}

\begin{document} \begingroup \thinmuskip=8mu plus 6mu minus 9mu \medmuskip=14mu plus 6mu minus 8mu \renewcommand*{\arraystretch}{1} [ \lim\limits_{\rule{0pt}{5pt}\mathclap{x\to+\infty}} f(x) = \frac{ ; \xlim_{x\to+\infty} 1 + \xlim_{x\to+\infty} 1/x^2 + \xlim_{x\to+\infty} 3/x^3 + \xlim_{x\to+\infty} 1/x^4 ; }{ \xlim_{x\to+\infty} -4 + \xlim_{x\to+\infty} 5/x^3 - \xlim_{x\to+\infty} 1/x^4 } = -\frac{1}{4} ] \endgroup \end{document}

Celdor
  • 9,058