Simple limit returning NaN: f(x) = exp(-1/x)
조회 수: 11 (최근 30일)
이전 댓글 표시
By intuition and some opinions on Mathstack the limit of this function should be coming close to 0.
However
syms x; limit(exp(-1/x),x,0)
holds another solutions. So?
댓글 수: 1
채택된 답변
John D'Errico
2021년 4월 12일
편집: John D'Errico
2021년 4월 12일
Think of it like this. For a limit to exist at x==0, it MUST have the same limit as x approaches 0 from above, as it does when x approaches 0 from below.
Is that true? For positive values of x, we can just try a few.
format short g
x = 10.^(-6:1)
exp(-1./x)
And clearly that seems to approach 0 for small positive values of x. Intuitively, we can guess the limit is zero from above.
syms X
limit(exp(-1/X),X,0,'right')
As you can see, MATLAB agrees with that. But what happens when x is negative?
x = -0.1;
exp(-1/x)
Now when x is a small NEGATIVE number, then -1/x is a large positive number. The limit would seem unlikely to be zero when taken from below.
limit(exp(-1/X),X,0,'left')
MATLAB agrees with that claim. So the limit is inf when viewed from the left. And as I said, if the limit differs when viewed from different directions, the limit is undefined at that point. If that is the case, then the limit is only defined when viewed from a specific direction.
So don't believe everything you read on the internet, it is not always correct. Whoever claimed that on Mathstack was simply wrong, or perhaps you read what they said incorrectly.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Assumptions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!