2

I'm trying to simplifying the following in maxima:

(6*C*b3m*ω+(8*%i*R0^3*b^3-24*%i*R0^3*a*b^2+24*%i*R0^3*a^2*b-8*%i*R0^3*a^3)*Γ+3*A*E*a3p*k+2*%i*K*b3m)/(6*C*ω+3*A*E*k+2*%i*K)

So far, here's what I get : wxmaxima output

But I can easily see that the quantity in brackets there is nothing but (8*R0**3*(b-a)**3)*Γ. In fact I can see this by just evaluating this :

evaluation of simplification

It's frustrating to see maxima miss this and I don't know what to do to simplify this. Any help will be appreciated!

Nidish Narayanaa
  • 338
  • 3
  • 12
  • My only workaround so far is to use `subst([bma=b-a], factor(RT1Lh3(a,a+bma)));` (where RT1Lh3(a,b) is a function returning the above expression). This is ugly and I don't like it. – Nidish Narayanaa Nov 16 '21 at 23:55
  • Try applying `num` to get the numerator of the ratio and then `ratcoeff(something, Γ)` to get the expression you showed, and then apply `factor` to that. There are some expression-transforming functions which I don't know very well -- `facsum`, `factorfacsum`, `collectterms`, etc. You might try bringing up the topic on the maxima-discuss mailing list. – Robert Dodier Nov 17 '21 at 16:43

3 Answers3

1

If ex is your original expression, try substpart(factor(piece),ex,1,1).

1

ratsubst(bma,b-a,your_expression)
shows most of the structure you seem to wish to see.

If you have questions about maxima specifically, posting on the maxima mailing list may get a faster response. Make sure your post includes enough detail (version, exact transcript) so that anyone can reproduce your interaction. Have fun!

Richard Fateman
  • 256
  • 1
  • 1
0

I sent this through the maxima mailing list and got a response from Barton Willis (willisb@unk.edu). I'm posting the answer here so it will be useful for others:

Try using scanmap('factor,%); thus:

(%i10)
(6Cb3mω+(8%iR0^3b^3-24*%iR0^3ab^2+24%iR0^3a^2b-8%iR0^3a^3)Γ+3AEa3pk+2%iKb3m)/(6Cω+3AEk+2%i*K)$

(%i11) scanmap('factor,%);

(%o11) (6Cb3mω+8%iR0^3(b-a)^3Γ+3AEa3pk+2%iKb3m)/(6Cω+3AEk+2%i*K)

--Barton

Here's the expression in wxmaxima: enter image description here

Nidish Narayanaa
  • 338
  • 3
  • 12