Calculus Review

EC 311 - Intermediate Microeconomics

2025

Outline

  • Calculus
    • Slopes
    • Derivatives
    • Multivariate Derivatives

Slopes

Starting Simple

We call the slope the RISE over RUN

Functions & Slopes

We can write that previous line as a mathematical function:

\[f(x) = \dfrac{x}{2} + 5\]

Importantly, the slope for this function is \(1/2\) everywhere

  • Everywhere means for all values of \(x\)

  • So no matter at what point of the line we calculate the slope, we will always find it to be \(1/2\)

Functions & Slopes

Slopes can take positive, negative, or zero values

And each of these let’s us know how the function is behaving as we increse in \(x\) (as we move to the right):

  • Positive values mean the function is increasing

  • Negative values mean the function is decreasing

  • Zero values mean the function is staying constant (neither increasing or decreasing)

Functions & Slopes

The previous functions are called linear functions:

  • Slopes are constant at all values of \(x\)
  • They are behaving in an equal manner at all points


We will mostly be working with non-linear functions, which simply mean they have some form of curvature

  • We will use quadratic and cubic functions

    • Quadratic: \(f(x) = 3x^{2} + 5x + 10\)

    • Cubic: \(f(x) = x^{3} - 2x^{2} + x - 5\)

What we truly care about is their slope. And there is a simpler way to find the slope of a function.

Derivatives

Definition

A Derivative is simply another function that tells us the slope of a function

  • It tells us how a function is behaving

  • A Derivative will be how we find the slope of our functions


