Please write Matlab codes for these problems:
i) Express the van der Waals equation of state in corresponding states form, i.e. in the form
P/Pc = f(T/Tc, V/Vc)
ii) Prepare a graph showing reduced pressure versus reduced volume for various values of reduced temperature both above and below Tc.
iii) Draw a graph with an isotherm for T = 0.7Tc and add a horizontal line at a constant pressure. Position this line at a pressure where there are three real roots (values of volume at the given pressure) of the equation of state.
iv) At the pressure in part c) solve for the three roots of the equation of state using f solve.