Inverse of Interpolating Function?

  • Context: Graduate 
  • Thread starter Thread starter gonzorascal
  • Start date Start date
  • Tags Tags
    Function Inverse
Click For Summary
SUMMARY

The discussion focuses on finding the inverse of an Interpolating Function for an oscillating solution to a differential equation using Mathematica. The user, GR, is specifically looking for methods to determine the period and pulse width of the oscillation. Suggestions include using Mathematica's FindRoot function in conjunction with a root-finding strategy involving Table and Brent's method. Additionally, leveraging the grid of values stored in the Interpolating Function is recommended, utilizing the DifferentialEquations`InterpolatingFunctionAnatomy` package for enhanced functionality.

PREREQUISITES
  • Familiarity with Mathematica 12.0 commands, specifically InverseFunction[], Reduce[], and FindRoot.
  • Understanding of oscillating solutions in differential equations.
  • Knowledge of root-finding algorithms, particularly Brent's method.
  • Experience with Interpolating Functions and their anatomy in Mathematica.
NEXT STEPS
  • Explore the DifferentialEquations`InterpolatingFunctionAnatomy` package in Mathematica.
  • Learn how to implement the FindRoot function effectively for root-finding tasks.
  • Research the use of Table for generating value grids in Mathematica.
  • Study the principles of oscillation analysis in differential equations to better understand period and pulse width determination.
USEFUL FOR

Mathematica users, mathematicians, and engineers working with differential equations and oscillatory systems who need to analyze and manipulate Interpolating Functions for period and pulse width extraction.

gonzorascal
Messages
1
Reaction score
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
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".
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K