Differentiate $\tan^3(x^2)$ 
Differentiate $\tan^3(x^2)$

I first applied the chain rule and made $u=x^2$ and $g=\tan^3u$. I then calculated the derivative of $u$, which is $$u'=2x$$ and the derivative of $g$, which is 
$$g'=3\tan^2u$$
I then applied the chain rule and multiplied them together, which gave me 
$$f'(x)=2x3\tan^2(x^2)$$
Is this correct? If not, any hints as to how to get the correct answer?

$$u'=2x$$ 
$$g'=3\tan^2u \cdot sec^2u$$
$$f'(x)=2x \cdot 3\tan^2(x^2)\sec^2(x^2) = 6x\tan^2(x^2)\sec^2(x^2)$$
