Subject: How to help maxima get equation grouped nicely
From: dlakelan
Date: Fri, 26 Aug 2011 15:05:06 -0700
On 08/26/2011 02:55 PM, dlakelan wrote:
> On 08/21/2011 12:04 PM, Stavros Macrakis wrote:
>> You can use "box" in Maxima to 'protect' things from default
>> simplifications. But then you need to remove the box before calling tex,
>> maybe something like this:
>>
>> expr: box(a/b)*c$
>> block([simp:false],tex(rembox(expr)))
>
> I tried something like this, but I have a function which uses tex to
> print out stuff to a file. With simp:false rather than calling this
> function I get the noun form of the function call. weird that it does
> this with my user defined function but not with say tex or rembox.
Whoops! I actually was generating an error due to a bug. Now that I
fixed it your solution worked, more or less.
For those reading the archive, here's what I did.
First, I took the right hand side of my equation and I used "factorout"
to factor out all the variables not included in the coefficient portion.
So that took my equation and made it look like:
numerator of A * (some stuff)/ denominator of A + numerator of B *
someotherstuff / denominator of B
then I loaded "disol" and asked disolate to isolate the variables that
make up A and B (in this case e and e0). This gave me something like
A * %t123 + B * %t124
then I grabbed the coefficients of each %t variable and boxed them up.
so that I had
box(A) * %t123 + box(B) * %t124
where in fact A and B were rational expressions of e and e0
then when I output my equation via tex, I turned off simplification as
you described and rembox and that gave me more or less what I want.
Thanks!