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?
Asked
Active
Viewed 4.6e+01k times
93
-
3Welcome to TeX.SE. – Peter Grill Oct 02 '12 at 07:16
4 Answers
107
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):

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

References:
For the two types of math modes, please see:
- Display Math: Why is \[ ... \] preferable to $$ ... $$?
- Inline Math: Are \( and \) preferable to dollar signs for math mode?
An excellent reference for math mode is Herbert Voss' comprehensive review of mathematics in (La)TeX
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}
Peter Grill
- 223,288
-
-
@ZafarS: Well that is if you want to use it in inline math. In display math, the
$is not used. The MWE should clarify that. If it is still not clear, please let me know. – Peter Grill Oct 02 '12 at 07:23 -
2Nice answer but it’s slightly odd that your example uses
$…$yet then you go on to refer to the question “Are\(and\)preferable to$?” – Konrad Rudolph Oct 02 '12 at 14:36 -
23You 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 '12 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. – Peter Grill Dec 15 '12 at 19:41
-
On 19/03/2021 - Link to Herbert Voss' comprehensive review of mathematics in (La)TeX broken – Ender Wiggins Mar 19 '21 at 08:23
-
1
25
You can also use:
$\displaystyle{\lim_{x \to \infty}}$
It's in the inline mode, plus the limit is placed underneath.
Greenhill
- 401
-
8
\displaystyledoes 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 '16 at 09:21 -
8
-
@egreg: What would a better suggestion that does not mess with line spacings and size of symbols? – Hosein Rahnama Mar 11 '20 at 21:56
-
-
@egreg I mean something like the display mode that does not mess with line spacing! :) – Hosein Rahnama Mar 11 '20 at 22:26
-
1@H.R. As soon as you set the
x\to\inftybelow “lim” you mess with the spacing. That's all. – egreg Mar 11 '20 at 22:29 -
@egreg: Is there a way to control the size of
x\to\inftymanually? – Hosein Rahnama Mar 11 '20 at 22:32 -
-
This should have been the answer. It displays limits in the correct format since the approaches part of the limit shows directly below lim part rather than adjacent to it. – Sunil Dec 23 '22 at 08:46
-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}
CarLaTeX
- 62,716
-
1Unfortunately, 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. – barbara beeton Dec 12 '20 at 17:50
-2
-
14But why bother with your own construction when the
\limmacro is already defined? – Ian Thompson Jun 11 '15 at 11:04 -
-
1I’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 '15 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 2under the lim on my LMS. – Rebecca Blundell Jul 07 '20 at 02:12 -
Even though it is hacky, it might help someone else who is stuck. – Rebecca Blundell Jul 07 '20 at 02:21