Can someone give me a hint with this problem?

The problem is:

(tan x)^(arctan x)

I was trying to use:

Dx (a)^u = (a)^u * ln(a) * Dx u

I am getting:

(tan)^(arctan x) * ln(tanx) * 1/(1+x^2)

The answer in the back of my book is:

(tan)^(arctan x) * [arctan(x)cot(x)sec^2(x) + ln(tanx)/(1+x^2)

I am messing up with the chain rule somewhere I think =(.

Again just a hint will do! Thanks!!!