If $f[(\tan(\theta)]=\sec(\theta)$, solve $f'[\tan(\theta)]$.

derivativesreal-analysissolution-verificationtrigonometry

I tried to approach this question from 2 directions and got a very different answer, but couldn't figure out why one of them is incorrect, so hopefully someone with a better background can show me on my error.

Method 1:
$$f(\tan (\theta))=\sec (\theta)$$
$$\mathtt{Let} \, x = \tan (\theta)$$
$$\theta = \tan^{-1} (\theta)$$
$$f(x)=\sec (\tan^{-1} (x))$$
$$f(x)=\sqrt{x^2+1}$$
$$f'(x)=\frac{x}{\sqrt{x^2+1}}$$

$$f'(\tan (\theta))=\frac{\tan (\theta)}{\sqrt{\tan^2 (\theta)+1}}\times(\tan (\theta))'$$
$$f'(\tan (\theta))=\frac{\tan (\theta)}{\sec (\theta)}\times\sec^2 (\theta)=\tan (\theta)\sec(\theta)$$

Method 2:
$$f(\tan(\theta))=\sec(\theta)$$
$$\mathtt{Let}\,g(\theta)=\tan(\theta)$$
$$\mathtt{Let}\,h(\theta)=\sec(\theta)$$
$$f[g(\theta)]=h(\theta)$$

$$[f[g(\theta)]]'=h'(\theta)$$
$$f'[g(\theta)]\times g'(\theta)=h'(\theta)$$
$$f'[g(\theta)]=\frac{h'(\theta)}{g'(\theta)}$$
$$f'[\tan(\theta)]=\frac{[\sec(\theta)]'}{[\tan(\theta)]'}=\frac{\sec(\theta)\tan(\theta)}{\sec^2 (\theta)}=\frac{\tan(\theta)}{\sec(\theta)}=\sin(\theta)$$

The book answer is the same as the second method, so I'm trying to figure out what's wrong on the first method. Thanks in advanced!

Best Answer

If $\displaystyle f'(x)=\frac x{\sqrt{x^2+1}}$, then $\displaystyle f'(\tan(\theta))=\frac{\tan \theta}{\sqrt{\tan^2\theta+1}}=\sin\theta$.