Exploring the Concept of Limits

April 30, 2023

Introduction

Nowadays, knowledge of machine learning is very important for a software engineer, but machine learning is not a fundamental subject of mathematics like Calculus or Linear Algebra.

If you know PyTorch, one of the machine learning frameworks, you will read the Calculus, Linear Algebra and Probability in the official document, e.g. How does PyTorch compute the conjugate Wirtinger derivative, torch.linalg.qr and ExponentialFamily

So, I decide to write a series of blog posts called 'Before Machine Learning', forcing to summarise the key concepts.

Definition

  • Definition of limxaf(x)=L\lim\limits_{x \to a} f(x) = L

    \forall ϵ>0\epsilon > 0, \exist δ>0\delta > 0 \ni if 0<xa<δ0 < |x - a| < \delta then f(x)L<ϵ|f(x) - L| < \epsilon

  • Definition of lim(x, y)(a, b)f(x, y)=L\lim\limits_{(x,\ y) \to (a,\ b)} f(x,\ y) = L

    \forall ϵ>0\epsilon > 0, \exist δ>0\delta > 0 \ni if (x, y)(x,\ y) \in D and 0<(xa)2+(yb)2<δ0 < \sqrt{(x - a)^2 + (y - b)^2} < \delta then f(x, y)L<ϵ|f(x,\ y) - L| < \epsilon, D is a Domain of f(x, y)f(x,\ y)

Limit of Function

  • limxa+f(x)=L1\lim\limits_{x \to a^+} f(x) = L_1, limxaf(x)=L2\lim\limits_{x \to a^-} f(x) = L_2, f(a)=L0f(a) = L_0 (or f(a)f(a) doesn't exist)

  • limxaf(x)=limxa+f(x)=limxaf(x)=L3\lim\limits_{x \to a^-} f(x) = \lim\limits_{x \to a^+} f(x) = \lim\limits_{x \to a} f(x) = L_3, f(a)L3f(a) \neq L_3

  • limxaf(x)=limxa+f(x)=limxaf(x)=f(a)=L4\lim\limits_{x \to a^-} f(x) = \lim\limits_{x \to a^+} f(x) = \lim\limits_{x \to a} f(x) = f(a) = L_4

Limit Laws

  • limxa(cf(x))=climxaf(x)\lim\limits_{x \to a} (c \cdot f(x)) = c \cdot \lim\limits_{x \to a} f(x), cc is a scalar.

  • limxa(f(x)+g(x))=limxaf(x)+limxag(x)\lim\limits_{x \to a} (f(x) + g(x)) = \lim\limits_{x \to a} f(x) + \lim\limits_{x \to a} g(x)

  • limxa(f(x)g(x))=limxaf(x)limxag(x)\lim\limits_{x \to a} (f(x) - g(x)) = \lim\limits_{x \to a} f(x) - \lim\limits_{x \to a} g(x)

  • limxa(f(x)g(x))=limxaf(x)limxag(x)\lim\limits_{x \to a} (f(x) \cdot g(x)) = \lim\limits_{x \to a} f(x) \cdot \lim\limits_{x \to a} g(x)

  • limxaf(x)g(x)=limxaf(x)limxag(x)\lim\limits_{x \to a} \frac{f(x)}{g(x)} = \frac{\lim\limits_{x \to a} f(x)}{\lim\limits_{x \to a} g(x)}, limxag(x)0\lim\limits_{x \to a} g(x) \neq 0

Continuity

f(x, y)f(x,\ y) is continuous at every point (a, b)(a,\ b) in the domain if lim(x, y)(a, b)f(x, y)=f(a, b)\lim\limits_{(x,\ y) \to (a,\ b)} f(x,\ y) = f(a,\ b)

Asymptotes

  • Horizontal Asymptotes

    y=Ly = L if limxf(x)=L\lim\limits_{x \to \infty} f(x) = L or limxf(x)=L\lim\limits_{x \to -\infty} f(x) = L

  • Vertical Asymptotes

    x=Lx = L if limxL±f(x)=±\lim\limits_{x \to L^\pm} f(x) = \pm\infty

  • Slant Asymptotes

    y=mx+by = mx + b if limx(f(x)(mx+b))=0\lim\limits_{x \to \infty} (f(x) - (mx + b)) = 0 or limx(f(x)(mx+b))=0\lim\limits_{x \to -\infty} (f(x) - (mx + b)) = 0

The Sandwich Theorem

xa\forall x \to a, if f(x)h(x)g(x)f(x) \le h(x) \le g(x) and limxaf(x)=limxag(x)=L\lim\limits_{x \to a} f(x) = \lim\limits_{x \to a} g(x) = L, then limxah(x)=L\lim\limits_{x \to a} h(x) = L

The Intermediate Value Theorem

If ff is continuous on [a, b][a,\ b], f(a)<N<f(b)f(a) < N < f(b) or f(b)<N<f(a)f(b) < N < f(a), then \exist c (a, b)f(c)=N\in (a,\ b) \ni f(c) = N

Derivative

  • Derivative of a function f(a)f(a)

    f(a)=limh0f(a+h)f(a)hf'(a) = \lim\limits_{h \to 0} \frac{f(a + h) - f(a)}{h}

  • Derivative of a function f(a, b)f(a,\ b)

    fx(a, b)=limh0f(a+h, b)f(a, b)hf_x(a,\ b) = \lim\limits_{h \to 0} \frac{f(a + h,\ b) - f(a,\ b)}{h}

    fy(a, b)=limh0f(a, b+h)f(a, b)hf_y(a,\ b) = \lim\limits_{h \to 0} \frac{f(a,\ b + h) - f(a,\ b)}{h}

Conclusion

In this post you know about the relationship between limit and derivative. It is one of the key concepts in calculus. Thank you for reading and see you soon.


Profile picture

Written by Gapry, 魏秋
Twitter | GitHub | Facebook | Mastodon