Econ 407:
Log and Exponential Functions.
Examples of Exponential Functions and their graphs
>
y:=a^x;
The simplest exponential function--where a is a constant and x is a variable.
>
y:=2^x;
>
plot(y,x=0..2);
>
Wpop:=6^x;
>
plot(Wpop,x=0..2.3);
>
plot({0.3^x,0.4^x,0.5^x},x=-2.0..3);
>
plot({3^(-x),4^(-x),5^(-x)}, x=-3..3);
>
>
y:=exp(0.5*x);
>
eval(y,x=2);
>
y:=exp(x);
>
dy:=diff(y,x);
>
plot(y,x=-2..2);
>
plot({y,dy},x=-2..2);
An important exponential function is y=e^x, where e is the base of the natural log. One of the interesting properties of this function is that its first, second, third derivatives are identical to the original function.
>
y:=exp(x);
>
y:=exp(2*x);
>
dy:=diff(y,x);
>
plot({y,dy},x=-2..2);
>
y:=exp(5*x^2);
>
dy:=diff(y,x);
>
y:=exp(5*x^5);
>
dy:=diff(y,x);
>
y:=exp(5*x^(-2));
>
dy:=diff(y,x);
Here is an example of a demand and supply function which depend on the natural log of price. Note that in such a function, the coefficient of price (i.e. the number multiplied by log(p) is a measure of elastcity of demand or supply.
>
qd:=120-8*log(p);
>
qs:=50*log(p)-60.0;
>
eval(qd,p=19.0);
>
eval(qs,p=19.0);
>
solve(qd=qs,p);
>
eval(qd,p=22.27462807);
>
eval(qs,p=22.27462807);
>
>