Math for economyMM1005

How to find your way

  1. 1Search for the word that confuses you — the box at the top searches the whole course.
  2. 2Look it up in Concepts. Every concept links to the section that explains it. Concepts →
  3. 3Read the Watch out and Common error boxes: they show the mistakes that are actually made.
  4. 4Still stuck? Bring the question to the exercise session or send an email.

Lecturer: Eric Ahlqvist, eric.ahlqvist@math.su.se · Put “MM1005” in the subject line.

← 7
Lecture 8 Infinite totals, and a second variable
9 →
8 Series and two variables

Infinite totals, and a second variable

Can infinitely many payments be worth a finite sum of money? And when output depends on capital and labour, what is “the derivative” of output?

This lecture is the join between the two subjects of the course. The first half finishes single-variable calculus; the second half begins everything that follows, and after today the first subject returns only as a tool.

Each half has one idea. In the first: an infinite total is a limit of finite ones, and it comes out finite only when the tail shrinks fast enough. The test turns out to be the same for an integral and for a sum, and $1/x$ sits exactly on the boundary in both. In the second: a partial derivative is not a new kind of derivative. Hold the other variable still, and everything from Lectures 2 to 7 applies unchanged.

⏱ 75 min read§ 6 sections

After this lecture you can

  • evaluate an integral by substitution, changing the differential and the limits of integration together
  • decide whether an improper integral or an infinite series converges, by writing it as a limit of finite totals
  • sum a geometric series, find the set of $x$ for which a series with ratio $k(x)$ converges, and the $x$ that gives a stated sum
  • price a perpetuity, an annuity and a loan, and find the first year in which a growing balance passes a target
  • compute first- and second-order partial derivatives, and read returns to scale and elasticities off a Cobb–Douglas function
1

Substitution: the last integration rule

Lecture 7 read the product rule backwards and got integration by parts. What does the chain rule give, read backwards?

Lecture 7 claimed that every integration rule is a differentiation rule read backwards, and got integration by parts out of the product rule. The chain rule reverses too, and that exhausts the supply.

Every integration rule is a differentiation rule read the other way: the product rule gives integration by parts (Lecture 7), the chain rule gives substitution (this lecture).
Fact 8.1Integration by substitution#

If $F'=f$, then differentiating $F(g(x))$ by the chain rule gives $F'(g(x))g'(x)$, so $$ \int f\bigl(g(x)\bigr)g'(x)\,dx = F\bigl(g(x)\bigr) + C\,. \tag{8.1} $$ In practice one writes $u=g(x)$ and $du = g'(x)\,dx$, turning the left-hand side into $\int f(u)\,du$.

Example

The signal: an inside function and its derivative

This example is the app's (the lecture's first board example). Find $\displaystyle\int 2x\,e^{x^{2}}\,dx.$

Try it yourself first. Then open one step at a time.

Guess first. The example after the question is the same integral. Decide which line is right before you read it.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

To evaluate $$\int_{0}^{2} x\,(1 + x^{2})^{4}\,dx$$ a student substitutes $u = 1 + x^{2}$.

Which line is right?

Example 8.4

The differential and the limits

Evaluate $\displaystyle\int_{0}^{2} x\,(1+x^{2})^{4}\,dx.$

Try it yourself first. Then open one step at a time.

That is the last integration rule you will be given. Parts came from the product rule and substitution from the chain rule, and there is no third differentiation rule that reverses into anything useful. Everything harder from here is a matter of recognising which of the two to try.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

With $u=x^{3}+1,$ what is $$\int_{0}^{1} x^{2}\,(x^{3}+1)^{2}\,dx\;?$$

2

Infinite totals

Both $1/x$ and $1/x^{2}$ fall to zero as $x\to\infty.$ Is the area under each, from $1$ out to infinity, finite?

Both remaining pieces of single-variable calculus ask the same question: what does it mean to add up infinitely many things, and when is the answer finite? Neither requires a new operation. In both cases one adds up a finite amount and then takes a limit, exactly as in Lecture 5.

