C.W.K.
Stream
Lesson 01 of 05 · published

Calculus's Only Trick: It's About Change

~8 min · calculus, change, derivative

Level 0Math Novice
0 XP0/59 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

Don't Be Intimidated

Calculus has one gimmick. It is the math of change. Anything that varies — a position over time, a loss over weight values, a price over interest rates — has calculus inside it.

The two halves:

  • Differentiation — given a function, what's its slope at a point? How fast is it changing right now?
  • Integration — given a rate of change, what's the accumulated total? How much of "change" has piled up?

That's it. That's all of calculus, distilled. The rest is technique for computing the slopes and totals of specific kinds of functions.

Why AI Doesn't Care About Most of Calculus

Most calculus textbooks teach you how to find derivatives by hand for specific function families (polynomials, trig, exponentials). AI doesn't need this. PyTorch's autograd computes derivatives automatically by tracking operations. What you actually need is the intuition: what does a derivative mean, when do gradients vanish, why does the chain rule matter?

Calculus is about change. Differentiation reads the rate of change; integration sums it up. Modern AI cares about the first far more than the second, and never makes you compute it by hand.

Code

No hand calculation needed·python
import torch

# Autograd computes derivatives automatically
x = torch.tensor(3.0, requires_grad=True)
y = x ** 2 + 2 * x + 1            # y = (x + 1)^2

y.backward()
print(f"dy/dx at x=3: {x.grad.item()}")    # 8.0 (= 2x + 2 evaluated at x=3)

External links

Exercise

Use PyTorch autograd to find the derivative of y = x^3 - 2x at x = 2. Confirm by hand: dy/dx = 3x^2 - 2, so at x=2 it's 10.
Hint
x = torch.tensor(2.0, requires_grad=True); y = x**3 - 2*x; y.backward(); print(x.grad). Should print 10.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.