Derivative Definition and Rules

back to Fan's Intro Math for Econ, Matlab Examples, or MEconTools Repositories

Linear and Non-linear Functions

Linear functions have a constant slope, but what is the rate of change for a non-linear function as we shift along its domain?

Definition

(SB) Let be a point on te graph of .
The derivative of f at is the slope of the tangent line to the graph of f at .
There are some common ways of denoting derivative of funtion f at :
We write this analyticaly as:
If this limit exists, then the function f is differentiable at .
We will use this formula to derive first order taylor approximation. And this will also appear when we derive the formula for point elasticity.

Derivative Rules--Constant Rule

given constant k,:
syms x a
f(x, a) = a*x
f(x, a) = 
dfk = diff(f,x)
dfk(x, a) = 
a

Derivative Rules--Power Rule (Polynomial Rule)

(SB) For any positive integer k (or real number k), the derivative of at is:
syms x a k
f(x, a, k) = a*x^k
f(x, a, k) = 
dfk = diff(f,x)
dfk(x, a, k) = 

Derivative Rules--Chain Rule

syms x a k
f(x, a, k) = (a*x)^k
f(x, a, k) = 
dfk = diff(f,x)
dfk(x, a, k) = 

Derivative Rules--Sum (and difference) Rule

Given functions p and q that are differentiable at x, then:
syms x a b c d
f(x, a, b, c, d) = a*x^b + c*x^d
f(x, a, b, c, d) = 
dfk = diff(f,x)
dfk(x, a, b, c, d) = 

Derivative Rules--Product Rule

Given functions p and q that are differentiable at x, then:
syms x a b c d
f(x, a, b, c) = (a*x^b)*(c*x^d)
f(x, a, b, c) = 
dfk = diff(f,x)
dfk(x, a, b, c) = 

Derivative Rules--Quotient Rule

Given functions p and q that are differentiable at x, then:
Note that the quotient rule is based on the product rule, because:
So you can derive the quotient rule formula based on the product rule where the first term is and the second term is .
syms x a b c d
f(x, a, b, c) = (a*x^b)/(c*x^d)
f(x, a, b, c) = 
dfk = diff(f,x)
dfk(x, a, b, c) = 

Derivative Rules--Exponential

We use exponential functions in economnics a lot:
syms x a
f(x, a) = exp(a*x)
f(x, a) = 
dfk = diff(f,x)
dfk(x, a) = 
This is a special case of any power function
note that
syms x a c
f(x, a, c) = c^(a*x)
f(x, a, c) = 
dfk = diff(f,x)
dfk(x, a, c) = 

Derivative Rules--Log

We use Log functions in economnics a lot:
note that the c cancels out.
syms x a
f(x, a) = log(a*x)
f(x, a) = 
dfk = diff(f,x)
dfk(x, a) =