Differentiating $\;y = x a^x$ My attempt:
$$\eqalign{
  y &= x{a^x}  \cr 
  \ln y &= \ln x + \ln {a^x}  \cr 
  \ln y &= \ln x + x\ln a  \cr 
  {1 \over y}{{dy} \over {dx}} &= {1 \over x} + \left(x \times {1 \over a} + \ln a \times 1\right)  \cr 
  {1 \over y}{{dy} \over {dx}} &= {1 \over x} + \left({x \over a} + \ln a\right)  \cr 
  {1 \over y}{{dy} \over {dx}} &= {1 \over x} + \left({{x + a\ln a} \over a}\right)  \cr 
  {1 \over y}{{dy} \over {dx}} &= {{a + {x^2} + ax\ln a} \over {ax}}  \cr 
  {{dy} \over {dx}} &= {{a + {x^2} + ax\ln a} \over {ax}} \times x{a^x}  \cr 
  {{dy} \over {dx}} &= {{x{a^{x + 1}} + {x^3}{a^x} + {a^{x + 1}}{x^2}\ln a} \over {ax}}  \cr 
  {{dy} \over {dx}} &= {a^x} + {x^2}{a^{x - 1}} + {a^x}x\ln a  \cr 
  {{dy} \over {dx}} &= {a^x}\left(1 + {x^2}{a^{ - 1}} + x\ln a\right)  \cr 
  {{dy} \over {dx}} &= {a^x}\left({{a + {x^2} + x\ln a} \over a}\right) \cr} $$
However the answer in the back of the book is:
$${dy \over dx} = a^x (1 + x\ln a)$$
What have I done wrong?
 A: Proceeding with your method in approaching the problem, but recalling that we can take $a$ as representing some constant: that is, $\;$ '$a$' $\;$ is a value that is NOT a function of $x$, and so does not get differentiated with respect to $x$. Similarly, so we can take $\ln a$ to be a constant. 
So in your third line, when we see $\,x\ln a,\,$ we will treat it no differently than we would treat, say, $x\ln 3$; that is, $\;\dfrac{d}{dx}\left(x\ln a\right) = \dfrac{d}{dx}\Big((\ln a)\cdot x\Big) = \ln a.\;\;$ (And we will use this when moving from the third line to the fourth line below). 
In contrast, $\,y\,$ IS a function of $x$, so you're correct that $\;\dfrac{d}{dx}(\ln y) = \dfrac 1y \cdot \dfrac{dy}{dx}$:
$$\eqalign{
  & y = x{a^x} \\ 
  & \ln y = \ln x + \ln {a^x}\\ 
  & \ln y = \ln x + x\ln a  \\
  & {1 \over y}{{dy} \over {dx}} = {1 \over x} + \ln a \\
  & {{dy} \over {dx}} = \left({1 \over x} + \ln a\right)\times x{a^x} \\
  & {{dy} \over {dx}} = a^x + xa^x\cdot \ln a  \\
  & {{dy} \over {dx}} = a^x(1 + x\ln a)\cr}$$
A: $y=xa^x$
$$y'=x'a^x+x(a^x)'=a^x+xa^x\ln a=a^x(1+x\ln a)$$
A: When going from line
$$\ln y = \ln x + x \ln a$$
to
$$\frac{1}{y} \frac{dy}{dx} = \frac{1}{x} + (x \times \frac{1}{a} + \ln a \times 1)$$
you made a mistake: when you tried to differentiate $x \ln a$ with respect to x via the product rule, you differentiated $\ln a$ with respect to a, turning it into $\frac{1}{a}$, when you should have done so with respect to x, since you were differentiating the whole product with respect to x. With respect to x, $\ln a$ is a constant. Differentiating the constant (with respect to x) $\ln a$ yields $0$, and thus you'd have $(x \times 0 + \ln a \times 1) = \ln a$. So the above line should be
$$\frac{1}{y} \frac{dy}{dx} = \frac{1}{x} + \ln a$$.
Now multiply by $y = xa^x$ and you should have your answer.
Note, of course, that you don't actually need the product rule: since $\ln a$ is constant, you can just use the rule $\frac{d}{dx} k f(x) = k \frac{df}{dx}$. And this gives $\frac{d}{dx} x \ln a = \frac{d}{dx} (\ln a)x = \ln a \frac{d}{dx} x = \ln a$.
Edit: There's a second mistake in going from the second-to-last line to the last one. $a^x (1 + x^2 a^{-1} + x \ln a) = a^x (\frac{a + x^2 + ax \ln a}{a})$ and not $a^x (\frac{a + x^2 + x \ln a}{a})$ -- but the first mistake makes this irrelevant.
A: $$
\frac{d}{dx} \ln a = \frac 1 a \frac{da}{dx}.
$$
If $\dfrac{da}{dx} = 0$, then you  need to use that fact.
But here's a quicker way: Since $a$ is constant, $\ln a$ is constant, so its derivative is $0$.
