2
$\begingroup$

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)$.

$\endgroup$
2
  • $\begingroup$ Have you tried reading this reference.wolfram.com/language/ref/ListInterpolation.html and related help files? $\endgroup$
    – Peltio
    Commented Mar 30, 2015 at 21:45
  • $\begingroup$ 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 $\endgroup$
    – Marco
    Commented Mar 30, 2015 at 21:49

1 Answer 1

3
$\begingroup$
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
 ]

Mathematica graphics

{iP[0.75], iT[0.75]}
(* {25.2953, 106.883} *)
$\endgroup$
1
  • 1
    $\begingroup$ Adding Method -> "Spline" to the Interpolations provides a better interpolation in this case - no visual artifact between 0.6 and 0.8. $\endgroup$
    – shrx
    Commented Jun 16, 2015 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.