# simplifying ( x^beta )^( (mu - Lambda) / ( mu -2)) * x ^ ( alpha - beta + 4) is not satisfactory

The SageMath commands

```
var('x alpha beta Lambda mu')
f(x) = ( x^beta )^( (mu - Lambda) / ( mu -2)) * x ^ ( alpha - beta + 4)
f(x).simplify()
```

donot give the correct answer which I would expect that is g(x)

```
alpha_x = ((x*f.diff(x)/f).simplify_full()).factor()
g(x) = x^alpha_x
```

Does anyone know why ?

Here is what I would expect

```
x^(-(Lambda*beta - alpha*mu + 2*alpha - 2*beta - 4*mu + 8)/(mu - 2))
```

Here is what SageMath answers :

```
x^(alpha - beta + 4)/(x^beta)^((Lambda - mu)/(mu - 2))
```

It does not mix the exponants of x in the numerator with those of x in the denominator.

Thank you

Philippe