### The Maxima on-line user's manual

Algebra Calculator

#### Limit

Function: limit (<expr>, <x>, <val>, <dir>)

Function: limit (<expr>, <x>, <val>)

Function: limit (<expr>) Computes the limit of <expr> as the real variable <x> approaches the value <val> from the direction <dir>. <dir> may have the value `plus` for a limit from above, `minus` for a limit from below, or may be omitted (implying a two-sided limit is to be computed).

`limit` uses the following special symbols: `inf` (positive infinity) and `minf` (negative infinity). On output it may also use `und` (undefined), `ind` (indefinite but bounded) and `infinity` (complex infinity).

`infinity` (complex infinity) is returned when the limit of the absolute value of the expression is positive infinity, but the limit of the expression itself is not positive infinity or negative infinity. This includes cases where the limit of the complex argument is a constant, as in `limit(log(x), x, minf)`, cases where the complex argument oscillates, as in `limit((-2)^x, x, inf)`, and cases where the complex argument is different for either side of a two-sided limit, as in `limit(1/x, x, 0)` and `limit(log(x), x, 0)`.

`lhospitallim` is the maximum number of times LHospitals rule is used in `limit`. This prevents infinite looping in cases like `limit (cot(x)/csc(x), x, 0)`.

`tlimswitch` when true will allow the `limit` command to use Taylor series expansion when necessary.

`limsubst` prevents `limit` from attempting substitutions on unknown forms. This is to avoid bugs like `limit (f(n)/f(n+1), n, inf)` giving 1. Setting `limsubst` to `true` will allow such substitutions.

`limit` with one argument is often called upon to simplify constant expressions, for example, `limit (inf-1)`.

`example (limit)` displays some examples.

For the method see Wang, P., "Evaluation of Definite Integrals by Symbolic Manipulation", Ph.D. thesis, MAC TR-92, October 1971.

There are also some inexact matches for `limit`. Try `?? limit` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

##### limit

limit (f(x),x,0,minus);

Calculate

##### limit

limit(x-1/x^2-4,x,0,p...

Calculate

##### limit

/*Estudia la continui...

Calculate

##### limit

/*Calcula los siguien...

limit((x-2)/(x+2),x,2);

limit((x^2-7*x+10)/(x...

Calculate

##### limit-sin

limit(sin(a*x)/(a*x),...

Calculate

##### limit

f(x) :=1/(1+2^(1/x));

limit(f(x),x,0.01);

Calculate

##### limit-sin

Ex: (3*(x-2)^3+1*(x-2...

Um: (1)/(x-2)^2;

EL: (0+Ex)^Um;

Calculate

##### limit-sin

Ex: (x^2-2*x)/(2*sin(...

Um: (50*x-20)/(x-2)^2;

EL: ((%pi-3)/(%pi)+Ex...

Calculate

##### limit-sin

limit((sin(2*x))/(x*(...

Calculate

##### limit-sin

Ax: (x^2-4*x+4)/(sin(...

Ch: (1)/(x-2)^3;

Jo: (0+Ax)^Ch;

Calculate