Does anyone know an interpolation technique that gets rid of this
problem?
Thanks, and best regards
just an idea (didn't try it)
define a grid and set g(x)=max(f1(x),f2(x)) on that grid.
then interpolate by a monotonic increasing spline.
literature:
Wolberg, George; Alfy, Itzik
An energy-minimization framework for monotonic cubic spline
interpolation. (English)
J. Comput. Appl. Math. 143, No.2, 145-188 (2002). MSC2000: *65D07 65D05 65D10
Oja, Peeter
Rational spline interpolation to monotonic data. (English)
Proc. Est. Acad. Sci., Phys. Math. 48, No.1, 22-30 (1999).
MSC2000: *41A15 41A20, Reviewer: Manfred Tasche (Rostock)
Sakai, Manabu; López de Silanes, M.C.
A simple rational spline and its application to monotonic
interpolation to monotonic data. (English)
Numer. Math. 50, 171-182 (1986). MSC2000: *65D07 65D05 41A15, Reviewer: S.Ogawa
Delbourgo, R.; Gregory, J.A.
$C\sp 2$ rational quadratic spline interpolation to monotonic data. (English)
IMA J. Numer. Anal. 3, 141-152 (1983). MSC2000: *65D07 41A15
hth
peter
It isn't really interpolation as such, but you can blend between two
assymptotic forms and remain monotonically increasing on a wing and a
prayer with something ad hoc like:
h(x) = ( f(x) + g(x).k.x^n)/(1+k.x^n)
For suitable choices of k and n this will smoothly change from one
function to the other as x increases. Try k=n = 4 as a rough starting
point. Whether or not the intermediate values of the resulting
function h(x) are reasonable is an open question since you are
blending two functions together that are well outside their region of
assymptotic validity.
Ideally you should use the right functional form to match the
underlying physics.
Regards,
Martin Brown
To some degree the answer depends on the behavior of your
functions f1 and f2. Does one of them become large or small
compared to the other for small x or large x?
For example, if you want a function that behaves like Ax for
small x and behaves like B/x for large x, then the function
( 1/(Ax) + x/B )^(-1) does the trick.
The answer to your problem is not unique. The function could
do anything for x ~ O(1), so whether a given interpolation formula
is "right" or not depends on how well it matches the
"real" function, assuming it is known.
For the example above,
( 1/(Ax)^2 + (x/B)*2 )^(-1/2) also has the desired asymptotic
properties, but behaves a bit differently in the transition region.
Olin Perry Norton
That last formula should read ( 1/(Ax)^2 + (x/B)^2 )^(-1/2) .
You might consider using
f(x) = f1(x)*p(x) + f2(x)*q(x)
where p(x) and q(x) are complementary sigmoid functions, e.g.,
p(x) = 1/(1+exp(k*x))
q(x) = exp(k*x)/(1+exp(k*x))
where k is chosen to match the region where signifant mixing must occur.
I just wanted to thank you all for your suggestions. For my
particular case, the one I am responding to worked the best. For the
record, I am trying to reproduce the equation of state of Quantum
Chromodynamics (with no phase transition but a smooth cross-over, as
seems to be happening).
Best
GT