# How to transform a rational function to get desired factor

I have an expression like this

-t^-b + (t - t^(1/2 + 1/(8 k)))^-b


I would like to transform it to get

t^-b (-1 + ((1 - t^(1/8 (-4 + 1/k))))^-b)


In particular, I want the term t^(1/8 (-4 + 1/k)) to appear. How can I do this without copying and modifying the equation by hand?

Update: Using

Factor[-t^-b + (t - t^(1/2 + 1/(8 k)))^-b]


gives

t^-b (t - t^(1/2 + 1/(8 k)))^-b (t^b - (t - t^(1/2 + 1/(8 k)))^b)


But how can I take out a factor of t from t - t^(1/2 + 1/(8 k))?

• How about the result of Factor[-t^-b + (t - t^(1/2 + 1/(8 k)))^-b]? Nov 19, 2020 at 8:08

Let us introduce a function factor that will be able to factorize the expression taking out a desired multiplicand:

factor[expr_, fact_, fun1_ : Expand, fun2_ : Identity] :=
Module[{a = fact, b = expr/fact},fun2[Evaluate[a]]*fun1[Evaluate[b]]]


This is the expression:

expr = -t^-b + (t - t^(1/2 + 1/(8 k)))^-b;


By applying the function factor as follows

factor[expr, t^-b, Simplify[#, t > 0] &]


one finds the desired result.

Have fun!