function r = p1(T)

% 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);

r = adapquad(f_arc, 0, T, 0.5e-6);