So an improper integral is an ordinary definite integral followed by a limit, and the sum of an infinite series is the limit of its partial sums.

Guess first. Answer the question below before you read the example after it, which computes both integrals.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

Both $\dfrac1x$ and $\dfrac{1}{x^{2}}$ tend to $0$ as $x \to \infty$.

Which of $\displaystyle\int_{1}^{\infty}\frac{dx}{x}$ and $\displaystyle\int_{1}^{\infty}\frac{dx}{x^{2}}$ converge?

Example 8.6

Two tails that both vanish

Both $1/x$ and $1/x^{2}$ fall to zero as $x\to\infty.$ Do $\int_{1}^{\infty}dx/x$ and $\int_{1}^{\infty}dx/x^{2}$ converge?

Try it yourself first. Then open one step at a time.

Left, $y=1/x{:}$ the area from $1$ to $b$ is $\ln b,$ which grows for ever. Right, $y=1/x^{2}{:}$ the area from $1$ to $b$ is $1-1/b,$ which tends to $1.$ Past $x=1$ the first curve lies above the second.

The same manoeuvre works for a sum, and for a geometric series there is a trick that evaluates it exactly.

Fact 8.7Geometric series#

For $|k|<1$, $$ a + ak + ak^{2} + ak^{3} + \cdots = \frac{a}{1-k}\,, $$ and for $|k|\ge1$ (with $a\ne0$) the series diverges.

$1+\tfrac12+\tfrac14+\cdots$ laid end to end. The gap left to $2$ is always exactly the size of the next block, so the run never passes $2$ and gets as close as we like: $a=1,$ $k=\tfrac12,$ and $a/(1-k)=2.$

The finite sum in the “why” is worth keeping on its own. For any $k\ne1$ the first $n$ terms add up to $a(1-k^{n})/(1-k),$ also when $|k|>1;$ only the limit needs $|k|<1.$ The next section and the worked example below use both.

Example

A ratio that depends on x

This example is the app's: Fact 8.7 with a ratio that depends on $x,$ so that the answer is a set of $x.$ Nothing in it is new.

(a) For which $x$ does $$\sum_{n=1}^{\infty}\Bigl(\frac{x-3}{2}\Bigr)^{n}$$ converge, and what is its sum? For which $x$ is the sum $1$?

(b) For which $x$ does $$\sum_{n=1}^{\infty}\Bigl(\frac{\sqrt{x}}{3}\Bigr)^{n}$$ converge?

Try it yourself first. Then open one step at a time.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

For which $x$ does the series $$\sum_{n=0}^{\infty}(x-2)^{n}$$ converge?

Fact 8.11When does a tail converge?#

$$ \begin{aligned} &\int_{1}^{\infty} x^{-a}\,dx \text{ converges} \iff a>1\,, \\ &\sum_{n=1}^{\infty} n^{-p} \text{ converges} \iff p>1\,. \end{aligned} $$ Geometric decay — shrinking by a constant factor — always converges. Power decay converges only above the exponent $1$.

So the two halves of this subsection have the same boundary, and $1/x$ lies exactly on it: both $\int_{1}^{\infty}dx/x$ and $\sum 1/n$ diverge, while $\int_{1}^{\infty}dx/x^{2}$ and $\sum1/n^{2}$ converge. That is not a coincidence; the two criteria can be derived from each other.

3

Present value: perpetuities, annuities and loans

A bond pays $100 at the end of every year, for ever. Infinitely many payments: is it worth infinitely much?

The first use of a geometric series is money that arrives later. Guess first. Answer the question below before you read the example after it, which prices the same bond.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

A bond pays $100 at the end of every year, for ever. The interest rate is 5% a year.

What is it worth today?

Example 8.8

A perpetuity

A bond pays $\text{\textdollar}100$ at the end of every year, for ever. The interest rate is $5\%.$ What is it worth today?

Try it yourself first. Then open one step at a time.

Each bar is the value today of one $100 payment, years $1$ to $22;$ every bar is $1/1.05$ of the one before, and all of them together (for ever) make $2000.$ The pale bar in front is a payment today, which the bond does not make: counting it gives $2100.$

