# Revision history [back]

### complete expansion of polynomial substitution

In following code,I have substituted a polynomial in other polynomial and the result even after using the command ".expand" shows no complete expansion,Is there any other way to get complete expansion of polynomial substitution?

code: g1=s^2 g2=g1.subs(s=(z-1)) g2.expand()

Result: (z-1)^2 is shown,but not expansion (z^2-z+1).

### complete expansion of polynomial substitution

In following code,I have substituted a polynomial in other polynomial and the result even after using the command ".expand" shows no complete expansion,Is there any other way to get complete expansion of polynomial substitution?

code: g1=s^2 g2=g1.subs(s=(z-1)) g1=s^2 ; g2=g1.subs(s=(z-1)) ; g2.expand()

Result: (z-1)^2 is shown,but shown, but not expansion (z^2-z+1).

### complete expansion of polynomial substitution

In following code,I have substituted a polynomial in other polynomial and the result even after using the command ".expand" shows no complete expansion,Is there any other way to get complete expansion of polynomial substitution?

code: g1=s^2 g1=1+ (s^2) ; g2=g1.subs(s=(z-1)) g2=g1.subs(s= 1/(z-1) ) ; g2.expand()

Result: (z-1)^2 1+ 1/((z-1)^2) is shown, but not expansion (z^2-z+1).(z^2-z+2)/z^2-z+1. 4 No.4 Revision

### complete expansion of polynomial substitution

In the following code,I code, I have substituted a polynomial in other polynomial and the result even after using the command ".expand" shows no complete expansion,Is there any other way to get complete expansion of polynomial substitution?

code:

g1=1+ (s^2) ;
g2=g1.subs(s= 1/(z-1) ) ;
g2.expand()g2.expand()


Result: 1+ 1/((z-1)^2) is shown, but not expansion (z^2-z+2)/z^2-z+1.