The determinant of f(x) is:
\[ f(x) = \begin{vmatrix} \cos x & x & 1 \\ 2 \sin x & x^3 & 2x \\ \tan x & x & 1 \end{vmatrix}. \]
Step 1: Expand the determinant.
Expand along the first row:
\[ f(x) = \cos x \cdot \begin{vmatrix}x^3 & 2x \\ x & 1 \end{vmatrix} - x \cdot \begin{vmatrix}2 \sin x & 2x \\ \tan x & 1 \end{vmatrix} + 1 \cdot \begin{vmatrix}2 \sin x & x^3 \\ \tan x & x \end{vmatrix}. \]
Simplify each minor determinant:
Thus:
\[ f(x) = \cos x (x^3 - 2x^2) - x (2 \sin x - 2x \tan x) + (2x \sin x - x^3 \tan x). \]
Step 2: Simplify \(\frac{f(x)}{x^2}\).
Divide \(f(x)\) by \(x^2\):
\[ \frac{f(x)}{x^2} = \frac{\cos x (x^3 - 2x^2)}{x^2} - \frac{x (2 \sin x - 2x \tan x)}{x^2} + \frac{2x \sin x - x^3 \tan x}{x^2}. \]
Simplify each term:
Thus:
\[ \frac{f(x)}{x^2} = \cos x (x - 2) - \left(\frac{2 \sin x}{x} - 2 \tan x\right) + \left(\frac{2 \sin x}{x} - x^2 \tan x\right). \]
Step 3: Take the limit as \(x \to 0\).
Using standard limits:
\[ \lim_{x \to 0} \frac{\sin x}{x} = 1, \quad \lim_{x \to 0} \tan x = x, \quad \lim_{x \to 0} \cos x = 1, \]
substitute \(x \to 0\):
Combine terms:
\[ \lim_{x \to 0} \frac{f(x)}{x^2} = -2 - 2 + 2 = -2. \]
Conclusion: The value of \(\lim_{x \to 0} \frac{f(x)}{x^2}\) is:
\[ \boxed{-2}. \]