Nothing in Example 8.8 needed the payments to go on for ever. Stop them after $n$ years and the same series is a finite one, which Fact 8.7 already summed on the way past. That single observation is all there is to the mathematics of annuities and loans, and it is worth writing down because almost every financial quantity an economist meets is one of these two formulas.

Recap Words for money over time
wordwhat it means here
interest rate $r$per period, as a decimal: $5\%$ is $r=0.05$
present valuewhat a later payment is worth today
discount factor$k=1/(1+r){:}$ one period's delay multiplies value today by $k$
perpetuitythe same payment every period, for ever
annuitythe same payment every period, for $n$ periods
instalmentone of the equal payments that repay a loan
principalthe amount borrowed
balancewhat an account holds at a given moment

Guess first. A loan is repaid by a finite number of payments. Which equation fixes the payment? Answer before you read the Fact below.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

You borrow 2 000 000 kr for 30 years at 3%, and repay it in 30 equal annual instalments of $a$ kr, the first a year from now.

Which equation determines $a$?

Fact 8.9Annuities and loans#

Write $r$ for the interest rate per period and $k = 1/(1+r)$ for the discount factor. A payment of $a$ at the end of each of the next $n$ periods has total present value $$ \begin{aligned} \mathrm{PV} &= \frac{a}{1+r} + \frac{a}{(1+r)^{2}} + \cdots\\ &\qquad + \frac{a}{(1+r)^{n}}\\ &= a\,\frac{1-(1+r)^{-n}}{r}\,. \end{aligned} $$ A loan of $L$ repaid by $n$ such payments is the statement that these are the same sum of money seen from the two ends: $$ \begin{aligned} &a\,\frac{1-(1+r)^{-n}}{r} = L\\ &\qquad\Longleftrightarrow\qquad a = L\,\frac{r}{1-(1+r)^{-n}}\,. \end{aligned} $$

Example 8.10

A mortgage

Two million kronor is borrowed for $30$ years at $3\%,$ repaid in equal annual instalments. What is the instalment?

Try it yourself first. Then open one step at a time.

Example

The first year a balance passes a target

This example is the app's: the finite sum of Fact 8.7 and the logarithm step of Method 2.11, joined. Nothing in it is new. At the end of every year you deposit $10\,000$ kr in an account that pays $8\%$ a year. Let $S_{n}$ be the balance just after the $n$-th deposit. Show that $$S_{n}=125\,000\,\bigl(1.08^{n}-1\bigr)\,,$$ and find the first year in which the balance exceeds $500\,000$ kr.

Try it yourself first. Then open one step at a time.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

A fund pays $3000$ kr at the end of every year for $10$ years, and nothing after that. The interest rate is $4\%.$ Which expression is its present value?

4

A second variable

A firm doubles both its capital and its labour. Does its output double?

Single-variable calculus ends here. A firm uses capital and labour; a household's demand for a good depends on its price and on income. One input was never enough.

The values of $f(x,y)=x^{2}+xy$ for $x=1,\dots,4$ and $y=1,2,3.$ Along the row $y=2$ they are $3,8,15,24;$ up the column $x=2$ they are $6,8,10.$

