90

I want to learn how to make the limit sign. For example, take 'Limit of f(x) as x approaches 2 is 5' , how to make this?

1

4 Answers 4

105

You are looking for \lim_{x \to 2} f(x) = 5. This has to be used in math mode which can be either inline mode (where the limit is placed as a subscript so that the inter line spacing of the paragraph is not perturbed):

enter image description here

or in display mode where the limits are placed underneath):

References:

Code:

\documentclass{article}

\begin{document}
With in line mode this is typeset as $\lim_{x \to 2} f(x) = 5$

\medskip
In display mode it is typset differently:
\[ \lim_{x \to 2} f(x) = 5 \]
\end{document}
7
  • $ \lim_{x\to 2} f(x) $ Oct 2, 2012 at 7:18
  • 2
    Nice answer but it’s slightly odd that your example uses $…$ yet then you go on to refer to the question “Are \( and \) preferable to $?” Oct 2, 2012 at 14:36
  • 21
    You can get the same effect in inline mode (as in the display mode) if you use $\lim\limits_{x \to 2} f(x)=5$.
    – Sony
    Dec 15, 2012 at 15:17
  • 2
    @Sony: Good point, but usually better to not do that in inline mode as that disturbs the interline spacing. Thought about adding that to the answer but decided against it for that reason. Dec 15, 2012 at 19:41
  • 1
    @EnderWiggins: Thanks. Has been corrected. Mar 19, 2021 at 8:54
25

You can also use:

$\displaystyle{\lim_{x \to \infty}}$

It's in the inline mode, plus the limit is placed underneath.

9
  • 8
    \displaystyle does not take an argument; remove those braces, and note that this will also change the size of symbols such as summation and fractions.
    – egreg
    Jun 11, 2016 at 9:21
  • 8
    It's better to use $\lim\limits_{x \to \infty}$ for such a case. Jan 13, 2018 at 14:29
  • @egreg: What would a better suggestion that does not mess with line spacings and size of symbols? Mar 11, 2020 at 21:56
  • @H.R. \lim_{x\to\infty}
    – egreg
    Mar 11, 2020 at 22:21
  • 1
    @H.R. As soon as you set the x\to\infty below “lim” you mess with the spacing. That's all.
    – egreg
    Mar 11, 2020 at 22:29
-1
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\newcommand{\Lim}{\displaystyle\lim}
\begin{document}
$\Lim_{x\to 1}(x-2)$
\end{document}
1
  • 1
    Unfortunately, this has the same disadvantages as noted for the answer by @Greenhill. It's not a good idea to force adjacent lines to spread apart; in printed material, it looks bad and impedes reading. Dec 12, 2020 at 17:50
-2

You can also use

\[ \stackrel{\mbox{lim}}{x \to 2} f(x) = 5 \]
5
  • 14
    But why bother with your own construction when the \lim macro is already defined? Jun 11, 2015 at 11:04
  • I will perhaps cast my first downvote, here.
    – GuM
    Jun 11, 2015 at 12:01
  • 1
    I’m so sorry, but I really had to do it, as the answer is truly misleading: a limit is definitely not a \mathrel.
    – GuM
    Jun 11, 2015 at 12:10
  • I upvoted, purely because out of all the answers on this page, this is the only one that actually displays the x \to 2 under the lim on my LMS. Jul 7, 2020 at 2:12
  • Even though it is hacky, it might help someone else who is stuck. Jul 7, 2020 at 2:21

You must log in to answer this question.

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