It's a simple equation where I'm just getting maple to run through the steps.
eq:=(m+M)=a^3/P^2;
solve(eq,P^2); returns an unexpected error
I wanted to see if maple could solve for P^2, poking here and there seeing what does and doesn't work. I know I could just type it in, but can Maple do this? Maybe I'm missing something.
Again using the same equation (sorry i don't have maple in front of me right now) but if I solve for m I get something reversed, i think after i simplify. -M + a^3/P^2 Is there anyway to reverse the order of the answer?
in a way
> eq:=(m+M)=a^3/P^2; 3 a eq := m + M = ---- 2 P > solve(algsubs(P^(-2)=Z,eq),Z); m + M ----- 3 aIt can be very difficult to control the order of printing of terms in sums, unless one resorts to subverting the mechanism (using the `` operator, for example). I believe that it depends on the order in which the terms appear in some structure (simpl table) internal to the kernel, and that may be based on memory address and thus be session dependent.
> restart: > eq:=(m+M)=a^3/P^2: > expand(solve(eq,m)); 3 a -M + ---- 2 P > restart: > a^3/P^2-M: > eq:=(m+M)=a^3/P^2: > expand(solve(eq,m)); 3 a ---- - M 2 Pacer
with isolate
isolate(eq,P^2); 3 2 a P = - ------ -m - MDo not claim for the minus signs :)
simplify helps
To remove the minus signs, use simplify:
(normal and factor also work, but not expand)
Doug
reference
I believe that "minus signs" was a reference to the original poster's problem when solving for m, of the -M term being at the fore of the sum.
And in case anyone is interested, according to the session history, the same type of issue might occur when using `isolate`.
> restart: > -M+a^3/P^2: > eq:=(m+M)=a^3/P^2: > isolate( eq, m ); 3 a m = -M + ---- 2 P > restart: > eq:=(m+M)=a^3/P^2: > isolate( eq, m ); 3 a m = ---- - M 2 Pacer