Multivariate calculus · EC3304

Integration
for economics

Integration is how economists add up over a continuum: expected utility over uncertain outcomes, present value over a stream of payments, consumer surplus under a demand curve. This page collects the tools you actually need, the fundamental theorem of calculus, integration by parts and by substitution, and Leibniz's rule for differentiating under the integral sign, each with a full worked example.

Why economists integrate: the expectation operator

A recurring reason to integrate is to compute the expectation of a random quantity. The simplest case is the mean of a variable, "the expectation of \(X\)". More generally, for a continuous function \(g\) and a random variable \(X\) with probability density function \(f(x)\), the expectation operator is

$$\mathbb{E}[g(X)]:=\int_{-\infty}^{\infty} g(x)\,f(x)\,dx.$$

This is exactly what appears when forming expected utility or expected output along a saving or investment path, the object at the heart of the optimal-control and dynamic-optimisation problems that pervade macroeconomics and finance.

Indefinite and definite integrals

Definition — indefinite integral

The indefinite integral of a univariate function \(f(y)\) is

$$\int f(y)\,dy=F(y)+C,\qquad\text{where }F'(y)=f(y).$$

\(F\) is called the primitive (or antiderivative) of \(f\), and \(C\) is an arbitrary constant of integration.

Fundamental theorem of calculus

The definite integral of \(f(y)\) over an interval \([a,b]\) is

$$\int_a^b f(y)\,dy=F(b)-F(a),\qquad\text{where }F'(y)=f(y)\text{ for all }y\in(a,b).$$

The fundamental theorem is the link between the two notions of integral, area accumulated and antiderivative, and it is what makes definite integrals computable: find any primitive, then subtract its values at the endpoints.

Integration by parts

Integration by parts is the integral counterpart of the product rule for differentiation. In one useful form,

Integration by parts

$$\int f(y)\,g(y)\,dy=f(y)\,G(y)-\int f'(y)\,G(y)\,dy+C,\qquad\text{with }G'(y)=g(y).$$

