To substitute phi^2 --> 1 + phi, use ratsubst or
fullratsubst. The function ratsubst does the
substitution once; fullratsubst keeps doing a
substitution until the result stops changing.
(%i1) e : (1+phi)^5;
(%o1) (PHI+1)^5
(%i2) ratsubst(1+phi,phi^2,e);
(%o2) PHI^3+17*PHI^2+36*PHI+16
(%i3) load("lrats");
(%o3) C:/PROGRA~1/MAXIMA~1.1/share/maxima/5.9.1
/share/simplification/lrats.mac
(%i4) fullratsubst(1+phi,phi^2,e);
(%o4) 55*PHI+34
Barton