Finding Roots of Interpolated Function in Mathematica

  • Context: Mathematica 
  • Thread starter Thread starter LordV
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around finding the roots of an interpolated function in Mathematica. Participants explore various methods to achieve this, including the use of functions like FindRoot and NSolve, within a specified interval.

Discussion Character

  • Technical explanation, Mathematical reasoning

Main Points Raised

  • One participant seeks a method to find all roots of an interpolated function within a specific range, mentioning attempts with FindRoot and Reduce without success.
  • Another participant suggests using NSolve, indicating that it returns an inverse function of the interpolated function.
  • A third participant proposes using a combination of FindRoot and Table to generate a list of roots by iterating over a range of initial guesses.

Areas of Agreement / Disagreement

Participants present different approaches without reaching a consensus on the best method to find the roots of the interpolated function.

Contextual Notes

There may be limitations regarding the assumptions about the interpolated function's behavior and the specific intervals chosen for root finding, which are not fully explored in the discussion.

LordV
Messages
7
Reaction score
0
Hello,

I have an interpolated function at mathematica

x->InterpolatingFunction blahblahblah

which looks like a sin

I want to find all the roots between {x0,x1} (in a list if possible)

Is there any way to achieve this?
I tried FindRoot and Reduce but I couldn't...
 
Physics news on Phys.org
I used NSolve

and I got

t->InverseFunction[InterpolatingFunction...

is there any way to use this?
 
I would use:

Union[Table[x /. FindRoot[f[x], {x, xInit}], {xInit, xMin, xMax, xStep}]]
 
Thanks a lot
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K