%i3) a+x-sqrt(x);
(%o3) x - sqrt(x) + a
(%i4) solve(%,sqrt(x));
(%o4) [sqrt(x) = x + a]
(%i5) %^2;
2
(%o5) [x = (x + a) ]
(%i6) solve(%,x);
2 a + sqrt(1 - 4 a) - 1 - 2 a + sqrt(1 - 4 a) + 1
(%o6) [x = - -----------------------, x = -------------------------]
2 2
(%i7)
You have to check for extraneous roots, in general.
Could solve have done this automatically?
It would not be hard to change the program to separate out sqrt and square
both sides (etc.) but I don't know of a clean way to remove extraneous
roots.
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of laurent couraud
> Sent: Saturday, September 09, 2006 11:32 AM
> To: maxima at math.utexas.edu
> Subject: solve(a + x - sqrt(x) ,x)
>
> Hello,
>
> What is the way to solve this with Maxima?
>
> (%i1) solve(a + x - sqrt(x) ,x);
> (%o1) [x = sqrt(x) - a]
>
> is there a way (may be some switch) to force Maxima to
> eliminate sqrt(x).
>
> Thank.
>
>
> Laurent.
>