Find from first principles, the derivative of $\log (\sec (x^2))$
My Attempt : Let, $y=f(x)=\log (\sec (x^2))$
$f(x+h)=\log (\sec (x+h)^2)$, where $h$ is a small increment in $x$
By first principle, $$f'(x)=\lim_{h\to 0} \dfrac {f(x+h)-f(x)}{h}$$ $$=\lim_{h\to 0} \dfrac {\log (\sec (x+h)^2)-\log(\sec (x^2))}{h}$$
It's faster using equivalents: near $1$, one has $\;\log x\sim x-1$, so $$\log\sec(x+h)^2-\log\sec x^2=\log\frac{\sec(x+h)^2}{\sec x^2}\sim_{h=0}\frac{\sec(x+h)^2}{\sec x^2}-\frac{\cos x^2-\cos(x+h)^2}{\cos(x+h)^2}.$$ Now lets use the factorisation formulæ: \begin{align} \cos x^2-\cos(x+h)^2&=-2\sin\frac{x^2+(x+h)^2}2\sin\frac{x^2-(x+h)^2}2\\ &=-2\sin\frac{2x^2+2hx+h^2}2\sin\frac{-2hx-h^2}2 \sim_{h=0}2\sin x^2\cdot hx, \end{align} so the rate of variation is equivalent to $$\frac{\log\sec(x+h)^2-\log\sec x^2}{h}\sim_{h=0}\frac{\,\cfrac{2\sin x^2\cdot hx}{\cos x^2}\,}h=2x\tan x^2.$$