How to solve constants out of the internal energy equation? Imagine we deal with a new kind of matter, whose state is described by:
$$PV = AT^3$$
Its internal energy is given by
$$U = BT^n \ln\left(\frac{V}{V_0}\right) + f(T)$$
where $A$, $B$ and $V_0$ is a constant and $f(T)$ is a polynomial function.
Find $B$ and $n$.

What I know
The given expressions remind me of adiabatic compression/expansion. If we assume quasistatic adiabatic compression/expansion we know that heat won't get out/in the system.
$$\Delta U = -W$$
And work is:
$$W = -P\Delta V$$
Some thoughts on how to solve the problem
We notice here that we are dealing with a non-ideal gas. Assuming that the above equations are correct and using first thermodynamics law one gets:
$$\mathrm{d}U = \left[nBT^{n-1}\ln\left(\frac{V}{V_0}\right) + f'(T)\right]\mathrm{d}T$$
$$\left[nBT^{n-1} \ln\left(\frac{V}{V_0}\right) + f'(T)\right]\mathrm{d}T = \frac{AT^3}{V}\mathrm{d}V$$
I do not see a solution to this differential equation. There has to be a easier way to get both $B$ and $n$, but how?
You need to use the equation $$\left(\frac{\partial U}{\partial V}\right)_T=-\left[P-T\left(\frac{\partial P}{\partial T}\right)_V\right]$$