MATLAB Answers

finding limits of two variables

303 views (last 30 days)
Nishanth G
Nishanth G on 3 Jan 2021
Answered: Rishabh Mishra on 7 Jan 2021
Check the Limits and continuity for functions
Lim [(x*(y-1))/(y*(x-1))]
as x -> 1 and y ->1
please help me solve this i am still learning matlab.

Answers (2)

Priysha LNU
Priysha LNU on 7 Jan 2021
When you have TWO variables, what matters is along which path you follow to get to that limit. ONLY if the limits exists along every path, and the limit is the same along every such path to the limit point can we say that the limit exists.
If the function is continuous at the point you're interested in, it is sufficient to apply limit() to any 1-dimensional path approaching that point. E.g., to find the limit of
as x,y-->0 you can take the 1-dimensional path x(t)=y(t)=t and reduce f to
Then, apply limit() to this 1D function of t as t-->0.
However, your example
is not continuous at x=y=0, so the limit is not defined there. Along x(t)=y(t)=t, the function converges to 1. If there is a particular path you know you are interested in, though, you could still apply limit() to that path.
In another note, if you wish to gain proficiency w.r.t. calculating limits of functions in multiple variables, I suggest spending some time over this area of mathematics. A quick google search landed me the following link which might be helpful:,of%20(a%2Cb).
Hope this helps!
DISCLAIMER: These are my own views and in no way depict those of MathWorks.

Rishabh Mishra
Rishabh Mishra on 7 Jan 2021
To evaluate this limit, you will need to implement 2-variable functions using Symbolic Math Techniques. I have described the steps below to evaluate the limit.
syms x y;
f = (x*(y-1))/(y*(x-1));
Create a function with variables x & y. Declare symbolic variables x, y.
Since variables x & y tend to same number. Replace these variables by another variable u.
syms u;
f = subs(f,[x y],[u u]);
Now, tend the variable ‘u’ to original number (u -> 1). This is achieved using ‘limit’ function as demonstrated below:
value = limit(f,u,1);
Hope this helps.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by