Thank you very much for both answers!
I like the trick with ratsubst followed by subst, and the more general
"cancel in the fraction" function is nice - after all, it's not always
going to be exponentials I'm cancelling!
I'm surprised that there is not an obvious way to do this in maxima
though - one approach was a reasonably heavyweight function and the
other relied on doing something clever with exponentials and ratsubst.
As a general question, is the limited out-of-box support for this
because one generally only wants to do this sort of thing (I'm thinking
of other related tasks such as moving constants inside integrals,
multiplying top/bottom of fractions, adding + subtracting on the top of
a fraction to split it in two etc.) at the end of a calculation?
Personally, I find the (already excellent) support for manipulating
expressions very useful so that I can check formulas make sense "so
far" e.g. make sure they're almost the same as a related equation from
a different problem, or eyeball the dimensions: am I adding volts to
amps?
I'm really keen on learning more about developing maxima functions and
this sort of stuff would be a fun project, so a couple of questions:
1) Would anyone actually use functions like this except me?
2) Is there an existing framework that I should try to fit these
functions into? I'm thinking of format, although I realise that's in
contrib itself. Do I want to write "toplevel" functions or new
addons/arguments to existing ones?
3) Do any other CAS's have this sort of capability built in on which I
could model the functions: I'm not a specialist in user interfaces and
I suspect that if e.g. Maple had such functions, they'd be at least
reasonably well designed for the user.
Thank you for all the help so far! (I didn't realise quite how powerful
the rat* commands were, wow!)
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20070907/3a0ffa64/attachment.pgp