Is it possible to find the limit as a function approaches a complex number?

Hello
I am trying to find the limit of a function as it approaches a complex number but I get an error that says "Limit Points must be real, 'infinity', or '-infinity'". Does anyone know if there are work arounds for complex limits in matlab or if this is just not a supported functinality of the software?
syms m2
limit(m2,m2,complex(1,1))
Here is some small sample code that produces the same error I am encountering.
Here is some context for the problem I am working on for those who might be interested.

 Accepted Answer

The MATLAB limit function calculates the limit from below and the limit from above, and tells you the limit is undefined if the two are not equal.
If you were working with complex numbers then there are not just two directions to consider, there are an infinite number of directions to consider. Complex numbers can be characterized by magnitude and angle, and in a limit you would shrink the magnitude towards 0 but that leaves open all angles. The limit along angle π/5 might be different than the limit along 3π/11 or π+1/18. So taking a complex limit turns into a proof that the limit does not vary with complex angle, rather than simply evaluating the limit at two specific angles and comparing them.

8 Comments

Hi Walter,
Thank you for the response. Provided I know that the limit does not vary with complex angle, could I still implement Matlab's limit function?
Provided I know that the limit does not vary with complex angle, could I still implement Matlab's limit function?
As long as the limit point is real: yes. Because the limit point is approached only from the real axis.
An example:
syms z
F=1/(z-1)^2+3/(z-1)+5/(z+1i)+6/(z-1i)^2+1/(z-2)^2+1/(z-2) % original function,
F = 
f1=(z+1i)*F % I want to cancel (z+1i) term in denominator, by multiplying F,
f1 = 
f1=simplify(f1) % the term (z+1i) still there in denominator, although can be
f1 = 
% cancelled manually,
L1=limit(f1,z,sym(-1))
L1 = 
L2=limit(f1,z,sym(-1i))
Error using symengine
Limit points must be real, 'infinity', or '-infinity'.

Error in sym/limit (line 62)
rSym = mupadmex('symobj::map', args{1}.s, 'symobj::limit', args{2}.s, args{3}.s, dir);
If you can make the imaginary component into a constant then you can subs() in, giving you a limit point that is real-valued. The restriction is not on taking the limit of a complex-valued function: the restriction is about taking the limit at a complex point.
syms z
syms zr zi real
F=1/(z-1)^2+3/(z-1)+5/(z+1i)+6/(z-1i)^2+1/(z-2)^2+1/(z-2) % original function,
F = 
f1=(z+1i)*F % I want to cancel (z+1i) term in denominator, by multiplying F,
f1 = 
f1=simplify(f1) % the term (z+1i) still there in denominator, although can be
f1 = 
% cancelled manually,
f2 = simplify(subs(f1, z, zr + 1i*1))
f2 = 
limit(f2, zr, 1)
ans = 
But the formula has where appears to refer to the roots of the quintic polynomial (or possibly the bi-quintic one). Complex conjugates are specifically mentioned, so those are not real roots; and the two members of the complex conjugate are different complex angles.
You can fix the real part and take the limit along the imaginary axes if you do a substitution
syms z
syms zr zi real
F=1/(z-1)^2+3/(z-1)+5/(z+1i)+6/(z-1i)^2+1/(z-2)^2+1/(z-2) % original function,
F = 
f1=(z+1i)*F % I want to cancel (z+1i) term in denominator, by multiplying F,
f1 = 
f1=simplify(f1) % the term (z+1i) still there in denominator, although can be
f1 = 
% cancelled manually,
f2 = simplify(subs(f1, z, 1 + 1i*zi))
f2 = 
limit(f2, zi, 1)
ans = 
limit(f2, zi, -1)
ans = 
And notice those are different -- so the general complex limit does not exist for this particular function, as it varies with complex angle.
And notice those are different -- so the general complex limit does not exist for this particular function, as it varies with complex angle.
No. The first value is f1(1+i), the second f1(1-i):
syms z
F=1/(z-1)^2+3/(z-1)+5/(z+1i)+6/(z-1i)^2+1/(z-2)^2+1/(z-2); % original function,
f1=(z+1i)*F; % I want to cancel (z+1i) term in denominator, by multiplying F,
subs(f1,z,1+i)
ans = 
subs(f1,z,1-i)
ans = 
The user indicated "Provided I know that the limit does not vary with complex angle" but 1-1i and 1+1i can be interpreted as being different complex angles with the same magnitude . If the limit at 1-1i is different than the limit at 1+1i then the hypothesis that the limit does not vary with complex angles is incorrect for the function being examined.
Read diagonally the debate it looks like there is a confusion by Walter of
  • the limit directional about a single point (even it's the same does NOT ensure the limits to a value) and
  • argument (angle) of two points related to the origin of complex plane.
Those are entirely different.

Sign in to comment.

More Answers (1)

If seem that what you want can be derived from the the Laurent series of G about p_i
I have no idea if Matlab symbolc can compute Laurent series (I don't have the toolbox, but I see it mentions in taylor document page)

Products

Release

R2021b

Community Treasure Hunt

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

Start Hunting!