Mathematica Finding Roots of Interpolated Function in Mathematica

  • Thread starter Thread starter LordV
  • Start date Start date
AI Thread Summary
To find the roots of an interpolated function in Mathematica, users can utilize the Union and Table functions alongside FindRoot to generate a list of roots within a specified range. The approach involves iterating over initial guesses for the root using a defined step size. While methods like Reduce and NSolve were attempted, they did not yield satisfactory results for the user. The discussion emphasizes the importance of correctly setting the initial conditions for FindRoot to effectively locate all roots. This method provides a practical solution for root-finding in interpolated functions.
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
Views
3K
Replies
4
Views
1K
Replies
5
Views
3K
Replies
2
Views
2K
Replies
1
Views
6K
Replies
2
Views
5K
Replies
1
Views
1K
Replies
1
Views
4K
Back
Top