It follows directly from the product rule \(\frac{d}{dy}[f(y)G(y)]=f'(y)G(y)+f(y)g(y)\): integrate both sides and rearrange. The art is choosing which factor to call \(f\) (to be differentiated) and which to integrate into \(G\); a good choice makes the remaining integral simpler than the one you started with.

Worked example: integration by parts

Worked example

Evaluate \(\displaystyle\int e^{2x}(3x-1)\,dx\). Take \(f(x)=3x-1\) (so \(f'(x)=3\)) and \(g(x)=e^{2x}\) (so \(G(x)=\tfrac12 e^{2x}\)). Then

$$\int e^{2x}(3x-1)\,dx=(3x-1)\frac{e^{2x}}{2}-\int \frac{e^{2x}}{2}\cdot 3\,dx+C=(3x-1)\frac{e^{2x}}{2}-\frac{3}{4}e^{2x}+C.$$

Collecting terms over a common factor \(e^{2x}/4\),

$$\int e^{2x}(3x-1)\,dx=\frac{e^{2x}}{4}\big(2(3x-1)-3\big)+C=\frac{e^{2x}}{4}(6x-5)+C.$$

Integration by substitution

Substitution (change of variable) reverses the chain rule:

Integration by substitution

$$\int f\big(g(y)\big)g'(y)\,dy=\int f(u)\,du,\qquad u=g(y).$$

For a definite integral the limits must be changed to match the new variable:

$$\int_a^b f\big(g(y)\big)g'(y)\,dy=\int_{g(a)}^{g(b)} f(u)\,du.$$

Worked example: integration by substitution

Worked example

Evaluate \(\displaystyle\int_0^1 2y\,(y^2+1)^3\,dy\). Let \(u=g(y)=y^2+1\), so \(g'(y)=2y\) and \(2y\,dy=du\). The limits transform as \(y=0\Rightarrow u=1\) and \(y=1\Rightarrow u=2\). Hence

$$\int_0^1 2y\,(y^2+1)^3\,dy=\int_1^2 u^3\,du=\left[\frac{u^4}{4}\right]_1^2=\frac{16}{4}-\frac14=\frac{15}{4}.$$

The substitution turned an awkward product into a one-line power-rule integral, precisely the situation the rule is designed for.

Leibniz's rule: differentiating under the integral sign

Economic integrals often depend on a parameter, time, a discount rate, a policy variable, and we want to know how the integral responds when the parameter moves. Leibniz's rule answers this, and it also allows the limits of integration themselves to depend on the parameter.

Leibniz's rule

If \(f\), \(a\) and \(b\) are all \(C^1\) functions, then

$$\frac{d}{ds}\left[\int_{a(s)}^{b(s)} f(x,s)\,dx\right]=f(b(s),s)\,b'(s)-f(a(s),s)\,a'(s)+\int_{a(s)}^{b(s)}\frac{\partial f(x,s)}{\partial s}\,dx.$$

The rule has three intuitive pieces: the top limit sweeping outward adds area at rate \(f(b,s)\,b'(s)\); the bottom limit moving adds (or removes) area at rate \(f(a,s)\,a'(s)\); and the integrand itself changing with \(s\) contributes the final integral of \(\partial f/\partial s\). It can be derived by writing \(H(a,b,s)=\int_a^b f(x,s)\,dx\) and applying the chain rule together with the fundamental theorem of calculus, using \(\partial H/\partial a=-f(a,s)\) and \(\partial H/\partial b=f(b,s)\).

Worked example: constant limits

Worked example

Differentiate \(\displaystyle F(s)=\int_0^1 \frac{1}{1+sx}\,dx\). The limits are constant, so only the integrand-derivative term survives:

$$F'(s)=\int_0^1 \frac{\partial}{\partial s}\!\left(\frac{1}{1+sx}\right)dx=\int_0^1 \frac{-x}{(1+sx)^2}\,dx.$$

Evaluating this integral (for instance by integration by parts, or by noting \(F(s)=\tfrac{1}{s}\ln(1+s)\) and differentiating directly) gives

$$F'(s)=\frac{1}{s(1+s)}-\frac{\ln(1+s)}{s^2}.$$

Worked example: variable limits

Worked example

Differentiate \(\displaystyle G(s)=\int_{s}^{s^2} \frac{s\,x^2}{2}\,dx\). Here \(f(x,s)=\tfrac{s x^2}{2}\), with lower limit \(a(s)=s\) (\(a'=1\)) and upper limit \(b(s)=s^2\) (\(b'=2s\)), and \(\partial f/\partial s=x^2/2\). Applying Leibniz's rule,

$$G'(s)=\frac{s(s^2)^2}{2}\cdot 2s-\frac{s\cdot s^2}{2}\cdot 1+\int_{s}^{s^2}\frac{x^2}{2}\,dx=s^6-\frac{s^3}{2}+\left[\frac{x^3}{6}\right]_{s}^{s^2}.$$

The remaining integral is \(\tfrac{1}{6}(s^6-s^3)\), so

$$G'(s)=s^6-\frac{s^3}{2}+\frac{s^6-s^3}{6}=\frac{7s^6}{6}-\frac{2s^3}{3}.$$

Where this shows up in economics

Economic application

Integration is the language of aggregation over a continuum. Expected utility \(\int u(c)\,f(c)\,dc\) and the moments of asset returns are integrals against a density. Present value of a continuous income stream, \(\int_0^T y(t)\,e^{-rt}\,dt\), and lifetime utility \(\int_0^\infty u(c(t))\,e^{-\rho t}\,dt\) are the objective functions of continuous-time optimal-control and growth models. Consumer and producer surplus are areas under demand and supply curves. And Leibniz's rule is exactly the tool for comparative statics on these objects, for example differentiating expected profit or a value function with respect to a parameter when the integration limits themselves shift with that parameter.

Check your understanding

Evaluate \(\displaystyle\int x\,e^{x}\,dx\) using integration by parts.

Take \(f(x)=x\) (\(f'=1\)) and \(g(x)=e^{x}\) (\(G=e^{x}\)). Then

$$\int x\,e^{x}\,dx=x\,e^{x}-\int 1\cdot e^{x}\,dx=x\,e^{x}-e^{x}+C=e^{x}(x-1)+C.$$

You can check by differentiating: \(\frac{d}{dx}[e^{x}(x-1)]=e^{x}(x-1)+e^{x}=x e^{x}\), as required.

Use substitution to evaluate \(\displaystyle\int_0^1 3x^2\,e^{x^3}\,dx\).

Let \(u=x^3\), so \(du=3x^2\,dx\); the limits become \(u=0\) to \(u=1\). Then

$$\int_0^1 3x^2 e^{x^3}\,dx=\int_0^1 e^{u}\,du=\big[e^{u}\big]_0^1=e-1.$$

For \(\displaystyle V(s)=\int_0^{s} e^{-x}\,dx\), find \(V'(s)\) two ways and confirm they agree.

Directly: \(V(s)=\big[-e^{-x}\big]_0^{s}=1-e^{-s}\), so \(V'(s)=e^{-s}\).

By Leibniz's rule: the integrand \(e^{-x}\) does not depend on \(s\), the lower limit is constant, and the upper limit \(b(s)=s\) has \(b'(s)=1\). So \(V'(s)=f(b(s))\,b'(s)=e^{-s}\cdot 1=e^{-s}\). The two methods agree, illustrating that the boundary term in Leibniz's rule is just the fundamental theorem of calculus for a moving endpoint.

Download the full lecture slides

These notes cover the integration strand of the multivariate calculus material. The full deck also covers the implicit function theorem, the Hessian, concavity and Taylor series.

Related notes

Studying this for a
university module?

I tutor economics, econometrics and mathematics at university and postgraduate level, including mathematical economics modules such as EC3304. First consultation is free.

Book a consultation How sessions work & pricing