Photon gas, recovering state function from empirical result Given that for a photon gas the following is true:
$$U=3pV$$
$$\mu=0$$
I want to recover a state function $U(S,V,N)$ (or $S(U,V,N)$ or $F(T,V,N)$ etc.) in the most direct, simple way. So far I got it by using an extensivity argument to show $p=p(T)$ only, obtaining the relation $p=\alpha T^4$ from Maxwell relations on the free energy and writing (due to extensivity)
$$U=TS-pV \Rightarrow F = -pV = -p(T)V$$
This way seems lengthy, arbitrary and not very enlightening. I'm looking for a more methodical approach, but I'm stuck.
Edit: What I'm essentially looking for is this. Given the two relations:
$$U=3pV$$
$$TS=4pV \Rightarrow U=\frac{3}{4}TS$$
(where the second one is a consequence of extensivity and $\mu=0$), I want to recover $U(S,V)$. Which means essentially expressing $p=p(S,V)$. Starting from 
$$p=-\left(\frac{\partial U}{\partial V}  \right)_S = - \frac{\partial (U,S)}{\partial(V,S)}$$
and manipulating the Jacobians, I want to get $p=p(S,V)$.
 A: Perhaps the following would be acceptable: first derive Stefan's law for the energy density $u = \frac{U}{V}$, $u = u(T)$, then use the 2nd of your equations, $U = \frac{3}{4}TS$ to eliminate $T$ and obtain $U = U(S, V)$. 
A thermodynamic derivation of Stefan's law is available in Sec.2.9 of this lecture: "Blackbody radiation". It goes like this:
Take $S = S(V, T)$ into the first law:
$$
dU = TdS - pdV = T \left(\frac{\partial S}{\partial T} \right)_V dT + \left[T\left(\frac{\partial S}{\partial V} \right)_T - p\right]dV
$$
to obtain
$$
\left(\frac{\partial U}{\partial V} \right)_T = T\left(\frac{\partial S}{\partial V} \right)_T - p
$$
Maxwell's relation $\left(\frac{\partial S}{\partial V} \right)_T = \left(\frac{\partial p}{\partial T} \right)_V$ then gives
$$
\left(\frac{\partial U}{\partial V} \right)_T = T\left(\frac{\partial p}{\partial T} \right)_V - p
$$
Now, from $p = p(T)$ and $U = u V = 3 p V$ it follows that $u = u(T)$, $\left(\frac{\partial U}{\partial V} \right)_T = u$, and $\left(\frac{\partial p}{\partial T} \right)_V = \frac{du}{dT}$. Substitute in the equation above and obtain a differential equation for $u(T)$ reading
$$
T \frac{du}{dT} = 4 u 
$$
This is solved to give Stefan's law, 
$$
u(T) = \sigma T^4
$$ 
Then substitute $T = \frac{4}{3}\frac{U}{S}$ and rearrange to obtain 
$$
U = a \left( \frac{S}{V} \right)^{\frac{4}{3}} V
$$
where $ a = \frac{1}{\sigma^{1/3}}\left(\frac{3}{4}\right)^{4/3}$. Finally, from $U = 3pV$, the pressure is 
$$
p = \frac{a}{3} \left( \frac{S}{V} \right)^{\frac{4}{3}}
$$
