Let's consider $\Theta = \{0, 1\}$ and $X$ random variable with density $f(x;0) = 1$ and $f(x; 1) = 3x^2$ for $x \in [0, 1]$.
I want to find the uniformly powerful test of size $\alpha = 0.95$ for $H_0:\theta = 0$ and $H_1: \theta = 1$.
My work so far
Let's take sample from our distribution $X$: $x_1, x_2,...,x_n \sim X$. Then:
$$\frac{f_1(x)}{f_2(x)} = \frac{1 \cdot 1 \cdot 1 \cdot ... \cdot 1}{3x_1^2 \cdot 3x_2^2 \cdot ... \cdot 3x_n^2 \cdot \prod_{i = 1}^n 1_{\{(0, 1)\}}(x_i)} = \frac{ 1}{3^n(x_1 x_2...x_n)^2 \cdot \prod_{i = 1}^n 1_{\{(0, 1)\}}(x_i)}$$
Now in when searching for uniformly powerful test we are interested in such $k$ that satisfies:
$$P_0(f_1(x) > k f_2(x)) = \alpha$$
$$P(1 >k \cdot 3^n (x_1...x_n)^2 \prod_{i = 1}^n 1_{\{(0, 1)\}}(x_i)) = \alpha$$
$$P(k < \frac{1}{(x_1...x_n)^2 \cdot 3^n \cdot \prod_{i = 1}^n 1_{\{(0, 1)\}}(x_i)}) = \alpha$$
and here I get stuck. I'm not sure how to find such a $k$ that will satisfy this condition. Can I ask you for a hand in finding such $k$?
Note that under the null hypothesis the sample $X_i \sim \text{Uniform}(0,1)$
The indicators can be safely dropped, and the equation becomes
$$ \begin{align} && \Pr\left\{\left(\prod_{i=1}^n X_i\right)^2 < \frac {1} {k 3^n} \right\} & = \alpha \\ \iff && \Pr\left\{2\sum_{i=1}^n \ln X_i < -\ln k - n\ln 3\right\} & = \alpha \\ \iff && \Pr\left\{-\sum_{i=1}^n \ln X_i > \frac{\ln k + n\ln 3} {2} \right\} & = \alpha \end{align} $$
It is well-known that $-\ln X_i \sim \text{Exp}(1)$ (easy to verify as well) and thus $$ -\sum_{i=1}^n \ln X_i \sim \text{Gamma}(n,1) $$
So here $\displaystyle \frac{\ln k + n\ln 3} {2}$ is the $1 - \alpha$ quantile of $\text{Gamma}(n, 1)$, which can be computed numerically.
$k$ can be computed accordingly but is not necessary to find it, as long as we use $$ T = -\sum_{i=1}^n \ln X_i$$ as the test statistic. The test will reject $H_0$ when $T$ is small (less than the quantile we found above).