MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE:Inverse Interpolating Functions

  • To: mathgroup at
  • Subject: [mg29241] RE:[mg29221] Inverse Interpolating Functions
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Thu, 7 Jun 2001 01:14:47 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Dave Park wrote about making an interpolating function for the inverse of
f[x] when we already have an interpolating function of f[x] which is
monotonic. I give you an implementation that works if the samples are
monotonically increasing or decreasing.  I also think this implementation is
a little more elegant and direct than the one you had.

(Less@@Part[#,4,2]||Greater@@Part[#,4,2]& )] := 
  InterpolatingFunction[{{f[[4,2,1]],f[[4,2,-1]]}}, f[[2]], {f[[4,2]]},
{f[[4,1]], f[[3,1]]}] 

How mathematically sound is this?  I don't know, but FunctionInterpolation
adaptively samples a function so that the interpolation meets certain
criteria for precision and accuracy.  Who knows how well the same samples
work for making an interpolation of the inverse function.

One thing that could be useful is a version that would take the function
whose inverse we want to approximate and return a good InterpolatingFunction
of the inverse. If adaptive sampling shows that the function isn't monotonic
over the range of interest we would get back $Failed.  Then we could do for

   g = InverseInterpolatingFunction[ Sin[x]+x,  {x,0, Pi/2} ];


   Out[4]=  0.789793

    Sin[0.789793] + 0.789793

   Out[5]=  1.5

I did a little bit of experimenting to try and get this working, but it was
taking too much time.  If we have a version that does what I show above, it
wouldn't care if the function was a symbolic expression or an
InterpolatingFunction.  I might work on it sometime.

  Ted Ersek
     Download Mathematica tips, tricks from

  • Prev by Date: Conditions
  • Next by Date: RE: Inverse Interpolating Functions
  • Previous by thread: Inverse Interpolating Functions
  • Next by thread: RE: Inverse Interpolating Functions