Calculus examples are boring. "Hey kids! Ever wonder about the distance, velocity, and acceleration of a moving particle? No? Well you're locked in here for 50 minutes!"

I love physics, but it's not the best lead-in. It makes us wait till science class (9th grade?) and worse, it implies calculus is "math for science class". Couldn't we introduce the themes to 5th graders, and relate it to everyday life?

I think so. So here's the goal:

- Use money, not physics, to introduce calculus concepts
- Explore how patterns relate (bank account to salary; salary to raises)
- Use our intuition to explore potential issues (can we keep drilling into patterns?)

Strap on your math helmet, time to dive in.

## Money money money

My favorite calculus example is the relationship between your bank account, salary, and raises.

Here's Joe ("*Hi, Joe*"). You, the sly scoundrel you are, sneak onto Joe's computer and monitor his bank account each week. What can you learn?

Ack. Clearly, not much happened -- Joe isn't earning anything. And what if you see this?

Easy enough: Joe's making some money. And how much? With a quick subtraction, we can figure out his weekly paycheck. Turns out Joe is making a steady $100/week.

- Key idea: If I know your bank account, I know your salary

The bank account is *dependent* on the salary -- it changes because of the weekly salary.

## Raise the roof

Let's go deeper: knowing the salary, what else can we figure out? Well, the salary is another pattern to analyze -- we can see if it changes! That is, we can tell if Joe's salary is changing week by week (is he getting a raise?).

The process:

- Look at Joe's weekly bank account
- Take the difference in bank account to get the weekly salary
- Take the difference in salary to get the weekly raise (if any)

In the first example ($100/week), it's clear there's no raise (sorry, Joe). The main idea is to "take the difference" to analyze the first pattern (bank account to salary) and "take the difference again" to find yet another pattern (salary to raise).

## Working backwards

We just went "down", from bank account to salary. Does it work the other way: knowing the salary, can I predict the bank account?

You're hesitating, I can tell. Yes, knowing Joe gets $100/week is nice. But... don't we need to know the starting account balance?

Yes! The *changes* to his account (salary) is not enough -- where did it start? For simplicity (i.e., what you see in homework problems) we often assume Joe starts with $0. But, if you are actually making a prediction, you want to know the initial conditions (the "+ C").

## A More Complex Pattern

Let's say Joe's account grows like this: 100, 300, 600, 1000, 1500...

What's going on? Is it random? Well, we can do our week-by-week subtraction to get this:

Interesting -- Joe's income is changing each week. We do another week-by-week difference and get this:

And yep, Joe's getting a steady raise of $100/week. Let's get wild and chart them on the same graph:

One way to think about it: Joe gets a raise each week, which changes his salary, which changes his bank account. As the raises continue to appear, his salary continues to increase and his bank account rises. You can almost think of the raise "pushing up" the salary, which "pushes up" the bank account.

## So... Where's the Calculus?

What's the formula for Joe's bank account for any week? Well, it's the sum of his salaries up to that point:

100 + 200 + 300 + 400... = 100 * n * (n + 1)/2

The formula for adding up a series of numbers (1 + 2 + 3 + 4...) is very close to n^2/2, and gets closer as the number of steps increases.

This is our first "calculus" relationship:

- A constant raise ($100/week) leads to a...
- Linear increase in salary (100, 200, 300, 400) which leads to a...
- Quadratic (something * n^2) increase in bank account (100, 300, 600, 1000... you see it curve!)

Now, why is it roughly 1/2 * n^{2} and not n^{2}? One intuition: The linear increase in salary (100, 200, 300) gives us a triangle. The area of the triangle represents all the payments so far, and the area is 1/2 * base * height. The base is n (the number of weeks) and the height (income) is 100 * n.

Geometric arguments get more difficult in higher dimensions -- just because we *can* work out 2*100 with addition doesn't mean it's the easiest way. Calculus gives us the rules to jump between patterns (taking derivatives and integrals).

## Points to Explore

Our understanding of bank accounts, salaries, and raises lets us explore deeper.

**Could we figure out the total earnings between weeks 1 and 10?**

Sure! There's two ways: we could add up our income for each week (week 1 salary + week 2 salary + week 3 salary...) or just subtract the bank account (Week 10 bank account - week 1 bank account). This idea has a beefy name: the Fundamental Theorem of Calculus!

