TransWikia.com

How to transform a rational function to get desired factor

Mathematica Asked on December 25, 2020

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

One Answer

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!

Correct answer by Alexei Boulbitch on December 25, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP