%MATH 447 Project 3 Step 2
function F = project3step2(s)
x = @(t) .5+.3*t+3.9*t.^2-4.7*t.^3;
y = @(t) 1.5+.3*t+.9*t.^2-2.7*t.^3;
xprime = @(t) .3+7.8*t-14.1*t.^2;
yprime = @(t) .3+1.8*t-8.1*t.^2;
fnew = @(t) sqrt(xprime(t).^2+yprime(t).^2);
tol0 = 10^-4;
Length = adapquad(fnew,0,1,tol0);
findt = @(tnew) (adapquad(fnew,0,tnew,tol0)/Length)-s;
bisect(findt,-10,10,tol0)
