No history yet

Calculus Fundamentals

The Language of Change

Calculus is the mathematics of change. That's it. While algebra helps us solve for unknowns, calculus helps us understand how things change from one moment to the next. Think about a moving car. Its position is constantly changing. Calculus gives us the tools to describe its exact speed at any instant.

It's split into two main areas. Differential calculus cuts things into tiny pieces to find rates of change. Integral calculus joins those pieces up to see how much they accumulate. We'll focus on the first part: understanding change as it happens.

Getting Infinitely Close

Before we can talk about instantaneous change, we need to understand the idea of getting infinitely close to a value. This is called a limit.

Imagine you're walking towards a wall, and with each step, you cover half the remaining distance. You take a step, then another, then another. You get closer and closer, but you never actually touch the wall. The wall is your limit.

In math, a limit tells us what value a function approaches as its input gets closer and closer to a certain number. We don't care what happens at the number, just what happens nearby. We write it like this:

limxaf(x)=L\lim_{x \to a} f(x) = L

This reads: "The limit of the function f(x)f(x) as xx approaches aa equals LL."

When a function's limit at a point is the same as its actual value at that point, we say the function is continuous. It means the graph has no breaks, jumps, or holes. You can draw it without lifting your pencil.

The Derivative

A derivative is a specific kind of limit that measures an instantaneous rate of change. It tells us how fast something is changing at a single, precise moment.

Think back to the car. Your average speed for a trip is the total distance divided by the total time. But the number on your speedometer shows your instantaneous speed. That's a derivative. It tells you how fast your position is changing right now.

Graphically, the derivative of a function at a point gives us the slope of the line that just skims the curve at that one point. This is called the tangent line. A steep tangent line means a fast rate of change. A flat one means no change.

Lesson image

We find this slope by looking at the slope of a line between two points on the curve that are incredibly close together, and then using a limit to see what happens as the distance between them shrinks to zero. This gives us the formal definition of the derivative, noted as f(x)f'(x) (read "f prime of x") or dydx\frac{dy}{dx}:

f(x)=limh0f(x+h)f(x)hf'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}

The top part, f(x+h)f(x)f(x+h) - f(x), is the tiny change in the function's value (the rise). The bottom part, hh, is the tiny change in the input (the run). The derivative is just rise over run for an infinitely small step.

Differentiation Rules

Using the limit definition every time is a lot of work. Thankfully, mathematicians developed shortcuts for common functions. Here are a few essential ones.

The Power Rule This is for functions like x2x^2 or x5x^5. To find the derivative, you bring the exponent down as a multiplier and then subtract one from the original exponent. If f(x)=xnf(x) = x^n, then f(x)=nxn1f'(x) = nx^{n-1}.

For example, the derivative of f(x)=x3f(x) = x^3 is f(x)=3x31=3x2f'(x) = 3x^{3-1} = 3x^2.

Sum and Difference Rules You can take the derivative of each part of a function separately. If h(x)=f(x)+g(x)h(x) = f(x) + g(x), then h(x)=f(x)+g(x)h'(x) = f'(x) + g'(x).

So, to find the derivative of x3+5xx^3 + 5x, we find the derivative of x3x^3 (which is 3x23x^2) and the derivative of 5x5x (which is 55) and add them: 3x2+53x^2 + 5.

Product and Quotient Rules These are for when you're multiplying or dividing two functions. Product Rule: (f(x)g(x))=f(x)g(x)+f(x)g(x)(f(x)g(x))' = f'(x)g(x) + f(x)g'(x) Quotient Rule: $(\frac{f(x)}{g(x)})' = \frac{f'(x)g(x) - f(x)g'(x)}{[g(x)]^2}

Functions Inside Functions

What happens when you have a function nested inside another one? For example, how would you find the derivative of h(x)=(x2+1)3h(x) = (x^2 + 1)^3?

This is a composite function. The "outer" function is ()3(\cdot)^3, and the "inner" function is x2+1x^2+1. To solve this, we need a special tool.

Chain Rule

noun

A formula to compute the derivative of a composite function. It states that the derivative of f(g(x)) is f'(g(x)) multiplied by g'(x).

The chain rule tells us to take the derivative of the outer function (while leaving the inner function alone), and then multiply it by the derivative of the inner function.

Let's write it out. If h(x)=f(g(x))h(x) = f(g(x)), then:

h(x)=f(g(x))g(x)h'(x) = f'(g(x)) \cdot g'(x)

The chain rule is the most important rule for taking derivatives.

Let's apply this to our example: h(x)=(x2+1)3h(x) = (x^2+1)^3.

  1. Outer function: f(u)=u3f(u) = u^3. Its derivative is f(u)=3u2f'(u) = 3u^2.
  2. Inner function: g(x)=x2+1g(x) = x^2+1. Its derivative is g(x)=2xg'(x) = 2x.

Now, we multiply them together, substituting the inner function back in for uu:

h(x)=f(g(x))g(x)=3(x2+1)2(2x)=6x(x2+1)2\begin{aligned} h'(x) &= f'(g(x)) \cdot g'(x) \\ &= 3(x^2+1)^2 \cdot (2x) \\ &= 6x(x^2+1)^2 \end{aligned}

The chain rule is incredibly powerful because it lets us break down complex, nested functions into manageable pieces. This simple idea is a cornerstone of how neural networks learn, a process we'll explore next.

Quiz Questions 1/6

Calculus is primarily the mathematics of...

Quiz Questions 2/6

A limit tells us the value a function _______ as its input gets closer to a certain number.