how to do limits in latex

To write limits in LaTeX, you can use the \lim command followed by the expression you want to take the limit of. Here's an example:

\lim_{x \to a} f(x)

In this example, x \to a represents the variable x approaching the value a, and f(x) is the function you want to take the limit of.

You can also specify whether the limit is from the left or the right by using + or - respectively. For example:

\lim_{x \to a^+} f(x)

This represents the limit of f(x) as x approaches a from the right.

Here's another example that combines both the left and right limits:

\lim_{x \to a^-} f(x) + \lim_{x \to a^+} f(x)

This represents the sum of the left and right limits of f(x) as x approaches a.

Remember to include the necessary math packages in your LaTeX document preamble, such as amsmath or mathtools, to use the \lim command.

I hope this helps! Let me know if you have any further questions.