I have three (x,y) coordinates that I got from experimental data. The coordinates represent drug solubility at corresponding pH values as appears below:
I want to create a function using these three points to describe the solubility as a function of pH. I know there might be an infinite number of functions that can be created. However, I am looking for something that best describe the observed data and doesn't give negative predictions for solubility. I tried quadratic polynomial using Excel. Although it is a good fit for the observed data, it gives negative predictions when the pH is in certain range.
So, I thought of using either:
1) A biexponential function. One exponential term to describe the decline and then another to describe the rise up again in solubility. This will always give positive predictions.
2) To use an exponential-quadratic function. where:
Solubility= EXP(A+B*(pH-D)+C*(pH-D)^2) ;
A,B,C,D are coefficients.
Can anybody help me to curve-fit this data into the proposed functions above? or any other appropriate function that describes the data well so I can make inter- or extrapolation? The most important thing is that the function shouldn't give negative predictions (Y) for the pH range of (1-12). I read that curve-fitting can be done in MATLAB but I don't actually know MATLAB programming!