**Can we keep going "down" (taking derivatives) beyond the raise?**

Well, why not? If the raise is $100/week, if we take the difference again we see it drops to 0 (there is no "raise raise", aka the raise is always steady). But, we can imagine the case where the raise itself is raising (week1 raise = 100, week2 raise = 200). Using our intuition: if the "raise raise" is constant, the raise is linear (something * n), the income is quadratic (something * n^{2}) and the bank account is cubic (something * n^{3}). And yes, it's true!

**Can derivatives go on forever?**

Yep. Maybe the connection is bank account => salary => raise => inflation => milk output of Farmer Joe's cow => how much Joe feeds the cow each week. Many patterns "stop having derivatives" once we get to the root cause. But certain interesting patterns, like exponential growth, have an infinite number of components! You have interest, which earns interest, which earns interest, which earns interest... forever! You can never find the single "root cause" of your bank account because an infinite number of components went into it (pretty trippy).

**What happens if the raise goes negative?**

Interesting question. As the raise goes negative, his salary will start lowering. But, as long as the salary is above zero, the bank account will keep rising! After all, going from $200 to $100 per week, while bad to you, still helps your bank account. Eventually, a negative raise will overpower the salary, making it negative, which means Joe is now paying his employer. But up until that point, Joe's bank account would be growing.

**How quickly can we check for differences?**

Suppose we're measuring a stock portfolio, not a bank account. We might want a second-by-second model of our salary and account balance. The idea is to measure at intervals short enough to get the detail we need -- a large aspect of calculus is deciding what "limit" is enough to say "Ok, this is accurate enough for me!".

The calculus formulas you typically see (integral of x = 1/2 * x^2) are different from the "discrete" formulas (sum of 1 to n = 1/2 * n * (n + 1)) because the discrete case is using "chunky" intervals.

## Key Takeaways

Why do I care about the analogy used? The traditional "distance, velocity, acceleration" doesn't lead to the right questions. What's the next derivative of acceleration? (It's called "jerk", and it's rarely used). Such a literal example is like having kids think multiplication is only for finding area, and only works on two numbers at a time.

Here's the key points:

- Calculus helps us find related patterns (bank account, to salary, to raises)
- The "derivative" is going "down" (finding week-by-week changes to get your salary)
- The "integral" is going "up" (adding up your salary to get your bank account)
- We can figure out a formula for a pattern (given my bank account, predict my salary) or get a specific value (what's my salary at week 3?)
- Calculus is useful outside the hard sciences. If you have a pattern or formula (production rate, size of a population, GDP of a country) and want to examine its behavior, calculus is the tool for you.
- Textbook calculus involves memorizing the rules to derive and integrate formulas. Learn the basics (x^n, e, ln, sin, cos) and leave the rest to machines. Our brainpower is better spent learning how to translate our thoughts into the language of math.

In my fantasy world, derivatives and integrals are just two everyday concepts. They're "what you can do" to formulas, just like addition and subtraction are "what you can do" to numbers.

"Hey kids, we find the total mass using addition (Mass1 + Mass2 = Mass3). And to find out how our position changes, we use the derivative".

"Duh -- addition is how you combine stuff. And yeah, you take the derivative to see how your position is changing. What else would you do?"

One can always dream. Happy math.

PS. Want more?

- I have another visual introduction to calculus in terms of shapes
- Learn to see integration as a better multiplication

## Other Posts In This Series

- A Gentle Introduction To Learning Calculus
- How To Understand Derivatives: The Product, Power & Chain Rules
- How To Understand Derivatives: The Quotient Rule, Exponents, and Logarithms
- An Intuitive Introduction To Limits
- Prehistoric Calculus: Discovering Pi
- Learning Calculus: Overcoming Our Artificial Need for Precision
- Why Do We Need Limits and Infinitesimals?
- A Friendly Chat About Whether 0.999... = 1
- A Calculus Analogy: Integrals as Multiplication
- Calculus: Building Intuition for the Derivative
- Understanding Calculus With A Bank Account Metaphor

Compound interest is also an interesting way to introduce the binomial expansion.

“Inflection Point” is when the derivative is at an extreme, (equivalently, when the second-derivative crosses 0, or where the concavity/complexity of the graph *inflects*), not when the total is at an extreme

https://secure.wikimedia.org/wikipedia/en/wiki/Inflection_point

On the main theme, would a paycheck and banking analogy really be more interesting to kids than physical motion (as in sports and rocket ships)?

I remember when I was in high school, I openly mocked my mother for reading the Business section of the newspaper.

(Nowadays I resent the paper for printing the Sports section.)

@Michael: Great point — I’ll have to keep that in mind when writing about the binomial expansion :).

