## The "root" Function in MathCAD: the van der Waals Equation

For users of the Mathcad browser: wmc-vdw1.mcd
(12 KB, ver. 5.0)For an industrial process, it is necessary to
introduce 1400 mols of 1,3,5-trihydroxybenzene at a temperature of 560
K and pressure of 150 kPa in a steel cylinder. Calculate the volume of
the cylinder using the
van der Waals equation, if the **a**
and **b** constants are known.

The van der Waals
formula is a third degree equation for the volume:
Higher degree equations are handled by Mathcad with the *root*
function. The syntax is: *root(f(x),x)*. It returns the
value of **x** that makes the function **f**
equal to zero.

Since an iterative algorithm is used for the calculation, an
initial guess value is necessary. It must be borne in mind that for a
third degree equation there are three solutions and which root is found
depends on the initialization value. Of the three roots, only one will
have physical meaning; in other words a negative or a complex value for
the volume, although mathematically correct, has no physical meaning.

« Home » « Mathcad Menu »