When you run into something like this, it is helpful to simplify it to the
simplest case that reproduces the problem (removing any parameters which
don't contribute to the problem you're having), something like this (also
please use display2d:false to create a readable transcript).
In your example, all the coefficients (except gamma) can be removed, and
you get the same basic behavior:
(%i1) TGW : 1 * a^4/1;
(%o1) a^4
(%i2) Na: a^(3-g);
(%o2) a^(3-g)
(%i3) TRRV : a^(3/2)/(1) * 1 * 1/sqrt(Na);
(%o3) a^(3/2)*sqrt(a^(g-3))
(%i4) eq: TGW=TRRV;
(%o4) a^4 = a^(3/2)*sqrt(a^(g-3))
(%i5) solve(eq,a);
(%o5) [a = %i*a^(g/8),a = -a^(g/8),a = -%i*a^(g/8),a = a^(g/8)]
<<< note 'a' on the RHS
An even simpler case showing this behavior is
(%i6) solve(a^n=a,a);
(%o6) [a = a^n]
This is annoying. The excuse for this behavior is presumably that in
general the number of solutions depends on the value of n, and Maxima has
no way of expressing this as a finite list of solutions. But Maxima is not
consistent about this. For example, solve(a^n=1,a) returns [a=1], though
of course if (e.g.) n=2, then a=-1 is also a solution.
Is anyone interested in designing and implementing a clean solution for
this?
-s
On Tue, Mar 13, 2012 at 09:58, Leo Butler <l_butler at users.sourceforge.net>wrote:
> Pau <vim.unix at googlemail.com> writes:
>
> > Thanks... however something seems strange... it looks like maxima is
> > trying to simplify the expression and in the end I get
> >
> > 3 - gamma
> > 3/8 - --------- 3 3
> > 1/4 8 2 G M + m G
> 1/4
> > 4 6 sqrt(7) a sqrt(2 e + 1) sqrt(M) (-----------)
> > c
> > a =
> -----------------------------------------------------------------------]
> > gamma - 3
> > 5/4 4 2 1/4 Rinfl M 1/8 1/8
> > 5 c (37 e + 292 e + 96) (----------------) (G M)
> > m
> >
> >
> > (I hope that the alignment is right)
> >
> > As you can see, there's an "a" in the right hand side... that's strange
> >
> > I did this:
> >
> > (%i1) Fe : 1 + (73/24)*e^2 + (37/96)*e^4$
> >
> > (%i2) Na : (M/m) * (a/Rinfl)^(3-gamma)$
> >
> > (%i3) TGW : (5/64) * (c^5/G^3) * a^4/(m*M * (m + M)) * Fe$
> >
> > (%i4) TRRV : a^(3/2)/(sqrt(G*M)) * M/m * (0.28*(e^2+0.5))^2/sqrt(Na)$
> >
> > (%i5) solve(TGW=TRRV,a);
> >
> > Any idea of what might have gone wrong?
> >
> > thanks
>
> For some reason, solve gave up and returned a partial answer.
> Here are a couple ideas:
>
> solve(first(%o5)/a,a);
>
> solve(log(TGW)=log(TRRV),a), logexpand=all;
>
> Both give me an answer.
>
> Btw, gamma is the name of a function in Maxima. Although variables and
> functions may share the same name, this will likely lead to obscure and
> wierd errors, so it is better to use another name.
>
> Leo
>
> >
> > On 12 March 2012 00:56, Leo Butler <l_butler at users.sourceforge.net>
> wrote:
> >> Pau <vim.unix at googlemail.com> writes:
> >>
> >>> Hi,
> >>>
> >>> I am sorry for a rather trivial question... If I have two equations
> like
> >>>
> >>> T(a,e) = a^4 ( 1 - e^3)
> >>> H(a,e) = e^3 * constants * a^(-1)
> >>>
> >>> and I want to find the values of a ,e that equate them
> >>>
> >>> T(a,e) = H(a,e) ---> a = XXXX f(e)
> >>
> >> Try
> >> ? solve
> >> at the Maxima command line.
> >>
> >> A couple notes:
> >> -the assignment operator in Maxima is :
> >> -the function definition operator is :=
> >> -to solve your problem,
> >> I did
> >>
> >> (%i1) T : a^4*(1 - e^3) $ H : c*e^3/a $ display2d : false $
> >>
> >> (%i4) solve(T=H,e);
> >>
> >> (%o4) [e = (sqrt(3)*%i-1)*a^(5/3)/(2*(c+a^5)^(1/3)),
> >> e = -(sqrt(3)*%i+1)*a^(5/3)/(2*(c+a^5)^(1/3)),
> >> e = a^(5/3)/(c+a^5)^(1/3)]
> >>
> >>>
> >>> how could I do this in maxima? The best would be an example.
> >>>
> >>> Thanks for this nice piece of software. I am looking forward to
> >>> learning how to use it in detail. Looks very promising.
> >>>
> >>> Cheers,
> >>>
> >>> Pau
> >>> _______________________________________________
> >>> Maxima mailing list
> >>> Maxima at math.utexas.edu
> >>> http://www.math.utexas.edu/mailman/listinfo/maxima
> >>>
> >>
> >> --
> >> Leo Butler <l_butler at users.sourceforge.net>
> >> SDF Public Access UNIX System - http://sdf.lonestar.org
> > _______________________________________________
> > Maxima mailing list
> > Maxima at math.utexas.edu
> > http://www.math.utexas.edu/mailman/listinfo/maxima
> >
> >
>
> --
> Leo Butler <l_butler at users.sourceforge.net>
> SDF Public Access UNIX System - http://sdf.lonestar.org
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>