root finding for a tangent-like function

125 Views Asked by At

I have a tangent-like function, which means it increases monotonically, and at some value suddenly changes from $+\infty$ to $-\infty$. Is there any efficient numerical method to find all the roots of such tangent-like function in a given interval? What I can think of is just dividing the interval into several sub-intervals, and find roots in each of them. But it is inefficient and sometimes will miss some roots.