MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simplify

In a message dated 11/15/98 1:16:55 AM, jtischer at

>you just showed me that it's hopeless. I'm searching for a way that will
>cook down formulas of this type, your method is ok but needs human
>Anyway, thanks a lot.


I am not convinced that it is hopeless.  You might investigate along
these lines:

Identify the integers that are raised to powers of n:

baseIntegers[eqn_, n_Symbol:n] := 
	Cases[eqn, i_Integer^n->i, {1, Infinity}]//Union

Then automate the substitutions given the integers

simplifyMore[eqn_, i1_Integer, i2_Integer, n_Symbol:n] := 
	Module[{g = GCD[i1, i2], m, eqn2}, If[g==1, eqn, 
		eqn2 = FullSimplify[FullSimplify[eqn] /. 
			{i1^n -> m (i1/g)^n, i2^n -> m (i2/g)^n}];
		FullSimplify[eqn2 /. m -> g^n]]]

For example

a = (-7253*2^(1 + 2*n)*5^n - 523*4^n*5^(1 + n) + 17121*20^n +



simplifyMore[a, 4, 20]



simplifyMore[a, 5, 20]


The liberal use of FullSimplify will tend to make this relatively slow.

Bob Hanlon

  • Prev by Date: Re: Simplify
  • Next by Date: Re: Permutations.
  • Previous by thread: Re: Simplify
  • Next by thread: Re: Simplify