function r = p3(n)

% Parametrized functions in t for x and y
f_x = @(t) 0.5 + 0.3*t + 3.9*t^2 - 4.7*t^3;
f_y = @(t) 1.5 + 0.3*t + 0.9*t^2 - 2.7*t^3;

% Derivatives for x and y
f_xprime = @(t) 0.3 + 7.8*t - 14.1*t^2;
f_yprime = @(t) 0.3 + 1.8*t - 8.1*t^2;

f_arc = @(t) sqrt(f_xprime(t)^2 + f_yprime(t)^2);

% Compute the t parameters necessary to
% break up the arc into n pieces
for i = 1:n
  s = i/n;
  f_b = @(t) adapquad(f_arc, 0, t, 0.5e-6)/adapquad(f_arc, 0, 1, 0.5e-6) - s;
  r(i) = bisect(f_b, -0.5e-3, 1+0.5e-3, 0.5e-3);
end