2
$\begingroup$

I wonder why FullSimplify cannot simplify this simple expression $(\frac{(a-1)^3}{b^3})^{1/3}$ where $0<a<1$ and $b<0$. This expression should be equal to $\frac{a-1}{b}$. But when I use this command:

FullSimplify[((-1 + a)^3/b^3)^(1/3), 
  a < 1 && a > 0 && b < 0 && Element[b, Reals] && Element[a, Reals]]

Full simplify just returns the same thing! Any ideas on how can I fixe this?

$\endgroup$
  • 1
    $\begingroup$ Since you are working with real variables, try: Simplify[((-1 + a)^3/b^3)^(1/3), TransformationFunctions -> PowerExpand]. See also mathematica.stackexchange.com/q/92686/27951 and links therein $\endgroup$ – MarcoB Jun 22 '17 at 19:01
  • 3
    $\begingroup$ Possible duplicate of Advice for Mathematica as Mathematician's Aid $\endgroup$ – MarcoB Jun 22 '17 at 19:06
  • $\begingroup$ @MarcoB Thanks. I am working with complex expressions. That term is part of the complex expression that I am dealing with. $\endgroup$ – afshi7n Jun 22 '17 at 19:09
  • $\begingroup$ Well, that may get dicey then. PowerExpand makes implicit assumptions on the variables involved. Perhaps you should amend your example to be more representative of the actual problem you are dealing with. $\endgroup$ – MarcoB Jun 22 '17 at 19:11
  • $\begingroup$ Just to add to your frustration :-) Simplify[((-1 + a)^3/b^3)^(1/3) == (-1 + a)/b, b < 0 && 0 < a < 1] gives True $\endgroup$ – m_goldberg Jun 22 '17 at 19:24
2
$\begingroup$

As @MarcoB suggests, PowerExpand is a useful tool here, especially when using the Assumptions option. When using Assumptions->Automatic it is acceptable for PowerExpand to return incorrect results, but for any other boolean setting PowerExpand should always return correct results. So:

expr = ((-1 + a)^3 / b^3)^(1/3);
PowerExpand[expr, Assumptions -> 0 < a < 1 && b < 0]

-(1/b) + a/b

and we can be confident that the output of PowerExpand is equivalent to the input under the given assumptions. Now, suppose your expression is more complicated, and using PowerExpand simplifies one part, but complicates a different part. Then, it would be useful to include PowerExpand in the TransformationFunctions option of Simplify, so that PowerExpand is only applied where it is needed. However, the Simplify assumptions don't automatically get transferred to the transformation functions, so it is a bit complicated. Here is a function that tries to streamline this process:

powerSimplify[expr_, assumptions_] := Internal`InheritedBlock[{PowerExpand},
    SetOptions[PowerExpand, Assumptions -> assumptions];
    Simplify[expr, assumptions, TransformationFunctions -> {Automatic, PowerExpand}]
]

For your example:

powerSimplify[expr, 0 < a < 1 && b < 0]

(-1 + a)/b

as desired. Or, for a different set of assumptions:

s = powerSimplify[expr, a > 1 && b < 0]

(-1 + a) (1/b^3)^(1/3)

Let's check:

s /. {a -> 2.2, b -> -2.2}
expr /. {a -> 2.2, b -> -2.2}

0.272727 + 0.472377 I

0.272727 + 0.472377 I

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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