Compute Multi-Variable Limits using MATLAB

2 visualizaciones (últimos 30 días)
Kevin Bachovchin
Kevin Bachovchin el 29 de Ag. de 2013
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

Respuesta aceptada

Matt J
Matt J el 29 de Ag. de 2013
Editada: Matt J el 29 de Ag. de 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 comentarios
Kevin Bachovchin
Kevin Bachovchin el 4 de Sept. de 2013
Editada: Kevin Bachovchin el 4 de Sept. de 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 el 4 de Sept. de 2013
Editada: Matt J el 4 de Sept. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by