Elasticity and logarithms

Let's consider a relationship between $$y$$ and $$x$$, $$y = a x^b$$. Taking log on both sides, we have $$\log y = \log a + b \log x$$

Now, my textbook, Nicholson and Snyder's Basic Principles and Extensions derives the relationship between elasticity and the logarithm of the two variables thus:

$$\eta = b = \frac{ d \log y}{d \log x}$$

Now, I understand that $$d \log y = \frac 1y dy$$ and $$d \log x = \frac 1x \ dx$$. So I understand why we can write $$\eta = \frac {d \log y}{d \log x}$$. What I don't understand is: why does $$b$$, which is the power on the variable $$x$$, equal $$\eta$$?

Here's a snapshot from the book:

• About half of your questions have been answered, consider accepting some. – Giskard Jan 13 '19 at 13:24
• Thank you for pointing that out. I'll do so right away. – WorldGov Jan 13 '19 at 13:44

Because $$a$$ is a parameter, and so $$\eta = \frac{ d \log y}{d \log x} = \frac{ d \log a + b \log x}{d \log x} = 0 + b.$$
Differentiating both sides of the equation with respect to $$x$$, using the chain rule for the left hand side and noting that, since $$a$$ is a parameter, $$da/dx=0$$: $$\frac{1}{y}\frac{dy}{dx}=b\frac{1}{x}$$ Rearranging: $$\frac{dy/y}{dx/x}=\eta=b$$