# Elasticity when the demand function is given

Given the demand function, $$q = kp^{-\epsilon}$$, how do I calculate the elasticity? As a result, I do know that the elasticity when the demand function is in this form is $$- \epsilon$$. But I'd like to know how. I also found a derivation online that proceeded like this:

(1) Take logarithm on both sides (2) Differentiate on boths ides (3) You'll get: $$\frac {\text{d} \ln(q)}{\text{d} \ln (p)} = - \epsilon$$ (4) The LHS of the above equation is simply elasticity.

How does $$\frac {\text{d} \ln(q)}{\text{d} \ln (p)}$$ represent elasticity?

The definition of elasticity of demand with respect to price is: $$\varepsilon_{q,p} = \frac{dq}{dp} \cdot \frac{p}{q}$$. So in your demand function we have:
$$q = kp^{-\epsilon}$$ $$\frac{dq}{dp} = -\epsilon kp^{-\epsilon - 1}$$ $$\varepsilon_{q,p} = \frac{dq}{dp}\cdot \frac{p}{q} = -\epsilon kp^{-\epsilon - 1} \cdot \frac{p}{kp^{-\epsilon}} = -\epsilon$$
Suppose we have the function $$y=ln(x)$$ Take the first order derivative: $$\frac{d y}{d x}=\frac{1}{x}$$ Multiply both sides by $$dx$$: $$dy=\frac{dx}{x}$$ In words:a change in the natural logarithm due to an infinitesmal small change in $$x$$ is equal to the relative change in $$x$$ due to an infinitesmal change in $$x$$, in your example this means that $$dln(q)=\frac{dq}{q}$$ This is exactly what you're interested in, namely the relative change in $$q$$. So indeed $$\frac{dln(q)}{dln(p)} \approx \frac{\Delta q/q}{\Delta p/p}$$