# Computing relative error with ideal gas law.

## Problem

I want to compute relative error for volume when i have measured following data. $$\left| \begin{matrix} \hline \text{Measured data}\\ \hline T=301.4\pm 0.1 \text{ K}\\ p=253.1\pm0.04 \text{ kPa} \\ \hline \end{matrix} \right| \quad \left| \begin{matrix} \hline \text{Constants} \\ \hline n=2.0 \text{ mol} \\ R=8.31447 \frac{\text{J}}{\text{K mol}} \\ \hline \end{matrix} \right|$$ $$\left| \begin{matrix} \hline n=\text{amount of substance in gas(in moles)} \\ T=\text{The absolute temperature of gas} \\ p=\text{pressure of the gas} \\ V=\text{volume of the gas} \\ R=\text{gas constant} \\ \hline \end{matrix} \right|$$ wikipedia - Ideal gas law

## Attempt to solve:

A expression for volume in this case can be easily derived from ideal gas law

$$pV=nRT$$ Expression for volume is: $$V=\frac{nRT}{p}$$

To my understanding we should be able to compute the relative error $\Delta V$ with partial differential equation:

$$\Delta V = |\frac{\delta V}{\delta p}|\Delta p+ |\frac{\delta V}{\delta T}|\Delta T$$

$$\Delta V =|-\frac{nRT}{p^2}|\Delta p + |\frac{nR}{p}|\Delta T$$

If we plug in the values

$$\Delta V =|-\frac{2 \text{ mol}\cdot 8.31447 \frac{\text{J}}{\text{K mol}}\cdot 301.4 \text{ K}}{(253.1 \text{ kPa})^2}|\cdot0.04 + |\frac{2.0 \text{ mol}\cdot 8.31447 \frac{\text{J}}{\text{K mol}}}{253.1 \text{ kPa}}|\cdot0.1$$

$$\Delta V \approx 9.699668356 \cdot 10^{-3} \text{ m}^3$$ and in liters $$\Delta V \approx 9.699668356 \text{ L}$$

$$\Delta V \approx 9.7 \text{ L}$$

For some unknown reason this isn't the correct answer to this problem. If someone can spot the error that would be highly appreciated.

## 1 Answer

I get by 10^-6, not 10^-3 in Mathcad: 