Inverse of Interpolating Function?

In summary, the conversation discusses the use of an interpolating function to find the period and pulse width of an oscillating solution to a differential equation. The speaker is having trouble finding an inverse of the function and is seeking suggestions and experiences from others. One possible solution is to use FindRoot and the grid of values stored in the interpolating function. Another method is to use the functions in the DifferentialEquations package.
  • #1
gonzorascal
1
0
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 in part what I want to find the period). 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
 
Physics news on Phys.org
  • #2
I don't know of any way to do what you want without some programming. You can use FindRoot to Find a root near an estimate, but to get all the roots you're going to have to do some hunting. Something like Table[y[t], {t,tmin,tmax,dt}], where you choose dt small enough that you feel confident of not missing any roots, then search for places where the sign changes, then use FindRoot with Method->"Brent" to locate each root.

A better way to do this would be to use the actual grid of values stored in the interpolating function. Needs["DifferentialEquations`InterpolatingFunctionAnatomy`"] will load some functions that will allow you to do this. This is documented in Mathematica under "tutorial/NDSolvePackages".
 

FAQ: Inverse of Interpolating Function?

What is an inverse of an interpolating function?

An inverse of an interpolating function is a function that undoes the interpolation process. It takes the output values of an interpolating function and returns the corresponding input values.

How is an inverse of an interpolating function useful?

An inverse of an interpolating function is useful in finding the input value that corresponds to a given output value. This is particularly helpful in situations where the original data is not available but the interpolated function is known.

Can an inverse of an interpolating function always be found?

No, an inverse of an interpolating function may not always exist. It depends on the properties of the interpolating function and the data it is based on. In some cases, the inverse may only be defined for a certain range of input values.

How is the inverse of an interpolating function calculated?

The inverse of an interpolating function can be calculated using various numerical methods, such as the Newton's method or the bisection method. These methods involve iteratively approximating the inverse function until a desired level of precision is achieved.

Are there any limitations to using the inverse of an interpolating function?

Yes, there are some limitations to using the inverse of an interpolating function. The accuracy of the inverse function may be affected by the quality and quantity of the original data used for interpolation. Additionally, the inverse function may not always be continuous or differentiable, which can impact its usefulness in certain applications.

Similar threads

Replies
3
Views
1K
Replies
4
Views
1K
Replies
1
Views
1K
Replies
11
Views
207
Replies
5
Views
1K
Back
Top