Limits
To compute a limit, you must specify a functional expression, a variable,
and a limiting value for that variable. If you do not specify a direction,
Axiom attempts to compute a two-sided limit.
Issue this to compute the limit of (x^2-2*x+2)/(x^2-1) as x approaches 1.
Sometimes the limit when approached from the left is different from the
limit from the right and, in this case, you may wish to ask for a one-sided
limit. Also, if you have a function that is only defined on one side of a
particular value, you can compute a one-sided limit.
The function log(x) is only defined to the right of zero, that is, for
x>0. Thus, when computing limits of functions involving log(x), you probably
want a "right-hand" limit.
When you do not specify "right" or "left" as the optional fourth argument,
limit tries to compute a two-sided limit.
Here the limit from the left does not exist, as Axiom indicates when you
try to take a two-sided limit.
A function can be defined on both sides of a particular value, but tend to
different limits as its variable approaches that value from the left and
from the right. We can construct an example of this as follows: Since
sqrt(y^2) is simply the absolute value of y, the function sqrt(y^2)/y is
simply the sign (+1 or -1) of the nonzero real number y. Therefore,
sqrt(y^2)/y=-1 for y<0 and sqrt(y^2)/y=+1 for y>0. This is what happens
when we take the limit at y=0. The answer returned by Axiom gives both a
"left-handed" and a "right-handed" limit.
Here is another example, this time using a more complicated function.
You can compute limits at infinity by passing either "plus infinity" or
"minus infinity" as the third argument of limit.
To do this, use the constants %plusInfinity and %minusInfinity.
You can take limits of functions with parameters. As you can see, the limit
is expressed in terms of the parameters.
When you use limit, you are taking the limit
of a real function of a real variable. When you compute this, Axiom returns
0 because, as a function of a real variable, sin(1/z) is always between -1
and 1, so z*sin(1/z) tends to 0 as z tends to 0.
However, as a function of a complex variable, sin(1/z) is badly behaved
near 0 (one says that sin(1/z) has an essential singularlity at z=0). When
viewed as a function of a complex variable, z*sin(1/z) does not approach any
limit as z tends to 0 in the complex plane. Axiom indicates this when we
call complexLimit.
You can also take complex limits at infinity, that is, limits of a function
of z as z approaches infinity on the Riemann sphere. Use the symbol
%infinity to denote "complex infinity". As above, to compute complex limits
rather than real limits, use complexLimit.
In many cases, a limit of a real function of a real variable exists when
the corresponding complex limit does not. This limit exists.
But this limit does not.