Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Basic Differentiation

Before we study the differentiation of single-variable functions, we briefly review several foundational mathematical concepts.

Functions

A function f f from a set X X to a set Y Y , written f:XY f: X \to Y , is a rule that assigns exactly one element of Y Y to each element of X X .

Using xXx \in X and yYy \in Y, a function is written as y=f(x) y = f(x) , where xx is the independent variable and yy the dependent variable.

Graphs

If XX and YY are sets of real numbers, the graph of a function ff is the set of points (x,y)(x, y) such that y=f(x)y = f(x).

Economic convention.
Economists often draw demand curves with quantity on the horizontal axis and price on the vertical axis, even when the function is written as q=f(p) q = f(p) .

Slope

The slope of a line through points (x,y)(x, y) and (x,y)(x', y') is

m=yyxx.m = \frac{y' - y}{x' - x}.

Differentiation is the method of finding the slope of a function and is denoted by f(x) f'(x) .

Limits

We say that a function ff has limit LL as xax \to a if, for any ε>0\varepsilon > 0, there exists a δ>0\delta > 0 such that[1]

f(x)L<εwhenever0<xa<δ.|f(x) - L| < \varepsilon \quad \text{whenever} \quad 0 < |x - a| < \delta.

When this condition holds, we write

limxaf(x)=L.\lim_{x \to a} f(x) = L.

Continuity

A function ff is continuous at aa if:[2]

  1. f(a)f(a) is defined

  2. limxaf(x)\lim_{x \to a} f(x) exists

  3. limxaf(x)=f(a)\lim_{x \to a} f(x) = f(a)

Derivative at a Point

Let y=f(x)y = f(x). When xx changes by Δx\Delta x, the change in yy is

ΔyΔx=f(x+Δx)f(x)Δx.\frac{\Delta y}{\Delta x} = \frac{f(x+\Delta x) - f(x)}{\Delta x}.

Derivative as a Function

The derivative of ff at xx is defined as

f(x)=limΔx0f(x+Δx)f(x)Δx.f'(x) = \lim_{\Delta x \to 0} \frac{f(x+\Delta x) - f(x)}{\Delta x}.

If the derivative exists for every xx in the domain of ff, then the derivative itself defines a new function, denoted f(x)f'(x).

Geometrically, f(x)f'(x) is the slope of the tangent line to the graph of ff at (x,f(x))(x, f(x)).

Common notations include:

Note that what we usually think of as a variable xx is held constant while Δx\Delta x varies and converges to zero. It is useful to keep in mind that the derivative of a function ff at xx is the slope of a line tangent to the graph of the function ff at the point (x,f(x))(x, f(x)). It is crucial to understand the implications of the existence of the derivative at a point xx. The function must be smooth—meaning it is both continuous and differentiable—at the point xx. The tangent line provides a high-quality linear approximation to the graph of the function near xx. In general, if we know that the function ff is differentiable at aa, then the tangent line approximation to ff at aa is:

y=f(a)+f(a)(xa)y = f(a) + f'(a)(x - a)

where a,f(a), and f(a)a, f(a), \text{ and } f'(a) are constants, xx is the independent variable, and yy is the dependent variable. We will see this point again with Taylor series expansions. Many important concepts in economics—such as marginal cost or marginal utility—are based on this derivative function.

Second Derivative

The second derivative is the derivative of the derivative and is written as

f(x)=d2f(x)dx2.f''(x) = \frac{d^2 f(x)}{dx^2}.

Economic interpretation.
If lnp(t) \ln p(t) describes log prices over time, then:

  • the first derivative is inflation

  • the second derivative is the change in inflation

Basic Rules of Differentiation

Let y=f(x)y = f(x).

Constant-function Rule

The derivative of a contsant function y=f(x)=ky=f(x)=k is zero, for all values of x-it has zero slope!

ddx(k)=0.\frac{d}{dx}(k) = 0.

Power-function Rule

The derivative of a power function f(x)=xnf(x) = x^n is:

ddx(xn)=nxn1.\frac{d}{dx}(x^n) = n x^{n-1}.

Generalized Power-function Rule

When a multiplicaytive constant kk appears in the power fuction, so that f(x)=kxnf(x) = kx^n, then:

ddx(kxn)=knxn1.\frac{d}{dx}(k x^n) = k n x^{n-1}.

Logarithmic Rule

The derivatice of the log-function f(x)=lnxf(x) = lnx is:

ddx(lnx)=1x.\frac{d}{dx}(\ln x) = \frac{1}{x}.

