A function \( f(x, y) \) is homogeneous of degree \( n \) if it satisfies the condition:
\[
f(tx, ty) = t^n f(x, y)
\]
We will now examine each option.
Step 1: Test the function \( y^2 - xy \)
Substitute \( x = tx \) and \( y = ty \) into the function:
\[
f(tx, ty) = (ty)^2 - (tx)(ty) = t^2y^2 - t^2xy = t^2(y^2 - xy)
\]
Since the function scales by \( t^2 \), it is homogeneous of degree 2.
Step 2: Test the function \( x - 3y \)
Substitute \( x = tx \) and \( y = ty \):
\[
f(tx, ty) = tx - 3(ty) = t(x - 3y)
\]
Since the function scales by \( t \), it is homogeneous of degree 1.
Step 3: Test the function \( \sin^2 \left( \frac{y}{x} \right) + \frac{y}{x} \)
Substitute \( x = tx \) and \( y = ty \):
\[
f(tx, ty) = \sin^2 \left( \frac{ty}{tx} \right) + \frac{ty}{tx} = \sin^2 \left( \frac{y}{x} \right) + \frac{y}{x}
\]
Since the function remains unchanged, it is homogeneous of degree 1.
Step 4: Test the function \( \tan x - \sec y \)
Substitute \( x = tx \) and \( y = ty \):
\[
f(tx, ty) = \tan(tx) - \sec(ty)
\]
This function does not scale by any power of \( t \). Therefore, it is not homogeneous.
Thus, the function \( \tan x - \sec y \) is not homogeneous, and the correct answer is (D).