Solve $ax+bx^0+\frac{c}{x}+\frac{d}{x^2}=0$ for $x$

74 Views Asked by At

I find myself trying to produce a plot of the van der Waals equation of the form $PV(P)$ to demonstrate the non-ideality of some gases.

The van der waals equation is $$(P-b)\left(V-\frac{a}{V^2}\right)=RT$$

where $P$ and $V$ are variables and everything else is constant.

I have been able to convert the equation into one where there is only $PV$ and $P$ (i.e. no $V$ left be itself). I can do this because $P$ and $V$ are pressure and volume, respectively - physical quantities that cannot be zero.

$$\begin{align} (P-b)\left(V-\frac{a}{V^2}\right)&=RT \\ PV-bV-\frac{aP-ab}{V^2}&=RT\\ (PV)-\frac{bP}{(PV)}-\frac{aP^3-abP^2}{(PV)^2}&=RT\\ (PV)-RT-\frac{bP}{(PV)}-\frac{aP^3-abP^2}{(PV)^2}&=0 \end{align}$$

Now I have an equation of form, where $x=(PV)$:

$$ax+bx^0+\frac{c}{x}+\frac{d}{x^2}=0$$

How can I solve this equation for $x$? I feel like there is a way to do this that I may have learned once upon a time, but my university maths courses are more than a decade in the past. Alternatively, I will accept an alternate approach to convert the original van der Waals equation into the form $PV$ as a function of $P$.

1

There are 1 best solutions below

0
On

The reduced form of the Van der Waals equation, which is dimensionless, might be a better choice for an abstract study.

The Wikipedia page you linked to gives the form :

$$\left(p+\frac{3}{v^2}\right)\left( v-\frac{1}{3}\right)=\frac{8}{3}t$$

And you can rework this in your desired form as :

$$\left(p+\frac{3p^2}{(pv)^2}\right)\left( pv-\frac{p}{3}\right)=\frac{8}{3}tp$$

For convenience we set $y=pv$ and $c=\frac{8t}{3}$

Multiply across by $3y^2$

$$p\left(y^2+3p\right)\left(3y-p\right)=3cpy^2$$

And we get a cubic :

$$3py^3-p^2y^2+9p^2y-3p^3=3cpy^2$$

Or

$$y^3-\left(\frac{p+8t}{3}\right)y^2+3py-p^2=0$$

This form looks a little strange if you think in physical quantities, but remember that they are dimensionless.

You simply have to use the cubic root finding methods to work with this.

If you are graphing a continuous set of values you can employ the differential equation and numerical methods for DE's to get values :

$$\frac{dy}{dp}=\frac{2p}{3y^2-\left(\frac{2(p+8t)}{3}y\right)+3p}$$

Using this approach you would solve the cubic equation just for your initial values, and then use numerical DE method to approximate subsequent values. This will be less accurate than solving for the cubic at every point you want.