A limit is what a function approaches as we get infinitely close to a point. It’s the mathematical tool that lets us handle “impossible” calculations like instantaneous velocity or infinite sums.

Impossible calculations break standard math rules or lead to undefined results, but limits provide a way to resolve them:

  • Division by zero: Happens when trying to compute things like instantaneous speed at a single moment, where distance and time are both zero.
  • Infinite processes: Calculations that involve something endless, like adding numbers forever or measuring over an infinite range. The gist is that even though you can’t finish the process, if the result gets closer and closer to a specific number (instead of just growing bigger forever), that specific number is the limit. For example, adding keeps getting closer to , so the limit is . Limits turn these endless things into a usable, finite value.

As an example, take a game where a bullet is fired from a gun with some initial speed. At the exact moment it’s fired (time = 0), the bullet hasn’t moved yet, so the distance traveled is 0 and time is 0. You can’t calculate speed as distance/time because that gives , which is undefined.

But you can look at what happens just a tiny bit later:

  • After a small time interval (say 0.1 seconds), the bullet has moved a small distance (say 1 meter). Average speed = m/s.
  • Make even smaller (0.01 seconds), distance might be 0.1 meters. Average speed = m/s.
  • Even smaller (0.001 seconds), distance 0.01 meters. Average speed = m/s.

As you make smaller and smaller (approaching 0), the average speed gets closer and closer to 10 m/s. That value it approaches (10 m/s) is the limit; the bullet’s exact speed at the very moment it’s fired, even though you can’t directly compute it at time = 0.

Why Care About Limits?

Limits are essential for simulating realistic physics in video games, allowing us to approximate continuous processes in a digital world.

In game engines like Unity, the physics timestep (e.g., Time.fixedDeltaTime) controls how finely we discretize time. Smaller steps yield more accurate simulations, approaching the continuous limit of perfect physics, but at a performance cost. This directly relates to limits by getting closer to the “instantaneous” behavior as the step size approaches zero.

A Simple Limit Example

Let’s break down a classic limit problem step by step. We’ll start with the basics and explain every part.

The problem is:

This notation means: “As gets very close to 2 (but doesn’t equal 2), what value does the fraction approach?”

Step 1: Try Direct Substitution

Meaning plug in the number we’re approaching (here, ) directly into the fraction.

  • Numerator (top part): when :

  • Denominator (bottom part): when :

So we get:

And we obviously can’t divide by zero.

Step 2: Recognize the Difference of Squares

The numerator is . This is a difference of squares pattern: .

Here, is (so ), and is (so ).

So:

Verification: .

Or just use a calculator: limit((x^2-4)/(x-2), x, 2)
This returns 4, confirming our result.

What Does This Mean?

The limit is , meaning as gets closer and closer to 2, the fraction gets closer and closer to . However, at exactly , the original fraction is undefined (because of division by zero). The limit tells us the “trend” or “approach” value, not the actual value at that point.