Question: Error during integration

I was computing an integral (Running Maple 18 on Windows 10):

The classic lenght of arc Integral of sqrt(1+(dy/dx)^2) dx

In this case, the function was a cartesian circle (x-R)^2+y^2=R^2 isolated as y=sqrt(R^2-(x-R)^2)

When I do the integration, the result of the integral is not correct.
But if I change R for a, the result is correct. Why? This does not make any sense.

R wasn't assigned to any variable. The code was:

Good Integral

[>y:=expand(sqrt(a^2-(x-a)^2));
[>f:=expand(simplify(sqrt(1+diff(y,x)^2)));
[>S:=int(f,x)+K;

Wrong Integral

[>y:=expand(sqrt(R^2-(x-R)^2));
[>f:=expand(simplify(sqrt(1+diff(y,x)^2)));
[>S:=int(f,x)+K;

In fact, any UPPERCASE letter used as the radius gives me the wrong answer whereas any LOWERCASE letter gives me the proper result. Why is this?

Thanks and have a nice day
EDIT: I added a Screenshot

Please Wait...