# Limit of a function

Calculation of lim_(x -> x_0) f(x)\text{ or }lim_(x -> x_0^+) f(x)\text{ or }lim_(x -> x_0^-) f(x)\text{ or }lim_(x -> -oo) f(x)\text{ or }lim_(x -> +oo) f(x)
input a single letter
To multiply: write a*b not ab
+inf (for +infinite) or -inf (for -infinity)
optional

This tool calculates the limit of a function at a certain x-value .
You can make x tend towards :
- a number (for example 0),
- a constant (pi, e),
- an expression based on numbers and constants,
- positive infinity (enter +inf) or negative infinity (enter -inf).

You can also specify the direction to calculate left-hand limit or right-hand limit. To make x tend towards x0 from the right (choose + in the direction field). For left-hanf limit (choose -).

Usual functions are accepted: sine, cosine, tangent, logarithm (log), exponential, root, etc.

More details below.

## How to use this calculator ?

Variables A function can have one or more variables, but only one main variable. A variable is a single lowercase or uppercase letter. Examples: A function f with one main variable : f(x) = 4*x A function g with one main variable x and a secondary parameter m, g(x) = 4*x*m + x + 1,In this case, enter x in the “main variable” field Use a dot as decimal separator + (addition), - (substration), * (multiplication), / (division), ^ (power), For multiply operator, enter a*b not a.b nor ab. Example: 2*x. You may use these constants : pi (approx. 3.14), e (approx. 2,72) Examples: f(x) = pi * x or f(x) = e * (x+1+2*e)2 You may use theses functions in the expression of f(x) sqrt(x) (square root), exp(x) (exponential function), log(x) or ln (natural logarithm), You may use theses functions in the expression of f(x) sin (sine), cos (cosine), tan (tangent), cot (cotangent), sec (secant), csc (cosecant), You may use theses functions in the expression of f(x) arcsin (arcsine), arccos (arccosine), arctan (arctangent), arccot (arcotangent), arcsec (arcsecant), arccsc (arccosecant), You may use theses functions in the expression of f(x) sinh (hyperbolic sine), cosh (hyperbolic cosine), tanh (hyperbolic tangent), coth (hyperbolic cotangent), sech (hyperbolic secante), csch (hyperbolic cosecant) You may use theses functions in the expression of f(x) asinh (inverse hyperbolic sine), acosh (inverse hyperbolic cosine), atanh (inverse hyperbolic tangent), acoth (inverse hyperbolic cotangent), asech (inverse hyperbolic secant), acsch (inverse hyperbolic cosecant)

## What is the Limit of a function ?

The limit of a function at a given point tells us about the behavior of that function when x approaches that point without reaching it.

Notation
If the limit of f(x) is equal to L when x tends to a, with a and L being real numbers, then we can write this as,,
lim_(x -> a) f(x) = L

This means that when x becomes very close to 'a' then, the value of f function becomes very close to L.

The above definition and notation remain valid if 'a' and/or "L" are replaced by positive infinity or negative infinity. For example,

lim_(x -> +oo) f(x) = L, means that when x becomes very large (tends to infinity), then the value of the function get very close to L (case of horizontal asymptote).

In the same way,
lim_(x -> a) f(x) = +oo, means that when x gets closer to 'a' then, the value of the function becomes bigger (tends to positive infinity, this is the case of a vertical asymptote).

## Left-hand and right-hand limits

In the above definition, we can distinguish two ways for x-values to tend to 'a' :
- x tends to 'a' from the right i.e. gets closer to 'a' while remaining greater than 'a', we note this x -> a+. The limit obtained in this case is called right-hand limit.
- Similarly, x can tend to 'a' from the left i.e. gets 'close' to 'a' while remaining less than a, we note this x -> a-. The limit obtained in this case is called left-hand limit.

