1
$\begingroup$

I'm trying to simplify the following expression

(b (1 - x)^n (-1 + x)^-n (-1 + x - w x)^n)/(n (-1 + w) (1 - x + w x)).

All parameters and the variable x should be positive real numbers. As far as I can see, this can't be simplified further with Simplify or FullSimplify. I know that the simplified expression is

(b*(1 + (-1 + w)*x)^(-1 + n))/(n*(-1 + w))

but I'd like to know how to 'automate' this kind of simplification with Mathematica's functions, if possible.

$\endgroup$
4
  • 1
    $\begingroup$ (1 - x)^n (-1 + x)^-n will only simplify to -1 if n is an integer. You might want to re-examine your assumptions. In any event, look up Assuming[]. $\endgroup$ Jul 18, 2015 at 16:56
  • $\begingroup$ Yes, it's true that n is an integer -- sorry, should have added that. $\endgroup$
    – jmbierna
    Jul 18, 2015 at 17:02
  • $\begingroup$ Are you sure about the simplified form? I get (b*(1 + (-1 + w)*x)^(-1 + n))/(n*(-1 + w)) $\endgroup$
    – m_goldberg
    Jul 18, 2015 at 18:10
  • $\begingroup$ No, I've now realised that my 'simplified form' was indeed the wrong expression. I agree that your solution is correct (and see Answer below). Thanks for your help. [*** note I've edited the question above to correct it] $\endgroup$
    – jmbierna
    Jul 18, 2015 at 21:02

1 Answer 1

2
$\begingroup$
expr = (b (1 - x)^n (-1 + x)^-n (-1 + x - w x)^n)/(n (-1 + w) (1 - x + w x));

Your stated assumptions including your comment

assume = {Thread[Variables@Level[expr, {-1}] > 0], Element[n, Integers]} // 
  Flatten

{b > 0, n > 0, w > 0, x > 0, n \[Element] Integers}

The simplified expression is

expr // Simplify[#, assume] &

(b (1 + (-1 + w) x)^(-1 + n))/(n (-1 + w))

Comparing with your presumed simplification

expr == b/(n (1 - w)) (1 - (1 - x + w x)^(n - 1)) // Simplify[#, assume] &

False

Consequently, the presumed simplification is not equal to the original expression under the given assumptions.

$\endgroup$
1
  • $\begingroup$ Yes, this is correct. I mistakenly pasted the wrong 'presumed simplification', and now I see that the result here is what I'm looking for. Thanks very much. [*** note I've edited the question above to correct it] $\endgroup$
    – jmbierna
    Jul 18, 2015 at 21:00

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.