Evaluate $\lim_{h\to 0}\frac{1}{h^2}\begin{vmatrix}\tan x&\tan(x+h)&\tan(x+2h)\\\tan(x+2h)&\tan x&\tan(x+h)\\\tan(x+h)&\tan(x+2h)&\tan x\end{vmatrix}$ Evaluate
$$
\lim_{h\to 0}\frac{\Delta}{h^2}=\lim_{h\to 0}\frac{1}{h^2}\begin{vmatrix}
\tan x&\tan(x+h)&\tan(x+2h)\\
\tan(x+2h)&\tan x&\tan(x+h)\\
\tan(x+h)&\tan(x+2h)&\tan x
\end{vmatrix}
$$
Attempt
$$
\lim_{h\to 0}\frac{\Delta}{h^2}=\begin{vmatrix}
\lim_{h\to 0}\tan x&\lim_{h\to 0}\dfrac{\tan(x+h)-\tan x}{h}&\lim_{h\to 0}\dfrac{\tan(x+2h)-\tan(x+h)}{h}\\
\lim_{h\to 0}\tan(x+2h)&\lim_{h\to 0}\dfrac{\tan x-\tan(x+2h)}{h}&\lim_{h\to 0}\dfrac{\tan(x+h)-\tan(x+2h)}{h}\\
\lim_{h\to 0}\tan(x+h)&\lim_{h\to 0}\dfrac{\tan(x+2h)-\tan(x+h)}{h}&\lim_{h\to 0}\dfrac{\tan x-\tan(x+2h)}{h}
\end{vmatrix}\\
=\begin{vmatrix}
\lim_{h\to 0}\tan x&\lim_{h\to 0}\dfrac{\tan(x+h)-\tan x}{h}&\lim_{h\to 0}\dfrac{\tan(x+2h)-\tan(x+h)}{h}\\
\lim_{h\to 0}\tan(x+2h)&-2.\lim_{h\to 0}\dfrac{\tan(x+2h)-\tan x}{h}&-1.\lim_{h\to 0}\dfrac{\tan(x+2h)-\tan(x+h)}{h}\\
\lim_{h\to 0}\tan(x+h)&\lim_{h\to 0}\dfrac{\tan(x+2h)-\tan(x+h)}{h}&-2.\lim_{h\to 0}\dfrac{\tan(x+2h)-\tan x}{2h}
\end{vmatrix}\\
$$
$$
\lim_{h\to 0}\dfrac{\tan(x+h)-\tan x}{h}=\frac{d}{dx}\tan x=\sec^2x\\
\lim_{h\to 0}\dfrac{\tan(x+2h)-\tan x}{2h}=\frac{d}{dx}\tan x=\sec^2x\\
\lim_{h\to 0}\dfrac{\tan(x+2h)-\tan(x+h)}{h}=\frac{d}{dx}\tan(x+h)=\sec^2(x+h)
$$
But my reference gives the solution $9\tan x.\sec^4x$, I think by taking $\lim_{h\to 0}\dfrac{\tan(x+2h)-\tan(x+h)}{h}=\sec^2x$. Will that make a difference ?
It might be silly but could anyone clarify this confusion in my attempt ?
 A: $$ \Delta = \begin{vmatrix} \tan x&\tan(x+h)&\tan(x+2h)\\
\tan(x+2h)&\tan x&\tan(x+h)\\
\tan(x+h)&\tan(x+2h)&\tan x \end{vmatrix} $$
$$=\begin{vmatrix} \tan x&\tan(x+h)-\tan x&\tan(x+2h)-\tan x\\
\tan(x+2h)&\tan x-\tan(x+2h)&\tan(x+h)-\tan(x+2h)\\
\tan(x+h)&\tan(x+2h)-\tan(x+h)&\tan x-\tan(x+h) \end{vmatrix} $$
$$=\begin{vmatrix} \tan x&\dfrac{\sin h}{\cos(x+h)\cos x}&\dfrac{\sin2h}{\cos(x+2h)\cos x}\\
\tan(x+2h)&-\dfrac{\sin2h}{\cos(x+2h)\cos x}&-\dfrac{\sin h}{\cos(x+h)\cos(x+2h)}\\
\tan(x+h)&\dfrac{\sin h}{\cos(x+h)\cos(x+2h)}&-\dfrac{\sin h}{\cos x\cos(x+h)} \end{vmatrix} $$
$$=\dfrac{\sin^2h}{\cos x\cos(x+2h)\cos(x+h)}\begin{vmatrix} \sin x&\dfrac1{\cos(x+h)}&\dfrac{2\cos h}{\cos(x+2h)}\\
\sin(x+2h)&-\dfrac{2\cos h}{\cos x}&-\dfrac1{\cos(x+h)}\\
\sin(x+h)&\dfrac1{\cos(x+2h)}&-\dfrac1{\cos x} \end{vmatrix}$$
Use $\lim_{h\to0}\dfrac{\sin h}h=1$
Finally set $\lim_{h\to0} \Delta$
$$=\begin{vmatrix}\sin x&\sec x&2\sec x\\
\sin x&-\sec x&-\sec x\\
\sin x&\sec x&-\sec x\end{vmatrix}=\sin x\sec^2x\begin{vmatrix}1&1&2\\
1&-1&-1\\
1&1&-1\end{vmatrix}=?$$
A: For
$$M=\left(
\begin{array}{ccc}
 a & b & c \\
 c & a & b \\
 b & c & a
\end{array}
\right)\implies |M|=a^3+b^3+c^3-3 a b c$$ So, replacing
$$\Delta=\tan ^3(x)+\tan ^3(x+h)+\tan ^3(x+2 h)-3 \tan (x) \tan (x+h) \tan (x+2 h)$$ Now, composing Taylor series around $h=0$ gives
$$\Delta=9  \left(\tan ^5(x)+2 \tan ^3(x)+\tan (x)\right)h^2+O\left(h^3\right)=9\tan (x) \sec ^4(x)\,h^2+O\left(h^3\right)$$
A: It is easy to see $\lim_{h\to 0}\frac1h(\tan(x+2h)-\tan(x+h))$ is the derivative of $\tan$ at $x$ if you already know Taylor expansion, but if you probably haven't encounter them yet, here is a way without explicit expansion:
Note that
\begin{align*}
\frac{\tan(x+2h)-\tan(x+h)}{h}&=
\frac{\tan(x+2h)-\tan x}{h}-\frac{\tan(x+h)-\tan x}{h}\\
&=2\frac{\tan(x+2h)-\tan x}{2h}-\frac{\tan(x+h)-\tan x}{h}.
\end{align*}
So, taking limit $h\to 0$, we have
$$
\lim_{h\to0}\frac{\tan(x+2h)-\tan(x+h)}{h}=2\frac{\mathrm{d}}{\mathrm{d}x}\tan x-\frac{\mathrm{d}}{\mathrm{d}x}\tan x=\frac{\mathrm{d}}{\mathrm{d}x}\tan x.
$$
