I have the solution but can't find an explanation that makes sense to me so I'm hoping someone here can explain it to me.
Question: Consider a sample with just one observation $X$ that is assumed to have a probability density function $f_X$ that depends on an unknown parameter $\theta\in\{0, 1\}$. The density $f_X$ is given by:
For $\theta=0$:
$$ f_X(x) = \begin{cases} 2x & \text{for 0 < $x$ < 1,}\\ 0 & \text{otherwise.} \end{cases} $$
For $\theta=1$:
$$ f_X(x) = \begin{cases} 3x^2 & \text{for 0 < $x$ < 1,}\\ 0 & \text{otherwise.} \end{cases} $$
Consider the following two hypotheses:
$H_0: \theta = 0 \\ H_1: \theta = 1$
We are interested in using the following test: Accept $H_0$ if $X \leq c$ where $c>0$ is a constant.
Determine $c$ so the above test has level of significance $\alpha = 0.05$.
I know the answer is $c = 0.9746$ but I don't understand why. My textbook doesn't seem to have any examples that are like this.
$$\begin{align} \alpha&=P(X>c|\theta=0)\\ &=1-\frac12\cdot c\cdot2c\\ &=1-c^2. \end{align} $$ Now if $\alpha=0.05$ we have $c=\sqrt{0.95}$.