I'm trying to find the zeroes of functions within the range [0,1]. My functions are generally looking something like this:
F(t)=2*sin(8*Pi*t)+2*sin(2*Pi*t)-1
The naive method I've tried so far is getting a very crude plot of the function into Pari, plot(t=0,1,F(t))
, and from there 'guesstimating' a small range [a1,a2] for where the first zero would be. I've then been using solve(t=a1,a2,F(t))
to find that zero. Then finding a second small range [a2,a3], and repeating, until I find all zeroes.
Obviously not a great method, but it's done the job, and many examples I'd looked at so far only had a couple of zeroes. However, examples I'm looking at now (like the F(t) I've defined above), have many more zeroes, so I'm looking for a quicker method.
I'm aware of solvestep
, but I've tried using this and it never returns any solutions. I'm guessing this type of function isn't really suitable for the splitting method it uses (or potentially I'm using it wrong..).
Is there any nice way I can get the zeroes of this function in [0,1] returned without having to go through this long, naive method?