Exponential Rule

For some exponential function f(x)=axf(x) = a^x, where aa is some constant, then:

ddx(ax)=axlna.\frac{d}{dx}(a^x) = a^x \ln a.

Note that a particular case of the above is

ddxex=ex\frac{d}{d x} e^x = e^x

While

ddxlnx=1x\frac{d}{d x} \ln x = \frac{1}{x}

Now, let’s consider some further useful rules of differentiation involving two or more functions of the same variable. Specifically, suppose f(x)f(x) and g(x)g(x) are two different functions of xx and that f(x)f'(x) and g(x)g'(x) exist. That is, let f(x)f(x) and g(x)g(x) be differentiable, then:

Sum-difference Rules

The derivative of a sum (difference) of two functions is the sum (difference) of the derivatives of the two functions.

ddx[f(x)±g(x)]=f(x)±g(x).\frac{d}{dx}[f(x) \pm g(x)] = f'(x) \pm g'(x).
Try these ^^

Determine the derivative of each of the functions below.

  1. y=30x+10y = 30x + 10

  2. y=8x26x+12y = 8x^2 - 6x + 12

  3. y=6y = 6

  4. y=32x2y = \sqrt{3} - 2x^2


Answers

1.  f(x)=302.  f(x)=16x63.  f(x)=04.  f(x)=4x1.\; f'(x) = 30 \quad 2.\; f'(x) = 16x - 6 \quad 3.\; f'(x) = 0 \quad 4.\; f'(x) = -4x

Product Rule

The derivative of the product of two (differentiable) functions is equal to the first function times the derivative of the second function plus the second function times the derivative of the first function.

ddx[f(x)g(x)]=f(x)g(x)+f(x)g(x).\frac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x).

Quotient Rule

The derivative of the quotient of two (differentiable) functions, f(x)/g(x)f(x)/g(x), is

ddx[f(x)g(x)]=g(x)f(x)f(x)g(x)[g(x)]2\frac{d}{dx} \left[ \frac{f(x)}{g(x)} \right] = \frac{g(x)f'(x) - f(x)g'(x)}{[g(x)]^2}

provided that g(x)0g(x) \neq 0. Note that [g(x)]2=g2(x)[g(x)]^2 = g^2(x).

Try these ^^

Differentiate the following functions with respect to xx.

  1. y=3x(2x1)5x2y=\dfrac{3x(2x-1)}{5x-2}

  2. y=3x(4x5)2y=3x(4x-5)^2

  3. y=(5x1)(3x+4)3y=(5x-1)(3x+4)^3

  4. y=(3x4)5x+12x+7y=(3x-4)\dfrac{5x+1}{2x+7}

  5. y=(8x5)37x+4y=\dfrac{(8x-5)^3}{7x+4}

  6. y=(3x+42x+5)2y=\left(\dfrac{3x+4}{2x+5}\right)^2


Answers

1.  y=30x224x+6(5x2)22.  y=144x2240x+753.  y=(45x9)(3x+4)2+5(3x+4)34.  y=30x2+210x111(2x+7)25.  y=(168x+96)(8x5)27(8x5)3(7x+4)26.  y=42x+56(2x+5)31.\; y'=\frac{30x^2-24x+6}{(5x-2)^2} \quad 2.\; y'=144x^2-240x+75 \quad 3.\; y'=(45x-9)(3x+4)^2+5(3x+4)^3 \quad 4.\; y'=\frac{30x^2+210x-111}{(2x+7)^2} \quad 5.\; y'=\frac{(168x+96)(8x-5)^2-7(8x-5)^3}{(7x+4)^2} \quad 6.\; y'=\frac{42x+56}{(2x+5)^3}


Use the quotient rule to differentiate each function.

  1. f(x)=2x+7x21f(x)=\dfrac{2x+7}{x^2-1}

  2. f(x)=bx3+cx2+x4xf(x)=\dfrac{bx^3+cx^2+x-4}{x}

  3. f(x)=e2xx2f(x)=\dfrac{e^{2x}}{x^2}

  4. f(x)=(3x+2)2xf(x)=\dfrac{(3x+2)^2}{x}


Answers

1.  f(x)=2x214x2(x21)22.  f(x)=2bx3+cx2+4x23.  f(x)=2xe2x2e2xx34.  f(x)=9x24x21.\; f'(x)=\frac{-2x^2-14x-2}{(x^2-1)^2} \quad 2.\; f'(x)=\frac{2bx^3+cx^2+4}{x^2} \\[6pt] 3.\; f'(x)=\frac{2xe^{2x}-2e^{2x}}{x^3} \quad 4.\; f'(x)=\frac{9x^2-4}{x^2}


