0
$\begingroup$

I'm trying to write a function to calculate the limit of a function on a number of variables in sequence.
Here I take a function with four variables x, y, z, t but the number of variables is not fixed.
How can I do that?

Limit[f[x,y,z,t], {x->x0, y->y0, z->z0, t->t0}] = Limit[Limit[Limit[Limit[f[x,y,z,t], {x->x0}],{y->y0}],{z->z0}],t->t0] 
$\endgroup$
2
$\begingroup$

Try defining this recursively:

MyLimit[expression_, {initialVariables__, x_ -> x0_}] := 
 Limit[MyLimit[expression, {initialVariables}], {x -> x0}]

MyLimit[expression_, {x_ -> x0_}] := Limit[expression, {x -> x0}]
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.