This is my Newton Raphson method which finds all the roots in a given interval
It calls bisection method in case it is condition which NR method fails
It successfully find roots but in case of singularity it finds x3 around singularity interval although I've added scripts to avoid singularity, then this x3 converges to previous root of previous interval.
function I wanted to test is 10-xtan(x)
I will give my code when you apply