MathGroup Archive 2011

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

Search the Archive

Re: Inverse of Interpolating Function?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120386] Re: Inverse of Interpolating Function?
  • From: Gary Wardall <gwardall at gmail.com>
  • Date: Thu, 21 Jul 2011 05:45:54 -0400 (EDT)
  • References: <j06avh$nj8$1@smc.vnet.net>

On Jul 20, 5:34=C2 am, gonzorascal <dj... at duke.edu> wrote:
> Hello All,
>
> I am working with an Interpolating Function of an oscillating solution (time series) to a differential equation.  I am trying to find the period and pulse width of the oscillation.  To do this I would like to have an inverse of my function y[t] (so I would have t[y]).  I realize this function would be multivalued (that's what I want to find the period). =C2 I am not having success using Mathematica's InverseFunction[] or Reduce[] commands.  Does anyone have any experience or suggestions with this sort of thing (either finding Inverse Interpolating Functions or another method for period and pulse width)?  Thank you.
>
> -GR

gonzorascal,

First make sure the function you wish to have an inverse function is a
function that has an inverse function. A quick visual test is the
Horizontal Test for Inverse Functions. If any horizontal line
intersects the graph twice or more then the inverse is NOT an inverse
function. Graph the function you wish to create an inverse function
for. If it fails the horizontal test you may have ti restrict  your
function like is done in Trigonometry. If it passes try something like
in my example.


points = {{0, -1}, {1, 1}, {2, 3}, {3, 4}, {4, 6}, {5, 10}};=E2=80=A8ifun=
Interpolation[points]
Does the function pass the Horizontal Test?

Plot[ifun[x], {x, 0, 5}]

It does. Define:

invifun[x_] := FindRoot[ifun[y] == x, {y, 0, 5}][[1]][[2]]

Note that:

ifun[invifun[4]]

is 4.

and

invifun[ifun[3]]

is 3.

and look at the sketch.

Plot[{invifun[x], ifun[x], x}, {x, 0, 5}, PlotRange -> {0, 5},
AspectRatio -> Automatic]

We have an inverse function.

I hope this will help.

Good Luck

Gary Wardall


  • Prev by Date: Re: sorting a nested list of 4-tuples
  • Next by Date: Re: sorting a nested list of 4-tuples
  • Previous by thread: Re: Inverse of Interpolating Function?
  • Next by thread: Re: Inverse of Interpolating Function?