@Mike: Doh! Yes, my mistake — I removed reference.

I’m being a little facetious, but I think the idea of a bank account / income / raise is more approachable. Most physics examples I saw tended to be “Let’s track the trajectory of a ball” and inevitably require more new concepts to get going (What is force? Gravity? Acceleration? Velocity?). But fun may be in the eye of the beholder :).

Dude, you are awesome. How I wish I had these when I was younger. Keep up the great work!

@Marcio: Thanks for kind words

Hi Kalid,

The thing about physics is that it’s more appropriate for describing

continuousvariations. Money is adiscreteprocess and thus a case of non-continuous variations…But I agree it is a nice view to explain it, and maybe link it to the boring use made in physics (probably because it’s always presented in the same way…).

Again, great reading ! Keep up the good work

Bests,

Johann

ingenious!

it’s true that a lot of people get bored by the direct physics application of calculus if its introduced too soon

money seems like a natural way to understand it

of course… it might not be able to so easily give an intuitive understanding of the more grainy aspects of calculus, but whatever, thanks!

@Johann: Thanks for dropping by, and great point about continuous vs. discrete. The funny thing is that many physicists treat the formulas as “discrete” (i.e. using infinitesimal dx, dy, dz quantities to make a 3d cube, for example) and then “let it disappear” to make it continuous again. The neat thing is that using discrete quantities really shows how the error margin is there (the difference between the actual sum of squares and 1/2 * x^2) and how limits / Riemann sum help us shrink this.

I agree though, that physics would be cool if it were shown to be an example of these general principles (and not the “definition” as is often seen).

@Prudhvi: Yep, there’s always details that you can’t get to when you make analogies. But you have to start somewhere :).

If someone had outright told me at any point in Calc I or Calc II that the ‘+ C’ can be thought of as an initial condition, I might have actually remembered to tack it to the end of integrals, instead of considering it an arbitrary annoyance that has little context.

That makes so much sense (and yet is so, so, so, painfully obvious), that it’s not even funny.

@MJ: Thanks for the comment – yeah, it’s *way* too easy to think of the +C as some mathematical details to keep track of, instead of something _needed_ to figure out how to make your model work.

Kalid,

I’ve been following your Better Explained series and forwarding them to friends. I love to read and re-read what you write. My favorite was your explanation of Exponential Functions.

Keep up the intuitive and fun teaching.

@Jeff: Thanks for the support!

I love your belief that 5th grade is the time to introduce these concepts. These basic ideas are way too powerful to relegate to the few who ever make it into calculus. To go one further…why isn’t the concept of the circle and its rotation (sins and cosines) also taught at 5th grade the instant students learn the concept of the square root? (leading of course to that unique number pattern that gives you the values on the unit circle at 0, pi/6, pi/4, pi/3 and pi/2.

Thanks for info.

Kalid,

You are a genius, and an inspiration to me. your posts are of immense help in my CFA studies.

I can really relate with calculus and understand these financial concepts in depth (compared to just memorizing d formulae).

If possible, could you in one of your posts incorporate more examples connecting calculus (mainly concepts of slope, inflection point)and your favorite and most releveant subject- Money (maybe i could broaden the horizon here calling money as finance)

Thanks again…and looking forward to more insightful posts!

Ramm

@Ramm: Thanks for suggestion and kind words! I’d love to do some follow-ups on calculus — I think the key is getting the basic metaphor in your head (raise/interest/bank account) and then seeing how specific ideas (inflection points, slope, etc.) can be understood. Appreciate the comment!

@tatil: You’re welcome!

Hi Kalid,

Thanks for your wonderful website! I am teaching myself maths, and it is so useful to have a resource which takes the intuitive approach. Ideas which are inscrutable when disguised in dry formulas and textbooks become clear with your explanations and analogies, and seeing how maths can be explained (i.e. in the way you do it) it amazes me that your style of explanation isn’t the norm. Thanks!

Jon

@Jon: Thank you for the kind words! Yes, I too wish more teachers gave intuitive explanations… I have a few ideas I’ll be announcing soon to make this easier ;).

