Natural Logarithm and Exponential

back to Fan's Intro Math for Econ, Matlab Examples, or MEconTools Repositories
We use log for log utility in our household maximization problems, and we use exponential functions with other bases for production functions.
See also: Exponential and Infinitely Compounding Interest Rate.

Log and Exponential

If the natural log of x is y (in economics we generally just write ln and log interchangeably, becareful though, google thinks function log means log with base 10, matlab thinks function log means base e, you will get different numbers typing in log(10) in google and matlab).
then
where e is Euler's number. Intuitively, is asking what exponent y of base e is needed for to be equal to x. When x is consumption, the log utility of consumption is in some sense the number of e terms needed to be multiplied together to equal to c.
We can also write:
because of this:
The natural log is just the inverse of the exponential function. We use log to linearize exponential functions, which allows us to do regressions afterwards for example.

Log Rules

Suppose we have:
This looks complicated, but because there is log, we can take the equation apart:
Generally (:

Why does ?

Why is the log of the product of two numbers the same as the sum of the log of each of the two numbers? Intuitively, because we can write as the exponential of a sum: when , even though it's multiplication, it is also just , the exponential of a sum.
We can write separately what each term equals to as:
By definition, for each of the three terms above:
So:
Given that: , and :
Hence:

Why does ?

Why is the log of an exponential term equal to the power times the log of the base of the exponential?
We start with:
Proceed:

For Variables that Grow, Log difference is close to rate of change

Suppose that growth rate is x percent per year, after 5 years, the gdp will be:
We can take log on both sides:
Which says that the difference in GDP between these two years divided by 5 is equal to the log of 1 plus the growth rate.
Approximately, for x small:
For example:
xVec = linspace(0,0.10,10);
log(1+ xVec)
ans = 1×10
0 0.0110 0.0220 0.0328 0.0435 0.0541 0.0645 0.0749 0.0852 0.0953
xVec
xVec = 1×10
0 0.0111 0.0222 0.0333 0.0444 0.0556 0.0667 0.0778 0.0889 0.1000
Note: This is a bad approximation if x is large. For example, we know that is almost exact. But the approximation here would have said , which is very incorrect.