This distinction is necessary because for some functions, the 'right-hand limit' can be different from the 'left-hand limit' at a certain x-value. Example :
lim_(x -> 0+) 1/x = +oo but lim_(x -> 0-) 1/x = -oo

So, lim_(x -> 0) 1/x is not defined. We can generalize this as follows,
(lim_(x -> a) f(x) = L) if and only if (lim_(x -> a+) f(x) = L) and (lim_(x -> a-) f(x) = L)

It is therefore important to check the limit at both sides.

## How to calculate the limit of a function ?

### Direct substitution calculation (case x -> a)

Direct substitution is the first technique to try, that is to replace x with 'a' to see how the function behaves at the neighborhood of 'a'. Direct substitution can lead to either a determinated form (or defined form) or an indeterminate form (or indefinite form). In the latter case, indeterminacy should be lifted by applying techniques such as simplification, conjugate multiplication, etc.

List of determinate forms
We note:
p (as positive) a non-zero positive real number,
n (as negative) a non-zero negative real number,
q (a non-zero number with undeterminated sign),
+oo, positive infinity,
-oo, nagative infinity,
oo, infinity (with undefined sign).

 +oo+oo = +oo -oo-oo = -oo q + (+oo) = +oo q + (-oo) = -oo
Determinate forms: multiplication and division
 +oo. +oo = +oo -oo. -oo = +oo p. (+oo) = +oo n. (+oo) = -oo p. (-oo) = -oo n. (-oo) = +oo (+oo)/p = +oo (+oo)/n = -oo (-oo)/p = -oo (-oo)/n = +oo q/oo = 0 0/oo = 0
Determinate forms with power operator
 0^(+oo) = 0 0^(-oo) = oo
List of indeterminate forms

 0/0 oo/oo +oo - oo oo/oo 0. oo 0^0 oo^0 1^oo
Here are the most used techniques to lift indeterminacy:
- Factor the term of the highest degree in a polynomial (case of a ratio of two polynomials)
- Factorize polynomials
- Apply a remarkable identity
- Apply the hospital rule that can be stated as follows:
lim_(x -> a) f(x) /g(x) = lim_(x -> a) frac {f'(x)} {g'(x)}

### Calculating a limit when x -> oo

In this case we replace x with infinite (precisely by large positive numbers for +oo and large negative numbers for -oo) to see the behavior of the function. Here are some examples:

n is a positive integer,
lim_(x -> +oo) 1/x^n = 0,
lim_(x -> -oo) 1/x^n = 0,
lim_(x -> +oo) x^n = +oo,
lim_(x -> -oo) x^n = +oo, if n is even
lim_(x -> -oo) x^n = -oo, if n is odd

## Simple examples of limit calculations

Example 1: a simple case of direct substitution

lim_(x -> 0) (x^2+1) = 1
When x is closer to 0, then x^2 also approaches 0 so x^2+1 is closer to 1.

Example 2: case of a determinated form (1/(0+) )

lim_(x -> 0) 1/x^2 = +oo
When x gets closer to 0, x^2 also approaches 0 (on the positive side because x^2 >= 0), so 1/x^2 becomes larges and tends to +oo.

Example 3: case of a determinated form (1/(+oo) )

lim_(x -> +oo) 1/(x+1) = 0,
When x becomes larger, 1/(x+1) becomes smaller and closer to 0.

## Examples of limit calculation with an indeterminate form

Example A: indeterminate form 0/0

Calculate lim_(x -> 1) (x-1)/(sqrt(x) -1)

The domain of definition is the set of positive reals, 1 being excluded.

Direct substitution gives us 0/0 but x = (sqrt(x)) ^2 so we can apply a remarkable identity:

f(x) =((sqrt(x)) ^2 -1)/(sqrt(x) - 1) = (((sqrt(x) -1) * (sqrt(x) +1))/(sqrt(x) - 1)) = sqrt(x) +1

By making a direct substitution, it is easy to deduce that

lim_(x -> 1) (x-1)/(sqrt(x) -1) = 2