A way to read the table (the app's). Walk along a row: $y$ is fixed, and the values $3,8,15,24$ are just a function of $x$ alone, $x^{2}+2x.$ Walk up a column: $x$ is fixed, and $6,8,10$ is a function of $y$ alone, $4+2y,$ rising by exactly $2$ — which is $x$ — per step. A function of two variables is, in every direction we walk, a function of one.

The workhorse for the rest of the course is the Cobb–Douglas function $F(x,y)=Ax^{a}y^{b}$ with $A,a,b>0,$ met already in Lecture 2 one variable at a time. As a production function, $x$ and $y$ are inputs and $F$ is output.

Guess first. Before the example, answer the question below for a Cobb–Douglas function.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

A firm's output is $$F(K, L) = 10\,K^{1/2}L^{1/3}$$

It doubles both inputs. Output is multiplied by:

Example 8.14

Returns to scale

A firm's output is $F(K,L)=10K^{1/2}L^{1/3}.$ It doubles both inputs. By what factor does output rise?

Try it yourself first. Then open one step at a time.

5

Partial derivatives

Hold $y$ still. What is left of $f(x,y)$ — and what is its derivative?

One function, $F(K,L)=10K^{1/2}L^{1/3},$ at one point, $(K,L)=(4,27),$ where $F=60.$ Left, $L$ held at $27{:}$ the slice in $K$ has slope $7.5$ there. Right, $K$ held at $4{:}$ the slice in $L$ has slope $0.74.$ Two slices, two slopes.

Nothing else changes. Every rule from Lectures 3 to 7 — product, quotient, chain, the lot — applies unaltered, because while $y$ stands still there is genuinely only one variable moving. The only new thing is the symbol $\partial$ and what it reminds you of. The subscript notation $f'_{1}$ and $f'_{2}$ says which argument rather than which letter, which matters as soon as functions are composed; expect both notations in the exercises.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

Let $f(x,y)=x^{2}y^{3}+4y^{2}.$ What is $\dfrac{\partial f}{\partial x}$?

Try it yourself

Two slices through one point

Left, the values of $f$ across the plane as shading, with a crosshair at the point the sliders choose; the blue line is “$y$ held”, the green line “$x$ held”. Right (below, on a phone), the two slices: what you see standing on each line.

  1. Drag the two sliders. Both slice plots are ordinary graphs with ordinary tangents; their slopes are the two partial derivatives at the point.
  2. Press the button with the formula until it shows the Cobb–Douglas function. Drag: both slices rise, and both flatten — two diminishing marginal products at once.
  3. Press it once more, for $x^{2}-y^{2},$ and put the crosshair at the origin. Both slopes are zero, yet one slice has a minimum there and the other a maximum. Lecture 11 is about exactly that.
Example 8.17

Both partials, three times

Find both partial derivatives of (a) $z=e^{x/y};$ (b) $z=\ln(x^{2}+y^{2});$ (c) $F(K,L)=AK^{a}L^{b}.$

Try it yourself first. Then open one step at a time.

Part (c) has a payoff worth the whole example. Rearranging $F'_{K}=aF/K$ gives $$ \frac{K}{F}\cdot F'_{K} = a\,, $$ and the left-hand side is the elasticity of output with respect to capital: the percentage change in output per one per cent change in capital. Multiplying $F'_{K}$ by $K/F$ converts a rate measured in units into one measured in percentages, which is what makes it comparable across firms and currencies. For a Cobb–Douglas function the elasticities are the exponents themselves, readable off the formula with no calculation at all — which is why economists write production functions this way.

Guess first. A partial derivative has been measured. Can it tell you what happens when both inputs change? Answer before you read the Watch out below.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

For a firm's output $F(K,L)$ it is measured that $$F_K'(100, 50) = 5$$

The firm now raises capital from $100$ to $110$ and labour from $50$ to $55$. Output rises by:

6

Differentiating twice

A partial derivative is again a function of two variables. Differentiate it again — with respect to which variable?

Each partial derivative is again a function of two variables, so it can be differentiated again — with respect to either variable. There are therefore four second-order partial derivatives, and this course needs all four: they are what Lecture 11 uses to classify stationary points in two variables.

Read $\dfrac{\partial^{2}f}{\partial y\,\partial x}$ from the right: first $\partial/\partial x,$ then $\partial/\partial y.$ Each of the four second-order partial derivatives is an ordinary second derivative of a one-variable slice, or the slope of a slope taken in the other direction.

Fact 8.21The order does not matter#

If the second-order partial derivatives of $f$ are continuous, then $$ \begin{aligned} &f''_{12} = f''_{21}\,, \qquad\text{that is}\\ &\frac{\partial^{2}f}{\partial y\,\partial x} = \frac{\partial^{2}f}{\partial x\,\partial y}\,. \end{aligned} $$ This holds for essentially every function met in economics.

That is a theorem and not a triviality. Read economically it says that the effect of capital on the marginal product of labour equals the effect of labour on the marginal product of capital — there is no obvious reason why that should be so, and it is. The result reappears throughout economics under other names, so it is worth filing as something proved rather than as a convention of notation.

Example 8.22

Four second-order partials, and a check

Find all four second-order partial derivatives of $z=x^{3}y+x^{2}y^{2}.$

Try it yourself first. Then open one step at a time.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

Let $z=x^{3}y^{2}+5x.$ What is $\dfrac{\partial^{2}z}{\partial x^{2}}$?

What you should take away

  • Substitution is the chain rule backwards: with $u=g(x)$ and $du=g'(x)dx,$ $\int f(g(x))g'(x)dx = \int f(u)\,du.$ The signal is an inside function whose derivative also appears. Change the limits with the variable, and never swap $dx$ for $du.$
  • An infinite total is a limit of finite ones — integrate to $b$ and let $b\to\infty,$ or add $n$ terms and let $n\to\infty.$ If the limit is finite it converges.
  • Whether the tail tends to zero is not the question; how fast is. $\int_{1}^{\infty}x^{-a}dx$ and $\sum n^{-p}$ both converge exactly above the exponent $1,$ and $1/x$ is on the boundary in both. Geometric decay always converges; $\sum1/n$ does not, though its terms tend to zero.
  • $a+ak+ak^{2}+\cdots = a/(1-k)$ for $|k|<1,$ proved by multiplying by $k$ and subtracting. A perpetuity paying $P$ for ever at rate $r$ is worth $P/r$ — the deposit that lives off its own interest.
  • A partial derivative holds the other variable still, and then every rule from Lectures 3 to 7 applies unchanged. For $F=AK^{a}L^{b},$ $F'_{K}=aF/K,$ so $(K/F)F'_{K}=a{:}$ the elasticities of a Cobb–Douglas function are its exponents.
  • A partial derivative is ceteris paribus made precise. It says nothing at all about what happens when the other variable moves too.
  • There are four second-order partials, and for essentially every function met in practice the mixed ones agree: $f''_{12}=f''_{21}.$ Computing both is a cheap check on the algebra.

Think further

Questions without computation. Think on your own or with a classmate before opening the thought.

  1. Discussion question 1 — which line is right after substituting

    To evaluate $\int_{0}^{2}x(1+x^{2})^{4}dx$ with $u=1+x^{2},$ which line is right?

    (A) $\int_{0}^{2}u^{4}du;$

    (B) $\int_{1}^{5}u^{4}du;$

    (C) $\int_{0}^{2}\tfrac12u^{4}du;$

    (D) $\int_{1}^{5}\tfrac12u^{4}du.$

    Answers (B) and (C) each get exactly one of the two steps wrong, and (A) gets both. Which step does each of them miss?

    One way to think about it

    (D). $du=2x\,dx,$ so $x\,dx=\tfrac12du;$ and the limits move with the variable, $x=0,2$ to $u=1,5$ (Example 8.4). The value is $312.4.$

    (B) gets the differential wrong: the factor $\tfrac12$ is missing, and it gives $624.8,$ twice the answer. (C) gets the limits wrong: a $u$-integrand with $x$-limits, giving $3.2,$ a number that answers no question. (A) gets both steps wrong (giving $6.4$).

  2. Discussion question 2 — two tails, one ruled out on sight

    Both $1/x$ and $1/x^{2}$ tend to $0.$ Which of $\int_{1}^{\infty}dx/x$ and $\int_{1}^{\infty}dx/x^{2}$ converge, and can you rule out one of the wrong answers without computing anything?

    One way to think about it

    Only $\int_{1}^{\infty}dx/x^{2}$ converges, to $1;$ the area under $1/x$ out to $b$ is $\ln b,$ which grows without limit (Example 8.6).

    The answer “only $\int_{1}^{\infty}dx/x$” can be ruled out on sight. For $x\ge1$ we have $1/x\ge1/x^{2},$ so the area under $1/x$ is at least the area under $1/x^{2}.$ If the larger area were finite, the smaller one would be finite too; so they cannot be that way round.

  3. Discussion question 3 — the value of a bond that pays for ever

    A bond pays $\text{\textdollar}100$ at the end of every year for ever, at $5\%.$ What is it worth today?

    (A) infinitely much;

    (B) $\text{\textdollar}2000;$

    (C) $\text{\textdollar}2100;$

    (D) $\text{\textdollar}1905.$

    One way to think about it

    (B). The payments are worth $100/1.05,$ $100/1.05^{2},\dots$ today: a geometric series with $a=100/1.05$ and $k=1/1.05,$ whose sum is $100/0.05=2000$ (Example 8.8).

    (A) forgets that the payments shrink by a constant factor, so the sum is finite. (C) uses $a=100,$ which counts a payment today that the bond never makes. (D) is $2000/1.05{:}$ every payment discounted one year too many.

  4. Discussion question 4 — when doubling doubles

    Output is $F(K,L)=10K^{1/2}L^{1/3}$ and both inputs double. Output is multiplied by about $1.78.$ What would the exponents have to satisfy for the answer to be exactly $2$?

    One way to think about it

    Their sum must be $1.$ Doubling both inputs multiplies $AK^{a}L^{b}$ by $2^{a+b},$ and $2^{a+b}=2$ exactly when $a+b=1{:}$ constant returns to scale (Example 8.14). For instance $10K^{1/2}L^{1/2}$ doubles its output when both inputs double. With $a+b=\tfrac56$ the factor is $2^{5/6}\approx1.78.$

  5. Discussion question 5 — two objections to the obvious answer

    It is measured that $F'_{K}(100,50)=5.$ The firm raises $K$ to $110$ and $L$ to $55.$ By how much does output rise? There are two separate objections to the obvious answer $50$ — find both.

    One way to think about it

    First: $F'_{K}$ holds labour fixed, and labour moves too. The number says nothing about what the extra labour adds (Watch out 8.18).

    Second: even with labour fixed, $5\times10=50$ is a linear approximation stretched over ten units, while $F'_{K}$ changes as $K$ rises (Watch out 4.16).

    A concrete case: $F(K,L)=100\sqrt{K}+20L$ has $F'_{K}=50/\sqrt{K},$ which is $5$ at $K=100.$ With $L$ fixed, raising $K$ to $110$ adds $100(\sqrt{110}-10)\approx48.8,$ not $50;$ and raising $L$ to $55$ adds $100$ more. The total is about $148.8.$ Answering it in general needs both partial derivatives and a linear approximation in two variables, which comes later in the course.

  6. Discussion question 6 — necessary, not sufficient, once more

    Why is $\sum 1/n$ the example that makes “necessary but not sufficient” stick, when the extreme value theorem and the inflection condition are the same point?

    One way to think about it

    Because here the counterexample is a single object you can check by hand. The terms $1/n$ visibly tend to zero, and the grouping in the “why” of Watch out 8.12 visibly pushes the partial sums past any number, half at a time. The condition holds and the conclusion fails, with nothing hidden.

    The pattern has come round several times: $f'(c)=0$ does not make $c$ an extreme point, $f''(c)=0$ does not make it an inflection point (Watch out 7.8), and now terms tending to zero do not make a series converge. A necessary condition shortlists; it never confirms.

  7. Discussion question 7 — why compute both mixed partials

    For $z=x^{3}y+x^{2}y^{2},$ verify that $z''_{12}=z''_{21}$ by computing both. Why is this a useful check even when you believe the theorem?

    One way to think about it

    From $z'_{1}=3x^{2}y+2xy^{2},$ differentiating with respect to $y$ gives $z''_{12}=3x^{2}+4xy.$ From $z'_{2}=x^{3}+2x^{2}y,$ differentiating with respect to $x$ gives $z''_{21}=3x^{2}+4xy.$ They agree (Example 8.22).

    The two routes go through different first derivatives. A slip in either $z'_{1}$ or $z'_{2}$ almost always makes the two results disagree, so agreement is cheap evidence that both first derivatives are right — and disagreement says at once that one of them is not.