Compute Multi-Variable Limits using MATLAB

3 visualizzazioni (ultimi 30 giorni)
Hello,
I know I can compute one variable limits using the "limit" function. Is there anyway I can compute multi-variable limits in MATLAB? For example if I have the function f = x^2/y and I want to compute the limit as x and y go to zero.
Thank you, Kevin

Risposta accettata

Matt J
Matt J il 29 Ago 2013
Modificato: Matt J il 29 Ago 2013
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
f(x,y)=x.^2+y.^2
as x,y-->0 you can take the 1-dimensional path x(t)=y(t)=t and reduce f to
f(x(t),y(t))=2*t.^2
Then, apply limit() to this 1D function of t as t-->0.
However, your example f=x^2/y is not continuous at x=y=0, so the limit is not defined there. Along x(t)=y(t)=t, the function approaches zero. Along the path x(t)=sqrt(t), y(t)=t the function converges to 1. Along the path x(t)=t, y(t)=t.^3 the function approaches Inf. If there is a particular path you know you are interested in, though, you could still apply limit() to that path.
  8 Commenti
Kevin Bachovchin
Kevin Bachovchin il 4 Set 2013
Modificato: Kevin Bachovchin il 4 Set 2013
Matt, thanks for your help. I understand what you are saying, but my example is a bit more complicated and I'm not sure if L'Hopital Rule is valid here.
My differential equations are
dq/dt = i;
di/dt = -A*i-B*q+C*u
where A,B,and C are known positive constants and the control variable u is governed by
u = -D*i-E*q/i
where D and E are known positive constants
What I'm looking to do is find a value for u in the limit where q and i approach 0 because since the denominator is 0, this produces a MATLAB divide by zero error.
For finding the limit of u, when I take the derivatives of the numerator and the denominator on the right hand side, the derivative of the denominator is also function of u.
u = -E*dq/dt / di/dt
= -E*i / (-A*i-B*q+C*u)
Is L'Hopital's rule still valid in this case? If so, how do I proceed?
Matt J
Matt J il 4 Set 2013
Modificato: Matt J il 4 Set 2013
So, the problem is to find the limit of q/i. if lim q/i = 0 then you know that lim u = 0 and we're done.
I'll now prove, by contradiction, that it is impossible for q/i to converge to anything but zero. Assume, aiming for a contradiction, that q/i has a non-zero limit point L~=0 for some sequence of times t_n, where t_n --> infinity as n--->infinity. Then lim_n i/q = 1/L and combining with L'Hopital's rule
1/L = lim_t di/dt / dq/dt
= lim_t(-A*i-B*q-C*D*i-C*E*q/i) / i
= -A-B*L-C*D - C*E*L*lim_t(1/i)
But the limit on the RHS is infinite, assuming C*E~=0, whereas the LHS is finite. This establishes a contradiction. So, q/i--->0 and you're done.
I don't know, however, if knowing the limit really helps you. Even if you know the limit, you do not know how fast it gets there, so you don't know at what t it is possible to start approximating q/i by its limit and with what accuracy.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by