Simplifying a fraction with sums of polynomials in the numerator

Viewed 106

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!

3 Answers

If ex is your original expression, try substpart(factor(piece),ex,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!

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

Related