%Bisection Method
%Input: Percentage, Tolerance, Function
%Output: Time
function t = bisarclen(len, tol,f)
totlen = arclenquad(1,f);
tol_val = 1;
a=0;
pos = 0;
i=1;
while tol_val > tol
    if (pos - len*totlen)<0
        a = a + 1/(2^i);
    else
        a = a - 1/(2^i);
    end
    i = i +1;
    pos = arclenquad(a,f);
    tol_val = abs(pos-len*totlen);
end
t = a;
end