Analytical solutions to shocks and rarefactions for non-ideal state equations