If you actually evaluate the function you're trying to mess with, suing something like this:
x = -8:.01:8;
s = numel(x);
y = zeros(s, 1);
for i = 1:s
y(i) = fun2(x(i));
end
plot(x, y);
then your resulting plot looks like this: ![enter image description here](
That plot pretty much tells you why you can't make the length be $4.25$ ... because it's pretty much always at least $6$ or $7$.
Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be. Perhaps the choice $q = 0$ would be a good one, since it seems to be as short as possible. I'll bet it's a circle with radius 1, hence circumference $2\pi \approx 6.28 > 4.25$.