Mathematically

  • We will denote a Derivative as \(f'(x)\)
    • Our original function is labeled \(f(x)\) so you can read this as: “The derivative of \(f(x)\) is \(f'(x)\)
    • Note that \(f'(x)\) is the slope of \(f(x)\) at any point \(x\)

Intuition

Initially, the height of the ball is increasing over time

Eventually, the height of the ball is decreasing over time

Intuition

The sign of the derivative matters a ton!

  • An increasing derivative means that the function is going up

  • A decreasing derivative means that the function is going down

The magnitude also carries some significance:

  • A small absolute value means that the derivative is moving slowly

  • A large absolute value means that the derivative is moving rapidly

Note: I am talking about absoltue values so this applies to both positive and negative values. Because we use negatives, our intuition may challenged a bit but hopefully a future example will clear things up

Derivative Equal to Zero

Functions can increase and decrease, which implies something very critical

Functions can have zero slope! This happens when the function switches from increasing to decreasing (and vice-versa)


But Why Does This Matter?

  • The switch between positive and negative happens exactly when the function is at its maximum/minimum

  • And Economics is all about maximizing stuff!

    • Sometimes we minimize a function but the logic remains the same

Bringing the Math to Economics

Think about profits.

As a firm, we want to maximize profits so we:

  • Write down profits as a function of quantity produced

  • Take its derivative

  • Set that derivative (remember it is a function) equal to zero

  • Know how much quantity to produce

Once we know what we are doing, the math is extremely simple.

The hard part is understanding what we are doing, and then interpreting what a result of \(x^{*} = 6\) means.

How Do We Calculate Derivatives?

You may already know how to take derivatives but prepare to receive a crash-course in derivative shortcuts

Starting with the basics:

  • \(y\) will be a function of \(x\) such that \(y = f(x)\)

  • I will be using variables to show general cases so you can look back at how it’s done

We will go over the following:

  • Power Rule

  • Sum (and Difference) Rule

  • Constant Rule

  • Log Rule

  • Chain Rule

Power Rule

This will be the most common derivative we will be using

\[y = a \cdot x^{b}\]

\[\dfrac{\delta y}{\delta x} = {\color{red}b} \cdot a \cdot x^{\color{red}{b-1}}\]

For example:

\[y = 5x^{3}\]

\[\dfrac{\delta y}{\delta x} = {\color{red}3} \cdot 5 x^{\color{red}{3-1}} = 15x^{2}\]

Power Rule (Negative Exponent)

Sometimes we will see factors with a negative exponent, like \(x^{-3}\) for example

As a rule of thumb, you should always turn your negative exponents into positive ones

Thankfully, its a simple process:

We just “invert” the negative factor (aka flip the fraction)

\[x^{\color{red}-3} = \dfrac{1}{\color{red}{x^{3}}}\]

The derivative works exactly the same way so we can begin with the derivative and then make it positive.

Power Rule (Negative Exponent)

So for \(y = 5x^{-2}\) we have:

\[\dfrac{\delta y}{\delta x} = -2 \cdot 5x^{-2-1} = -10x^{-3} = \dfrac{-10}{x^{3}}\]

I’ll leave it to you to show yourself that making it \(y = \dfrac{5}{x^{2}}\) gives the same result

Power Rule (Fractional Exponent)

A lot of the time we will have fractional exponents (or decimals)

\[y = x^{1/5} = x^{0.2}\]

\[\dfrac{\delta y}{\delta x} = \dfrac{1}{5} \cdot x^{1/5 - 1} = \dfrac{1}{5} x^{-4/5} = \dfrac{1}{5} \cdot \dfrac{1}{x^{4/5}}\]


\[\dfrac{\delta y}{\delta x} = 0.2 \cdot x^{0.2 - 1} = 0.2 \cdot x^{-0.8} = \dfrac{0.2}{x^{0.8}}\]

Power Rule (Exponent Equal to 1)

Lastly, I’ll remind you that every number has a default exponent of 1

That is to say, if we see \(3x\) it is equivalent to \(3x^{1}\)

This helps us take the derivative using the Power Rule

For example: \(y = -3x\)

\[\dfrac{\delta y}{\delta x} = 1 \cdot -3x^{1-1} = -3x^{0} = -3\]

The key is to remember that any number with exponent 0 equals 1

Sum (and Difference) Rule

Sometimes our functions will have several parts, separated by \(\pm\)

To make it more general, I’ll introduce some new notation:

  • \(f(x)\) and \(g(x)\) are both functions of \(x\).
  • \(\dfrac{dy}{dx}\) refers to the overall derivative of \(y\)

    • This just means that we will take the derivative of all factors that are functions of \(x\)

\[\begin{align*} y &= f(x) \pm g(x) \\ \dfrac{dy}{dx} &= f'(x) \pm g'(x) \end{align*}\]

Sum (and Difference) Rule

Let’s look at a sum:

\[y = x^{2} + 3x\]

\[\begin{align*} f(x) &= x^{2} \\ f'(x) &= 2x \end{align*}\]

\[\begin{align*} g(x) &= 3x \\ g'(x) &= 3 \end{align*}\]

\[\dfrac{dy}{dx} = 2x + 3\]

Sum (and Difference) Rule

How about a difference:

\[y = x - 3x^{2}\]

\[\begin{align*} f(x) &= x \\ f'(x) &= 1 \end{align*}\]

\[\begin{align*} g(x) &= 3x^{2} \\ g'(x) &= 6x \end{align*}\]

\[\dfrac{dy}{dx} = 1 - 6x\]

Constant Rule

Important but straightforward \(y = f(x) = a\), where \(a\) is a constant

\(y \;\) does not change as \(\; x \;\) increases, so the slope is 0

Log Rule

One of the important functions we will see later uses the natural log function \(ln(x)\)

It’s primary use is that it increases at a decreasing rate which is math for it is always going up but by less and less every time

Log Rule

\[y = ln(x)\]

\[\dfrac{dy}{dx} = \dfrac{1}{x}\]

How about?

\[y = a \cdot ln(x)\]

\[\dfrac{dy}{dx} = a \cdot \dfrac{1}{x} = \dfrac{a}{x}\]

Chain Rule

  • Sometimes there are multiple operations happening at the same time over a variable. Generelly, it looks like:

\[y = f\left(g(x)\right)\]

  • We solve this by working from the outside layer to the inner most one, multiplying each time

  • Learning this is important for derivative math, but we will try to avoid them as much as possible

Chain Rule

\[y = \left(x^{3} + 2x\right)^{4}\]

\[\begin{align*} \dfrac{dy}{dx} &= 4\left( x^{3} + 2x \right)^{4-1} \cdot \left( 3x^{3-1} + 2x^{1-1} \right) \\ &= 4 \left( x^{3} + 2x \right)^{3} \cdot \left( 3x^{2} + 2 \right) \end{align*}\]

How about?

\[y = ln(x^{b})\]

\[\begin{align*} \dfrac{dy}{dx} &= \dfrac{1}{x^{b}} \cdot \dfrac{bx^{b-1}}{x^{b}} \\ &= bx^{b-1-b} = bx^{-1} = \dfrac{b}{x} \end{align*}\]

Multivariate Derivatives

Functions with Two Variables

For this I need to introduce some new notation

  • \(F = f(x,y)\) is a function of \(x\) and \(y\)
  • \(F\) now has 2 derivatives
    1. “With respect to \(x\)
    2. “With respect to \(y\)
  • Each of these is called a partial derivative

Each partial derivative is calculated as if the other variable is a constant number

Multivariate Derivatives

Let’s try a basic example: \(f(x,y) = x + 2y\)

  • What is the partial derivative of \(x \rightarrow \dfrac{df}{dx}\)?
    • We act as if \(y\) is a constant

\[\dfrac{df}{dx} = 1\]

  • What is the partial derivative of \(y \rightarrow \dfrac{df}{dx}\)?
    • We act as if \(x\) is a constant

\[\dfrac{df}{dy} = 2\]

Multivariate Derivatives

Additively Separable

\[f(x,y) = ln(x) + 3y\]

  • Partial w.r.t. \(x\)

\[\dfrac{df}{dx} = \dfrac{1}{x}\]

  • Partial w.r.t. \(y\)

\[\dfrac{df}{dy} = 3\]

Multivariate Derivatives

Non-Separable

\[f(x,y) = x \cdot y\]

  • Partial w.r.t. \(x\)

\[\begin{align*} \dfrac{df}{dx} &= 1 \cdot x^{1-1} \cdot y \\ &= y \end{align*}\]

  • Partial w.r.t. \(y\)

\[\dfrac{df}{dy} = x\]

Multivariate Derivatives

Non-Separable

\[f(x,y) = x^{2} \cdot y^{1/2}\]

  • Partial w.r.t. \(x\)

\[\begin{align*} \dfrac{df}{dx} &= 2x^{2-1} \cdot y^{1/2} \\ &= 2xy^{1/2} \end{align*}\]

  • Partial w.r.t. \(y\)

\[\begin{align*} \dfrac{df}{dy} &= \dfrac{1}{2}y^{1/2 - 1} \cdot x^{2} \\ &= \dfrac{1}{2} \cdot \dfrac{1}{y^{1/2}} \cdot x^{2} \end{align*}\]

Optimization

Finding Maximum (or Minimum) Values

When we have a continuos function, we can use calculus to find where the largest (or smallest) value will occur

  • Recall that when the derivative is positive, then the function is increasing

  • and when the derivative is negative, then the function is decreasing


  • Where the function is neither increasing nor decreasing, it’s either because it’s as high as it goes!

Examples

Let’s look at an example:

\[f(x,y) = 1 - x^2 - y^2 + 2x + 4y\]

How can we figure out where the maximum value of \(f()\) will occur?

  • Let’s start by taking some derivatives!
  • Partial w.r.t. \(x\)

\[\begin{align*} \dfrac{df}{dx} &= -2x + 2 \\ \end{align*}\]

  • Partial w.r.t. \(y\)

\[\begin{align*} \dfrac{df}{dy} &= -2y + 4 \\ \end{align*}\]

Examples

Let’s look at an example:

\[f(x,y) = 1 - x^2 - y^2 + 2x + 4y\]

  • Partial w.r.t. \(x\)

\[\begin{align*} \dfrac{df}{dx} &= -2x + 2 \\ \end{align*}\]

  • Partial w.r.t. \(y\)

\[\begin{align*} \dfrac{df}{dy} &= -2y + 4 \\ \end{align*}\]

What do these derivatives tell us?

  • Whether \(f()\) is increasing or decreasing
  • If \(x<1\), we know \(f()\) is increasing with \(x\)
  • If \(x>1\), we know \(f()\) is decreasing with \(x\)
  • If \(y<2\), we know \(f()\) is increasing with \(y\)
  • If \(y>2\), we know \(f()\) is decreasing with \(y\)

Examples

\[f(x,y) = 1 - x^2 - y^2 + 2x + 4y\]

Let’s take an example coordinate and see if it’s a maximum:

starting at the origin:

\((x=0,y=0)\)

At \((x=0, y=0)\), \(f(0,0) = 1\)

  • but \(\dfrac{df}{dx} = 2\) which tells us we could increase \(f()\) by increasing \(x\)
  • also, \(\dfrac{df}{dy} = 4\), so we could also increase \(f()\) by increasing \(y\)

So we know \((0,0)\) is not a maximum, and we know which direction to go to look for one

Examples

\[f(x,y) = 1 - x^2 - y^2 + 2x + 4y\]

Let’s go up in \(x\) and \(y\):

\((x=1,y=1)\)

\(f(1,1) = 5\) which is higher, but is it a maximum?

  • \(\dfrac{df}{dx} = 0\)
  • but, \(\dfrac{df}{dy} = 2\), so we still could increase \(f()\) by increasing \(y\)

Examples

\[f(x,y) = 1 - x^2 - y^2 + 2x + 4y\]

Let’s go up in \(x\) and \(y\):

\((x=2,y=2)\)

\(f(2,2) = 5\) which isn’t any higher than \((1,1)\)

  • \(\dfrac{df}{dx} = -2\), this tells us we went too far in \(x\)!
  • \(\dfrac{df}{dy} = 0\), so we should stop increasing \(y\)

What is the max of this function?

Where both partial derivatives are equal to zero:

  • \(\dfrac{df}{dx} = 0 \Rightarrow x = 1\)
  • \(\dfrac{df}{dy} = 0 \Rightarrow x = 2\)

\(f(1,2) = 6\) is the maximum value!

Another Example

\[f(x,y) = \sqrt{x^2+y^2}\]

What are the partial derivatives?

What is the partial derivative of \(x \rightarrow \dfrac{df}{dx}\)?

\[\begin{align*} \dfrac{d}{dx}(x^2+y^2)^\frac{1}{2} & = \\ & \frac{1}{2} (x^2+y^2)^{-\frac{1}{2}} (2x) \\ \dfrac{df}{dx} = 0 & \Rightarrow x = 0 \\ \end{align*}\]

What is the partial derivative of \(y \rightarrow \dfrac{df}{dx}\)?

\[\begin{align*} \dfrac{d}{dy}(x^2+y^2)^\frac{1}{2} & = \\ & \frac{1}{2} (x^2+y^2)^{-\frac{1}{2}} (2y) \\ \dfrac{df}{dy} = 0 & \Rightarrow y = 0 \\ \end{align*}\]

Calculus Review

There is a worksheet on Canvas for you to practice everything in this lecture.

I recommend you complete it to get the practice in

This class is roughly 70% doing math and 30% understanding and interpreting said math