0
$\begingroup$

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))?

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

1 Answer 1

2
$\begingroup$

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!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.