Hmmm, this is a CAS-related problem; I'm afraid that has nothing to do with CPLua . Anyway, you can compute "multidimensional" limits by using nested limits in the CAS. For example,limit[multi] - multidimensional limits
Given a set of points as its second argument,
limit attempts to compute the limiting value of f in a multidimensional space.
lim(lim(x+1/y,x,0),y,infinity)computes the limit of x+1/y as x goes to 0 and y goes to infinity.
Warning:, nested limits don't always give the correct result, if it is undeterminate. You have to think the order of limits to be computed thoroughly. For example, suppose that you want to compute the limit of x*y ax x goes to 0, and y goes to infinity. In this case,
lim(lim(x*y,x,0),y,infinity)returns 0, which is wrong. This is not a bug, it's due to the order of the limits computed (you can easily realize why it gives 0). However,
lim(lim(x*y,y,infinity),x,0)returns "Undefined", and it is correct.
Well, this problem can be solved numerically, but, again, this has nothing to do with CPLua as well. Furthermore, to the best of my knowledge, there is no robust numerical method for this; how one can test dicontinuity numerically over all reals?Continuity testing :
discont - Find the Discontinuities of a Function over the Reals
fdiscount - Numerically find the discontinuities of a function over the Reals
iscont - test continuity on an interval