comparison of two functions

Jul 23, 2025
Updated 1 day ago
2 min read

Growth Comparison of Functions Explained | Notehub

In algorithm analysis, growth comparison of functions is the foundation of understanding how efficiently an algorithm scales. Given two functions and, we want to know — as input size grows to infinity — which one grows faster, slower, or at the same rate?

This is essential mathematics for asymptotic notation (Big-O, Θ, Ω) and directly applies when comparing algorithms like merge sort vs quick sort.


Growth Comparison: The Limit Method

The standard tool for growth comparison of two functions is:

The result of this limit tells us the relationship between their orders of growth:

Result

Meaning

has a smaller order of growth than

(constant)

has the same order of growth as

has a larger order of growth than

This limit-based growth comparison directly maps to asymptotic classes:

  • Result (little-o)

  • Result

  • Result (little-omega)


Worked Example: Growth Comparison of and

Let:

Direct substitution gives — an indeterminate form. We apply L'Hôpital's Rule.


Applying L'Hôpital's Rule

L'Hôpital's Rule states: if direct substitution yields or, differentiate numerator and denominator separately and re-evaluate the limit.

Differentiating the Numerator

Using the product rule on:

Convert to natural log:

So the numerator derivative:

Differentiating the Denominator

After First L'Hôpital

Still — apply L'Hôpital's Rule a second time.


Second Application of L'Hôpital's Rule

Differentiating the Numerator

Differentiating the Denominator

Final Limit

As, the denominator grows without bound while the numerator stays 1:


Result and Interpretation

Since the limit:

In asymptotic terms:

This makes intuitive sense — exponential functions like always dominate polylogarithmic functions like as grows large. This is why exponential-time algorithms are considered infeasible for large inputs in algorithm design, while algorithms like merge sort and quick sort are considered efficient.


Quick Reference: Common Growth Order (Slowest to Fastest)

Function

Name

Constant

Logarithmic

Linear

Linearithmic

Quadratic

Exponential

Factorial

Each row dominates all rows above it in growth rate — exactly what the limit-based growth comparison method formally proves.


Related Notes:

Asymptotic Notation

Quick Sort

Merge Sort

Binary Search Recurrence