<s>[INST] Why is $\sec^2 (\tan^{-1} (\frac{x}{2})) = 1 + \tan^2 (\tan^{-1} (\frac{x}{2}))$ and not $(1 + \tan^2 )(\tan^{-1} (\frac{x}{2}))$? 
Why is $\sec^2 (\tan^{-1} (\frac{x}{2})) = 1 + \tan^2 (\tan^{-1} (\frac{x}{2}))$ and not $(1 + \tan^2 )(\tan^{-1} (\frac{x}{2}))$?

If you replace $\sec^2$ with $\tan^2 + 1$, it should be $(1 + \tan^2 )(\tan^{-1} (\frac{x}{2}))$, right?
However, it seems that it is not multiplication here : $\sec^2 (\tan^{-1} (\frac{x}{2}))$, when the $1$ becomes independent of the $\tan^2$ somehow.
Could someone explain why?
 [/INST] The correct statement is $\sec^2(y)=1+\tan^2(y)$.
Now let $y=\tan^{-1}\left(\dfrac x2\right)$.
I hope this helps you see why.
</s>