Second Derivatives

Find the second derivative of each function.

  1. y=93x+7x2x3y = 9 - 3x + 7x^2 - x^3

  2. y=4x+5xy = \dfrac{4x+5}{x}

  3. y=ln(4x)y = \ln(4x)

  4. y=x2exy = x^2 e^x

  5. y=(x6)4y = (x-6)^4


Answers

1.  y=146x2.  y=10x33.  y=x24.  y=2ex+4xex+x2ex5.  y=12(x6)21.\; y'' = 14 - 6x \quad 2.\; y'' = 10x^{-3} \quad 3.\; y'' = -x^{-2} \quad 4.\; y'' = 2e^x + 4xe^x + x^2 e^x \quad 5.\; y'' = 12(x-6)^2

Chain Rule

If z=f(y)z = f(y) and y=g(x)y = g(x), then

dzdx=dzdydydx.\frac{dz}{dx} = \frac{dz}{dy}\frac{dy}{dx}.

The chain rule provides a convenient way to study how one variable (say, xx) affects another variable (zz) through its influence on some intermediate variable (yy).

Sometimes, we can write for a composite function y=f(g(x))y = f(g(x)):

dydx=f(g(x))g(x)\frac{dy}{dx} = f'(g(x)) \cdot g'(x)

Chain Rule for Exponential and Logarithmic Functions

The general exponential function rule

ddxeg(x)=eg(x)g(x)\frac{d}{d x} e^{g(x)} = e^{g(x)} g'(x)

For example:

ddxeax=dd(ax)eaxddx(ax)=eaxa=aeax\frac{d}{d x} e^{ax} = \frac{d}{d (ax)} e^{ax} \frac{d}{d x} (ax) = e^{ax} a = ae^{ax}

If we are using a base other than ee:

ddx(ag(x))=ag(x)g(x)lna, where a>0,a0\frac {d}{d x}(a^{g(x)}) = a^{g(x)} g'(x) \ln a, \text{ where } a > 0, a \neq 0

The general natural logarithmic function rule

