Just ignore the importing ```simplify``` to this. I used ```simplify``` instead of ```cancel``` function but it worked only for lower dimensions of power. 

```
>>> simplify((x**3-1)/(x-1))
 2        
x  + x + 1
>>> simplify((x**4-1)/(x-1))
 4    
x  - 1
──────
x - 1 
```
(Wouldn't it be an issue?)

But ```cancel``` does the above job even for higher ones.

```
>>> cancel((x**5-1)/(x-1))
 4    3    2        
x  + x  + x  + x + 1
```
Therefore I went with ```cancel```. (Pardon me for the 4247)