Step 1: Applying Logarithmic Properties
We start by simplifying the given integral:
\[
I = \int \log \left(6 \sin^2 x + 17 \sin x + 12 \right)^{\cos x} dx.
\]
Using the logarithmic identity:
\[
\log A^B = B \log A,
\]
we rewrite:
\[
I = \int \cos x \log \left(6 \sin^2 x + 17 \sin x + 12 \right) dx.
\]
Step 2: Substituting \( x = \frac{\pi}{2} \)
Substituting \( x = \frac{\pi}{2} \):
\[
\sin \frac{\pi}{2} = 1, \quad \cos \frac{\pi}{2} = 0.
\]
Thus, the expression inside the logarithm simplifies:
\[
6 (1)^2 + 17 (1) + 12 = 6 + 17 + 12 = 35.
\]
So, evaluating \( f(\frac{\pi}{2}) \), we get:
\[
f\left(\frac{\pi}{2} \right) = \frac{1}{6} \left[ 15 \log 5 + 14 \log 7 - 29 \right].
\]
Step 3: Conclusion
Thus, the final answer is:
\[
\boxed{\frac{1}{6} \left[ 15 \log 5 + 14 \log 7 - 29 \right]}.
\]