ddxln(g(x))=g(x)g(x)\frac{d}{d x} \ln(g(x)) = \frac{g'(x)}{g(x)}

Interestingly:

ddxln(ax)=dd(ax)ln(ax)ddx(ax)=1axa=1/x\frac{d}{d x} \ln(ax) = \frac{d}{d(ax)} \ln(ax) \frac{d}{d x}(ax) = \frac{1}{ax} a = 1/x

while

ddxln(x2)=dd(x2)ln(x2)ddx(x2)=1x22x=2/x\frac{d}{d x} \ln(x^2) = \frac{d}{d(x^2)} \ln(x^2) \frac{d}{d x}(x^2) = \frac{1}{x^2} 2x = 2/x

Note also when considered base other than ee. Because

logb(x)=ln(x)ln(b)\log_b(x) = \frac{\ln(x)}{\ln(b)}

we have

ddxlogb(x)=1x1ln(b)\frac{d}{d x} \log_b(x) = \frac{1}{x} \frac{1}{\ln(b)}

Or more generally:

ddxlogbg(x)=g(x)g(x)1lnb, where b>0,b1=g(x)g(x)logbe\begin{aligned} \frac{d}{d x} \log_b g(x) &= \frac{g'(x)}{g(x)} \frac{1}{\ln b}, \text{ where } b > 0, b \neq 1 \\ &= \frac{g'(x)}{g(x)} \log_b e \end{aligned}

Note that logbe=1lnb\log_b e = \displaystyle \frac{1}{\ln b}.

Try these ^^

Exponential Functions

Use the rules of differentiating exponential functions to find the derivative with respect to xx of each of the following functions.

  1. y=x2e5xy = x^2 e^{5x}

  2. y=e5x1e5x+1y = \dfrac{e^{5x}-1}{e^{5x}+1}

  3. y=a2xy = a^{2x}

  4. y=a5x2y = a^{5x^2}

  5. y=42x+7y = 4^{2x+7}

  6. y=x32xy = x^3 2^x


Answers

1.  y=xe5x(5x+2)2.  y=10e5x(e5x+1)23.  y=2a2xlna4.  y=10xa5x2lna5.  y=2ln(4)42x+76.  y=x22x(xln2+3)1.\; y' = x e^{5x}(5x+2) \quad 2.\; y' = \frac{10e^{5x}}{(e^{5x}+1)^2} \quad 3.\; y' = 2a^{2x}\ln a \quad 4.\; y' = 10x\,a^{5x^2}\ln a \quad 5.\; y' = 2\ln(4)\,4^{2x+7} \quad 6.\; y' = x^2 2^x(x\ln 2 + 3)


Logarithmic Functions

Use the rules of differentiating logarithms to find the derivative of each function.

  1. f(x)=x4+ln(ax)f(x)=x^{-4}+\ln(ax)

  2. f(x)=4x3lnx2f(x)=4x^3\ln x^2

  3. f(x)=lnxln(1+x)f(x)=\ln x-\ln(1+x)

  4. f(x)=ln ⁣(2x25x)f(x)=\ln\!\left(\dfrac{2x^2}{5x}\right)

  5. f(x)=log2(6x)f(x)=\log_2(6x)

  6. f(x)=log4(9x3)f(x)=\log_4(9x^3)


Answers

1.  f(x)=4x5+x12.  f(x)=8x2+24x2lnx3.  f(x)=1x(1+x)4.  f(x)=1x5.  f(x)=1xln26.  f(x)=3xln41.\; f'(x)=-4x^{-5}+x^{-1} \quad 2.\; f'(x)=8x^2+24x^2\ln x \quad 3.\; f'(x)=\frac{1}{x(1+x)} \quad 4.\; f'(x)=\frac{1}{x} \quad 5.\; f'(x)=\frac{1}{x\ln 2} \quad 6.\; f'(x)=\frac{3}{x\ln 4}


Chain Rule

Use the chain rule to find the derivative, f(x)f'(x), of the following:

  1. f(x)=(x+1)3+(x22x)25f(x) = (x + 1)^3 + (x^2 - 2x)^2 - 5

  2. f(x)=(2x+4)99f(x) = (2x + 4)^{99}

  3. f(x)=(5x2+10x+3)20f(x) = (5x^2 + 10x + 3)^{20}

  4. f(x)=(ex)abf(x) = (e^x)^{ab}

  5. f(x)=(exa)bf(x) = (e^{x^a})^{b}

  6. f(x)=(ea+bx+cx2)10f(x) = (e^{a + bx + cx^2})^{10}


Answers

1.  f(x)=4x39x2+14x+32.  f(x)=198(2x+4)983.  f(x)=(200x+200)(5x2+10x+3)194.  f(x)=abeabx5.  f(x)=abxa1ebxa6.  f(x)=10(b+2cx)(ea+bx+cx2)101.\; f'(x)=4x^3-9x^2+14x+3 \quad 2.\; f'(x)=198(2x+4)^{98} \quad 3.\; f'(x)=(200x+200)(5x^2+10x+3)^{19} \\[6pt] 4.\; f'(x)=ab\,e^{abx} \quad 5.\; f'(x)=ab\,x^{a-1}e^{bx^a} \quad 6.\; f'(x)=10(b+2cx)(e^{a+bx+cx^2})^{10}


Derivatives of Exponential and Logarithmic Functions

1. Exponential Rule with Base aa

Problem: Find the derivative of f(x)=5x3+2xf(x) = 5^{x^3 + 2x}.

Solution: Using the rule ddx(ag(x))=ag(x)g(x)lna\frac{d}{d x}(a^{g(x)}) = a^{g(x)} g'(x) \ln a:

  • Let a=5a = 5

  • Let g(x)=x3+2xg(x) = x^3 + 2x, so g(x)=3x2+2g'(x) = 3x^2 + 2

f(x)=5x3+2x(3x2+2)ln5f'(x) = 5^{x^3 + 2x} \cdot (3x^2 + 2) \cdot \ln 5

General Natural Logarithmic Rule

Problem: Find the derivative of f(x)=ln(sin(x))f(x) = \ln(\sin(x)).

Solution: Using the rule ddxln(g(x))=g(x)g(x)\frac{d}{d x} \ln(g(x)) = \frac{g'(x)}{g(x)}:

  • Let g(x)=sin(x)g(x) = \sin(x), so g(x)=cos(x)g'(x) = \cos(x)

f(x)=cos(x)sin(x)=cot(x)f'(x) = \frac{\cos(x)}{\sin(x)} = \cot(x)

Logarithm with Base bb

Problem: Find the derivative of f(x)=log10(x2+1)f(x) = \log_{10}(x^2 + 1).

Solution: Using the rule ddxlogbg(x)=g(x)g(x)lnb\frac{d}{d x} \log_b g(x) = \frac{g'(x)}{g(x) \ln b}:

  • Let b=10b = 10

  • Let g(x)=x2+1g(x) = x^2 + 1, so g(x)=2xg'(x) = 2x

f(x)=2x(x2+1)ln(10)f'(x) = \frac{2x}{(x^2 + 1) \ln(10)}

Comparison of ln(ax)\ln(ax) vs ln(xn)\ln(x^n)

Problem: Differentiate y=ln(7x)y = \ln(7x) and y=ln(x7)y = \ln(x^7) to see the difference.

Case A: For ln(7x)\ln(7x), the constant a=7a=7 cancels out:

dydx=77x=1x\frac{dy}{dx} = \frac{7}{7x} = \frac{1}{x}

Case B: For ln(x7)\ln(x^7), the power n=7n=7 remains in the numerator:

dydx=7x6x7=7x\frac{dy}{dx} = \frac{7x^6}{x^7} = \frac{7}{x}

The Differential

Define dxdx as an arbitrary change in xx from its initial value x0x_0 and dydy as the resulting change in yy along the tangent line from the initial value of the function y0=f(x0)y_0 = f(x_0).

The differential of y=f(x0)y=f(x_0) evaluated at x0x_0 is

dy=f(x0)dx.dy = f'(x_0)\, dx.

This represents the change in yy along the tangent line at x0x_0. Graphically, this is shown in Figure 1.

Differential

Figure 1:Differential

Try these ^^

Differentials

Find the differential dydy for a given change in xx, dxdx, for each function.

  1. y=7x23x+5y = 7x^2 - 3x + 5

  2. y=10x14x2y = 10x - \dfrac14 x^2

  3. y=x2y = -x^2

  4. y=x3+3x6y = x^3 + 3x - 6


Answers

1.  dy=(14x3)dx2.  dy=(1012x)dx3.  dy=(2x)dx4.  dy=(3x2+3)dx1.\; dy = (14x - 3)\,dx \quad 2.\; dy = \left(10 - \tfrac12 x\right)dx \quad 3.\; dy = (-2x)\,dx \quad 4.\; dy = (3x^2 + 3)\,dx

Taylor Series

A smooth complex function z(x)z(x) can be approximated around x=ax=a by

f(x)=z(a)+z(a)(xa)+12z(a)(xa)2+16f(a)(xa)3+f(x) = z(a) + z'(a)(x-a) + \frac{1}{2}z''(a)(x-a)^2 + \frac{1}{6}f'''(a)(x-a)^3 + \cdots

This idea underlies many approximation methods in economics.

Taylor Series

Figure 2:Taylor expansion of a smooth function around a point.

As shown in Figure 2 a function z(x)z(x) being approximated by three different Taylor polynomials (or Taylor series expansions) centered around the point x=ax=a.

The simplest approximation perhaps would simply be g(x)=ag(x) = a. This constant-valued function does not work well, especially if we move away from the point aa.

A better approximation would be a linear function of the form h(x)=z(a)+b(xa)h(x) = z(a) + b(x-a), where bb is some slope. But what would be a good value of bb? We saw above that the differential is an equation for the tangent line (or slope) at the point x=ax = a. So, we could argue that the best linear approximation to the function around this point would be

h(x)=z(a)+z(a)(xa)h(x) = z(a) + z'(a)(x-a)

where z(a)z'(a) is the derivative of the function evaluated at x=ax=a.

But why stop here? We could improve on this. A better approximation could allow for some curvature. The general form would then be, say, f(x)=z(a)+z(a).(xa)+c.(xa)2f(x) = z(a) + z'(a) .(x-a) + c.(x-a)^2. Again, we ask, “What would be the best value for cc?” The rate of change of the slope of the quadratic approximation should be equal to the rate of change of change of the function at the aa. And since the second derivative of z(x)z(x) is 2c2c, then for f(x)f''(x) to equal z(x)z''(x) at x=ax = a, we need c=1/2z(a)c = 1/2 z''(a). Hence the quadratic approximation to the function aound x=ax = a is:

f(x)=z(a)+z(a)(xa)+12f(a)(xa)2f(x) = z(a) + z'(a)(x-a) + \frac{1}{2}f''(a)(x-a)^2

Exteding the above argument for cubic and higher-degree approximations, we could find the nnth-degree approximation to the function z(x)z(x), which we could call m(x)m(x), around the point x=ax = a is

m(x)=z(a)0!+z(a)1!(xa)+z(a)2!(xa)2++f(n)(a)n!(xa)nm(x) = \frac{z(a)}{0!} + \frac{z'(a)}{1!}(x-a) + \frac{z''(a)}{2!}(x-a)^2 + \cdots + \frac{f^{(n)}(a)}{n!}(x-a)^n

where f(n)(a)f^{(n)}(a) is the nn the derivative of z(x)z(x) evaluated at x=ax = a. The function m(x)m(x) above is called the nn-th degree Taylor expansion series of z(x)z(x) evaluated at x=ax=a.

To sum, z(x)z(x) is the original function being approximated (the solid curve). g(x)g(x) represents a constant function. h(x)h(x) represents the first-order Taylor polynomial, i.e. a straight line that has the same value and slope as z(x)z(x) at x=ax=a (or a tangent to z(x)z(x) at x=ax=a). The formula for f(x)f(x) is f(x)=z(a)+z(a)(xa)+12z(a)(xa)2f(x) = z(a) + z^{\prime }(a)(x-a) + \frac{1}{2} z''(a)(x-a)^2 representing a second-order (quadratic) polynomial-the dashed curve, which matches better the function’s value, slope, and concavity (curvature) at x=ax=a. It is a better approximation of z(x)z(x) near x=ax=a than the linear approximation h(x)h(x) and of course the constant function g(a)g(a). The graph demonstrates that as more terms are included in the Taylor polynomial, the approximation of the original function becomes more accurate over a larger range around the center point x=ax=a.

Try these ^^

Taylor Series

Question

1. Given the function f(x)=3x3+4x22x+1f(x) = 3x^3 + 4x^2 - 2x + 1, find the linear, quadratic, and cubic Taylor series approximations centered at a=0a = 0.

2. Given the function f(x)=ln(x)f(x) = \ln(x), find the linear, quadratic, and cubic Taylor series approximations centered at a=1a = 1.


Solution

1. To find the approximations, we first calculate the value of the function and its derivatives at the center point a=0a = 0:

  • Function: f(x)=3x3+4x22x+1    f(0)=1f(x) = 3x^3 + 4x^2 - 2x + 1 \implies f(0) = 1

  • 1st Derivative: f(x)=9x2+8x2    f(0)=2f'(x) = 9x^2 + 8x - 2 \implies f'(0) = -2

  • 2nd Derivative: f(x)=18x+8    f(0)=8f''(x) = 18x + 8 \implies f''(0) = 8

  • 3rd Derivative: f(x)=18    f(0)=18f'''(x) = 18 \implies f'''(0) = 18

a. Linear Approximation (n=1n = 1)

The linear Taylor polynomial is P1(x)=f(0)+f(0)xP_1(x) = f(0) + f'(0)x:

P1(x)=12xP_1(x) = 1 - 2x

b. Quadratic Approximation (n=2n = 2)

The quadratic Taylor polynomial adds the f(0)2!x2\frac{f''(0)}{2!}x^2 term:

P2(x)=12x+82x2P_2(x) = 1 - 2x + \frac{8}{2}x^2

P2(x)=4x22x+1P_2(x) = 4x^2 - 2x + 1

c. Cubic Approximation (n=3n = 3)

The cubic Taylor polynomial adds the f(0)3!x3\frac{f'''(0)}{3!}x^3 term:

P3(x)=12x+4x2+186x3P_3(x) = 1 - 2x + 4x^2 + \frac{18}{6}x^3

P3(x)=3x3+4x22x+1P_3(x) = 3x^3 + 4x^2 - 2x + 1

Note: Because the original function is a cubic polynomial, the 3rd-degree Taylor approximation is identical to the original function.


2. For a Taylor series centered at a=1a = 1, the formula is:

Pn(x)=k=0nf(k)(1)k!(x1)kP_n(x) = \sum_{k=0}^n \frac{f^{(k)}(1)}{k!} (x - 1)^k

First, we find the derivatives and evaluate them at x=1x = 1:

  • Function: f(x)=ln(x)    f(1)=ln(1)=0f(x) = \ln(x) \implies f(1) = \ln(1) = 0

  • 1st Derivative: f(x)=1x=x1    f(1)=1f'(x) = \frac{1}{x} = x^{-1} \implies f'(1) = 1

  • 2nd Derivative: f(x)=x2=1x2    f(1)=1f''(x) = -x^{-2} = -\frac{1}{x^2} \implies f''(1) = -1

  • 3rd Derivative: f(x)=2x3=2x3    f(1)=2f'''(x) = 2x^{-3} = \frac{2}{x^3} \implies f'''(1) = 2

a. Linear Approximation (n=1n = 1)

Using P1(x)=f(1)+f(1)(x1)P_1(x) = f(1) + f'(1)(x - 1):

P1(x)=0+1(x1)P_1(x) = 0 + 1(x - 1)

P1(x)=x1P_1(x) = x - 1

b. Quadratic Approximation (n=2n = 2)

Adding the second-order term f(1)2!(x1)2\frac{f''(1)}{2!}(x - 1)^2:

P2(x)=(x1)+12(x1)2P_2(x) = (x - 1) + \frac{-1}{2}(x - 1)^2

P2(x)=(x1)12(x1)2P_2(x) = (x - 1) - \frac{1}{2}(x - 1)^2

c. Cubic Approximation (n=3n = 3)

Adding the third-order term f(1)3!(x1)3\frac{f'''(1)}{3!}(x - 1)^3:

P3(x)=(x1)12(x1)2+26(x1)3P_3(x) = (x - 1) - \frac{1}{2}(x - 1)^2 + \frac{2}{6}(x - 1)^3

P3(x)=(x1)12(x1)2+13(x1)3P_3(x) = (x - 1) - \frac{1}{2}(x - 1)^2 + \frac{1}{3}(x - 1)^3

Insight: Unlike the previous polynomial example, this series is infinite. As you add more terms, the approximation becomes more accurate, but only within the interval of convergence (which for ln(x)\ln(x) at a=1a=1 is 0<x20 < x \le 2).

Implicit Differentiation

Let’s consider a very simple function,

xy=7.xy = 7.

Here, possible solutions include (x,y)=(1,7)(x,y)=(1,7), (7,1)(7,1), and so on.
If we want to find the slope of this function, we can differentiate it.

Finding yy'

To find yy', we proceed as follows.

(a) We make the main assumption that yy is a function of xx, i.e. y=f(x)y=f(x).
We then differentiate both sides of the equation with respect to xx.

Hence, we obtain

ddx[xf(x)]=0.\frac{d}{dx}[x f(x)] = 0.

Using the product rule, this gives

1f(x)+xf(x)=0.1\cdot f(x) + x f'(x) = 0.

Equivalently,

y+xy=0.y + x y' = 0.

(b) Solving the resulting equation for yy' gives

y=yx.y' = -\frac{y}{x}.

So, if we substitute, for example, x=1x=1 and y=5y=5, we obtain the slope of the function at that point:

y=5.y' = -5.

Inverse Function Rule for Implicit Functions

We can show that

dydx=fxfy.\frac{dy}{dx} = -\frac{f_x}{f_y}.

That is, if we have an implicit function written as

f(x,y)=0,f(x,y) = 0,

then the derivative of yy with respect to xx can be obtained by:

  1. differentiating ff with respect to xx to obtain fxf_x,

  2. differentiating ff with respect to yy to obtain fyf_y,

  3. taking the ratio fxfy-\dfrac{f_x}{f_y}.

This gives the derivative of the implicit function yy with respect to xx.

It often feels like magic — but it is simply a consequence of the chain rule.

Some Uses of Differentiation in Economics

Some common applications of differentiation include:

etc.


A CES production function example

Given the CES production function

Q=A[αKβ+(1α)Lβ]1/β,Q = A\bigl[\alpha K^{-\beta} + (1-\alpha)L^{-\beta}\bigr]^{-1/\beta},

we can show that the elasticity of substitution is constant, as follows.

First-order conditions

The first-order conditions require that

Q/LQ/K=PLPK.\frac{\partial Q / \partial L}{\partial Q / \partial K} = \frac{P_L}{P_K}.

Using the generalized power function rule, we take the first-order partial derivatives.

For labor,

QL=1βA[αKβ+(1α)Lβ](1/β+1)(β)(1α)Lβ1.\frac{\partial Q}{\partial L} = -\frac{1}{\beta} A\bigl[\alpha K^{-\beta} + (1-\alpha)L^{-\beta}\bigr]^{-(1/\beta+1)} (-\beta)(1-\alpha)L^{-\beta-1}.

Canceling the β-\beta terms, rearranging (1α)(1-\alpha), and adding the exponents (1/β)1-(1/\beta)-1, we obtain

QL=(1α)A[αKβ+(1α)Lβ](1+β)/βL(1+β).\frac{\partial Q}{\partial L} = (1-\alpha)A \bigl[\alpha K^{-\beta} + (1-\alpha)L^{-\beta}\bigr]^{-(1+\beta)/\beta} L^{-(1+\beta)}.

Substituting A1+β/Aβ=AA^{1+\beta}/A^{\beta}=A, we can write

QL=(1α)A1+βAβ[αKβ+(1α)Lβ](1+β)/βL(1+β).\frac{\partial Q}{\partial L} = (1-\alpha)\frac{A^{1+\beta}}{A^\beta} \bigl[\alpha K^{-\beta} + (1-\alpha)L^{-\beta}\bigr]^{-(1+\beta)/\beta} L^{-(1+\beta)}.

From the CES production function,

A1+β[αKβ+(1α)Lβ](1+β)/β=Q1+β,A^{1+\beta} \bigl[\alpha K^{-\beta} + (1-\alpha)L^{-\beta}\bigr]^{-(1+\beta)/\beta} = Q^{1+\beta},

and

L(1+β)=1L1+β.L^{-(1+\beta)} = \frac{1}{L^{1+\beta}}.

Thus,

QL=1αAβ(QL)1+β.\frac{\partial Q}{\partial L} = \frac{1-\alpha}{A^\beta} \left(\frac{Q}{L}\right)^{1+\beta}.

The marginal product of capital

Similarly,

QK=αAβ(QK)1+β.\frac{\partial Q}{\partial K} = \frac{\alpha}{A^\beta} \left(\frac{Q}{K}\right)^{1+\beta}.

Dividing the two equations and equating the result to PL/PKP_L/P_K (from the FOC) leads to the cancellation of AβA^\beta and QQ:

1αα(KL)1+β=PLPK.\frac{1-\alpha}{\alpha} \left(\frac{K}{L}\right)^{1+\beta} = \frac{P_L}{P_K}.

Rearranging,

(KL)1+β=α1αPLPK,\left(\frac{K}{L}\right)^{1+\beta} = \frac{\alpha}{1-\alpha} \frac{P_L}{P_K},

and therefore,

KL=(α1α)1/(1+β)(PLPK)1/(1+β).\frac{K}{L} = \left(\frac{\alpha}{1-\alpha}\right)^{1/(1+\beta)} \left(\frac{P_L}{P_K}\right)^{1/(1+\beta)}.

Elasticity of substitution

Since α\alpha and β\beta are constants, we can treat K/LK/L as a function of PL/PKP_L/P_K.

Let

h=(α1α)1/(1+β).h = \left(\frac{\alpha}{1-\alpha}\right)^{1/(1+\beta)}.

Then

KL=h(PLPK)1/(1+β).\frac{K}{L} = h\left(\frac{P_L}{P_K}\right)^{1/(1+\beta)}.

The marginal function is

d(K/L)d(PL/PK)=h1+β(PLPK)1/(1+β)1.\frac{d(K/L)}{d(P_L/P_K)} = \frac{h}{1+\beta} \left(\frac{P_L}{P_K}\right)^{1/(1+\beta)-1}.

The average function is

K/LPL/PK=h(PLPK)1/(1+β)1.\frac{K/L}{P_L/P_K} = h\left(\frac{P_L}{P_K}\right)^{1/(1+\beta)-1}.

Dividing the marginal function by the average function, we obtain the elasticity of substitution:

MRS=d(K/L)d(PL/PK)/K/LPL/PK=11+β.\text{MRS} = \frac{d(K/L)}{d(P_L/P_K)} \Big/ \frac{K/L}{P_L/P_K} = \frac{1}{1+\beta}.

This is constant, hence the CES production function exhibits constant elasticity of substitution.


Interpretation

Footnotes
  1. A function need not be defined at the point aa in order to have a limit as xax \to a. For example,

    f(x)=x21x1f(x) = \frac{x^2 - 1}{x - 1}

    is not defined at x=1x = 1, but

    limx1f(x)=2.\lim_{x \to 1} f(x) = 2.
  2. The two functions discussed above are not continuous. The first is not continuous because f(a)f(a) is not defined. The second is not continuous because ff does not converge to a limit as xax \to a. For example, if

    f(x)={1,x<0,1,x>0,f(x) = \begin{cases} -1, & x < 0, \\ 1, & x > 0, \end{cases}

    then ff has no limit as x0x \to 0, since the right-hand limit equals 1 while the left-hand limit equals -1.