At the risk of sounding like an idiot, you lost me with the first chart. I’m not American, so maybe there’s a difference with terminology.

Would you mind clarifiying the following?

“With a quick subtraction, we can figure out his weekly paycheck. Turns out Joe is making a steady $100/week.” What’s the subtraction?

The first chart, “Bank Account by week”, what does that show? $0 for 5 weeks? He’s not earning anything, in the next chart, he’s earning $100 a week.

Sorry, but I just don’t get it.

@Stu: No worries! Having questions usually means the explanation wasn’t clear enough, and it’s a signal to improve :).

The very first chart is supposed to be a tongue-in-cheek joke that Joe doesn’t have any activity in his bank account (“Ack. Clearly, not much happened — Joe isn’t earning anything”). The next diagram is another scenario where he is actually earning $100 per week.

I should clarify this point in the article, I appreciate the feedback!

Amazing article Kalid, thanks! But I didn’t understand how linear increase in salary could represent a triangle, and how the area of the triangle would equal the sum of payments.

If there is more detail in the book on that, just let me know. I have the original PDF version.

Thanks again!

@Sachin: Thanks for the comment! I’m not sure I understand the question, so let me know if this doesn’t clear things up:

The linear increase in salary ($100/week, $200/week, $300/week) can be shown as an increasing line on a graph (a “triangle” which goes 0, 100, 200, 300).

Now, the question is: what is the total amount of all these payments? It’s 100 (the first week) + 200 (the second week) + 300 (the third week) and so on. We are really breaking the triangle into chunks of 1 week each and adding it up.

Normally, this will result in a blocky “staircase” pattern. If we imagine our salary changing day by day, hour by hour, or second by second, then suddenly we have to be careful for how we calculate the total payment. We can graph the salary (second-by-second), and then compute the salary earned at each second. On the graph, this looks like the area underneath: a series of tiny rectangles where the width is “one second” and the height is “how much you earned in that second. Come to think of it, I should probably do an article on this :).

interesting using a bank account as an example

@Don: Thanks, glad you liked it.

Kalid – Fantastic posting again !

With regard to the bank account accumulation from the salary(income) lodgements,

I wondered on the following points for some clarification -

” ■Linear increase in salary (100, 200, 300, 400) which leads to a…

■Quadratic (something * n^2) increase in bank account (100, 300, 600, 1000… you see it curve!) “

Is it more accurate that the bank account increase as derived from a granting of a salary uplift represented by a linear relationship ( 100*n( week no) ) the actual

curve is 50n^2 + C. Under those conditions the cumulative bank account balances at any given week would differ slightly to the above chart representation.

On the discrete/continuous debate, could you consider writing up some more Calculus

intuition that deals with the Error margin issue (the difference between the actual sum of squares and 1/2 * x^2 and Limits / Riemann sums) and some of your insights on

Trigonometric calculus.

Love the work here!

Hi Khalid,

Your arrticle is very explanatory and helps a lot but I still struggle about concept derivative at a point = slope of tangent. Any ideas?

@rdamle: Great question — I’d like to do a follow-up article on derivatives to really understand the nature of change. The high-level insight is that the slope of the tangent and the derivative are two ways to describe how much you are changing. However, “slope of tangent” isn’t a really intuitive way to see how things are changing on a graph. I’d like to do a follow up on this!

@Ed: Thanks for the note!

Yes, that’s a great point — because the weeks are so “chunky” the actual curve may not line up exactly: we are trying to model a discrete process (100, 300, 600…) with a smooth curve.

I’d definitely like to do a follow-up on how these approximations work and get closer — this is one of the hearts of calculus. I’m still thinking of really good analogies here… the closest I can come to is “eventually, if you make the pixels small enough, the jagged squares can look like a smooth image”.

Appreciate the support!

Hey, just wanted to let you know that I translated this great calculus article to Russian.

http://yasno.tv/articles/11-math/24-proizvodnaya-integral-bankovskiy-schet