Internal Energy $dU$ can be claculated from
\begin{equation}
dU=\left(\frac{\partial U}{\partial V}\right)_{T}dV+\left(\frac{\partial U}{\partial T}\right)_{V}dT
\end{equation}
We know that
\begin{equation}
\left(\frac{\partial U}{\partial T}\right)_{V}=C_{V}
\end{equation}
One can use Maxwell's equation (which can be seen from $dU=TdS-PdV$):
\begin{equation}
\left(\frac{\partial T}{\partial V}\right)_{S}=-\left(\frac{\partial P}{\partial S}\right)_{V}
\end{equation}
and can calculate
\begin{equation}
\left(\frac{\partial U}{\partial V}\right)_{T}=T\left(\frac{\partial P}{\partial T}\right)_{V}-P
\end{equation}
Therefore,
\begin{equation}
dU=\left(T\left(\frac{\partial P}{\partial T}\right)_{V}-P\right)dV+C_{V}dT
\end{equation}
In the case of ideal gas, equation of state is $PV=nRT$,
\begin{equation}
\left(\frac{\partial U}{\partial V}\right)_{T}=T\left(\frac{\partial P}{\partial T}\right)_{V}-P=0
\end{equation}
and internal energy can be integrated which gives
\begin{equation}
\Delta U=C_{V}(T_{f}-T_{i})
\end{equation}
.
In the case of adiabatic expansion $dS=0$, which gives
\begin{equation}
dU=-PdV
\end{equation}
Using, $PV^{\gamma}=\text{constant}$ .If constant is k we can integrate
and find
\begin{equation}
\Delta U=k\left(\frac{V_{f}^{-\gamma-1}-V_{i}^{-\gamma-1}}{\gamma+1}\right)
\end{equation}
It was simple in the above two cases because we could reduce integration
in one variable.
Now if we consider a toy model
\begin{equation}
PVT^{3}=k
\end{equation}
In this case
\begin{equation}
\left(\frac{\partial U}{\partial V}\right)_{T}=\left(T\left(\frac{\partial P}{\partial T}\right)_{V}-P\right)=-4P=-4\frac{k}{VT^{3}}
\end{equation}
If we want to integrate $dU$ , $\left(\frac{\partial U}{\partial V}\right)_{T}dV=-4\frac{k}{VT^{3}}dV$
has 2 independent variables and cannot be integrated.
Hence, integration of the internal energy depends on the equation
of state. In some cases, it is possible to integrate and in other
cases it won't be possible to integrate internal energy.