Factor (1 - a*b) in a Large Expression



Koen Groot <koengroot90 at gmail.com> writes:
> First of all, thank you for your quick response.
>
> I think it is better if I explain the problem a little bit more:
> At the moment I have a (differential) equation that consists of several
> terms in a sum; the equation is Navier-Stokes-ish.
> A few terms have to be dropped according to order of magnitude analysis.
> For this reason the combination c1*(1 - a*b) is expanded to c1 - c1*a*b;
> the term c1*a*b might be dropped only...
> Now, the problem is that when the c1*a*b term is *not *dropped, it is
> preferable to factor the sum c1 - c1*a*b back to the form c1*(1 - a*b).
> Note that c1 is unknown, one really has to use the combination (1 - a*b) to
> perform the factorization.
>
> The commands *collectterms *and *facsum* with the argument (1 - a*b) do not
> solve this problem...
> I have reasons to believe that only single variables can be supplied as an
> argument to these commands.
>
> The question remains, how can this be handled otherwise?
>
> Kind regards,
> Koen Groot

If I understand you correctly, there's a simple work-around. Basically,
before you do the manipulations that have the side effect of expanding
c1*(1-a*b), substitute another symbol for 1-a*b. Obviously this doesn't
get expanded and you're good. I guess this is just like when physicists
and applied mathematicians manipulate equations to make them
dimensionless then rename the variables to make the bits of the result
atomic.

Of course, there's nothing to stop you substituting 1-a*b back in again
when you need it.

Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20121025/35755350/attachment.pgp>;