1 | initial version |
Thanks for the shorter versions! I'll repeat them here.
var('h,x,g')
assume (h>0)
print(solve(sqrt(x+g)==h,x)[0])
print(solve(sqrt(x+1)==h,x)[0])
print(solve(sqrt(x+2.0)==h,x)[0])
print(solve(sqrt(x+1/4)==h,x)[0])
print(solve(sqrt(x+2.5)==h,x)[0])
This is all, as I suspected, already present inside Maxima.
(%i2) assume(h>0);
(%o2) [h > 0]
(%i3) solve(sqrt(x+g)=h,x);
2
(%o3) [x = h - g]
(%i4) solve(sqrt(x+1)=h,x);
2
(%o4) [x = h - 1]
(%i5) solve(sqrt(x+2.0)=h,x);
rat: replaced 2.0 by 2/1 = 2.0
2
(%o5) [x = h - 2]
(%i6) solve(sqrt(x+1/4)=h,x);
sqrt(4 x + 1)
(%o6) [------------- = h]
2
(%i7) solve(sqrt(x+2.5)=h,x);
rat: replaced 2.5 by 5/2 = 2.5
sqrt(2 x + 5)
(%o7) [------------- = h]
sqrt(2)
(%i9) solve(sqrt(4*x+1)/2=h,x);
2
4 h - 1
(%o9) [x = --------]
4
Hmm. Clearly there is something internal that is different once the denominator is not one, but it is puzzling. I've asked the Maxima list if they have any explanation.
This doesn't answer the RR
question, or address it.