Function reference · Calculus
limit
Computes the limit of an expression as a variable approaches a value.
It handles removable singularities, 0/0 and ∞/∞ forms, and the growth of polynomials, logarithms and exponentials. For a one-sided limit, pass left or right.
If it can't find the limit, the call is returned unevaluated.
Notation
limit(expression, variable, value[, direction])
Write it in an expression: nerdamer('limit(sin(x)/x,x,0)'), or in the Playground.
nerdamer.limit
nerdamer.limit(expr: ExpressionInput, x: ExpressionInput, val: ExpressionInput, dir: LimitDir, depth: number): Expression
A method on the default import. Arguments can be strings, as in Notation.
import { limit }
import { limit } from 'nerdamer/calculus';
limit(expr: ExpressionInput, x: ExpressionInput, val: ExpressionInput, dir: LimitDir, depth: number): Expression
Import only this function, from nerdamer/calculus.
Parameters
expression- Expression whose limit should be evaluated.
variable- Variable approaching the requested value.
value- Value approached by the variable.
direction- Optional one-sided or two-sided limit direction.
Examples
Leading terms decide the limit at infinity.
limit((4*x^2-x)/(3*x^2+x),x,Infinity)
// → 4/3Open in PlaygroundThe two sides differ, so there is no limit: unevaluated.
limit(1/x,x,0)
// → limit(x^-1, x, 0, both)Open in PlaygroundGood to know
- The variable is local to the call: a value stored under its name, as in
x:5, isn't substituted inside it.
