Calculate the partial vapor pressures of a variable at xB = 0.75 based on the interpolation functions of the data

I'm having troubles in solving an exercise for an assignment in my Chemistry course. Talking about interpolations, I've already have a graph but I need to calculate the partial vapor pressures of benzene and 2-propanol as well as the total vapor pressure at xB = 0.75 based on the interpolation functions of the data.

xB = {0.00, 0.076, 0.164, 0.300, 0.479, 0.638, 0.854, 0.941, 1.00};
pP = {44.0, 42.2, 39.5, 36.4, 30.4, 27.6, 22.4, 12.9, 0.00};
pT = {44.0, 66.4, 84.0, 99.8, 105.8, 108.4, 109.0, 104.5, 94.4};


Graph are plotted with coordinates of $(xB,pP)$ and $(xB,pT)$.

• Have you tried reading this reference.wolfram.com/language/ref/ListInterpolation.html and related help files? – Peltio Mar 30 '15 at 21:45
• I don't know how to relate the data to each function. I just don't find what would fit my case anywhere, could you be more specific? Thank you for the quick answer, I'm grateful – Marco Mar 30 '15 at 21:49

1 Answer

xB = {0.00, 0.076, 0.164, 0.300, 0.479, 0.638, 0.854, 0.941, 1.00};
pP = {44.0, 42.2, 39.5, 36.4, 30.4, 27.6, 22.4, 12.9, 0.00};
pT = {44.0, 66.4, 84.0, 99.8, 105.8, 108.4, 109.0, 104.5, 94.4};

iP = Interpolation[{xB, pP}\[Transpose]];
iT = Interpolation[{xB, pT}\[Transpose]];

Show[
Plot[{iP[x], iT[x]}, {x, Min[xB], Max[xB]}],
ListPlot[{{xB, pP}\[Transpose], {xB, pT}\[Transpose]}],
PlotRange -> All
]


{iP[0.75], iT[0.75]}
(* {25.2953, 106.883} *)

• Adding Method -> "Spline" to the Interpolations provides a better interpolation in this case - no visual artifact between 0.6 and 0.8. – shrx Jun 16 '15 at 14:43