$\log_ax$
I know there is a formula for this, but I am trying to understand the logic behind the formula.
I know that $$\log_ax = \frac{\ln x}{\ln a} = \ln x \cdot \ln a ^{-1}$$ Because this is in the form $f(x)g(x)$, I have to use $f'(x)g(x)+f(x)g'(x)$ to solve this, and so I have:
$$f(x) = \ln x \\ f'(x) = \frac{1}{x} \\ g(x) = \ln a ^{-1} \\ g'(x) = -\frac{1}{a\ln^2 a}$$
So I did:
$$\frac{1}{x} \cdot \ln a ^{-1} + \ln x \cdot -\frac{1}{a\ln^2 a} = \frac{1}{x \ln a} - \frac{\ln x}{a\ln^2 a} = \frac{a \ln^2(a)-\ln(x)x\ln(a)}{ax \ln^3(a)}= \frac{a \ln(a) - \ln (x)x}{ax\ln^2(a)} = \text{???}$$
I think this is wrong. I put it on Wolfram Alpha http://www.wolframalpha.com/input/?i=(aln(a)-ln(x)x)%2F(axln(a)%5E2) and it doesn't seem to simplify to $\frac{1}{\ln(a)x}$, which is the correct answer.
What did I do wrong?