Let's determine the range of the function

$$
f(x)=\frac{4-3 \sin ^{6} x-3 \cos ^{6} x}{\sin x \cos x}
$$

in the interval $\left(0, \frac{\pi}{2}\right)$.
First, we simplify $f$ using the identities

$a^{3}+b^{3}=(a+b)^{3}-3 a b(a+b)$, $\sin ^{2} x+\cos ^{2} x=1$, and $\sin 2 x=2 \sin x \cos x$:

$$
\begin{aligned}
f(x) & =\frac{4-3\left(\sin ^{6} x+\cos ^{6} x\right)}{\sin x \cos x}= \\
& =\frac{4-3\left(\left(\sin ^{2} x+\cos ^{2} x\right)^{3}-3 \sin ^{2} x \cos ^{2} x\left(\sin ^{2} x+\cos ^{2} x\right)\right)}{\sin x \cos x}= \\
& =\frac{4-3\left(1-3 \sin ^{2} x \cos ^{2} x\right)}{\sin x \cos x}=\frac{1+9(\sin x \cos x)^{2}}{\sin x \cos x}=\frac{2}{\sin 2 x}+\frac{9}{2} \sin 2 x .
\end{aligned}
$$

Let $y=\sin 2 x$. Since $2 x$ can be any point in the interval $(0, \pi)$, and the range of the sine function in this interval is the interval $(0,1]$, the set we are looking for is the range of the function

$$
g(y)=\frac{2}{y}+\frac{9}{2} y
$$

on the set $(0,1]$.

By the arithmetic mean-geometric mean inequality,

$$
g(y)=\frac{\frac{4}{y}+9 y}{2} \geqslant \sqrt{\frac{4}{y} \cdot 9 y}=\sqrt{36}=6
$$

Equality holds when $y=\frac{2}{3}$.

Thus, the range is a subset of $[6, \infty)$ and includes 6. We need to show that if $c>6$, then $g$ takes the value $c$ in the interval $(0,1]$, i.e., the equation

$$
\frac{2}{y}+\frac{9}{2} y=c
$$

has a solution in $(0,1]$.

Rewriting the equation:

$$
\frac{9}{2} y^{2}-c y+2=0
$$

The discriminant of this equation is $c^{2}-36>0$, so it has two real roots. The product of the roots is $\frac{4}{9}$, which implies that the roots have the same sign and cannot both have an absolute value greater than $\frac{2}{3}$.

Since the sum of the roots is $\frac{2 c}{9}$, which is positive, both roots are positive.

Therefore, the equation (1) has two positive solutions; the smaller of which is at most $\frac{2}{3}$. Thus, the function $g$ takes the value $c$ in the interval $\left(0, \frac{2}{3}\right]$.

Hence, the range of the function $f$ in the interval $\left(0, \frac{\pi}{2}\right)$ is the ray $[6, \infty)$.

Remark. We can also prove that $g$ takes the value $c$ in the interval $(0,1]$ using the Bolzano theorem. Since $\lim _{y \rightarrow 0+0} g(y)=+\infty$, the function $g$ takes values greater than $c$, and since $g\left(\frac{2}{3}\right)=6<c$, it also takes values less than $c$. Since $g$ is continuous, by the Bolzano theorem, it must also take the value $c$ at some point between 0 and $\frac{2}{3}$.