2
$\begingroup$

I have just started using Mathematica and I am having a hard time understanding the results from FullSimplify. Please see examples bellow:

FullSimplify[(0.5*H + R), (0.5*H + R) == p]
FullSimplify[(H + R + T), (H + R + T) == 1]
FullSimplify[(0.5*H + R)*(H + R + T), (0.5*H + R) == p && (H + R + T) == 1]

I get the following results:

p
1
0.5 (1 + R - T)

My questions is: Why the last expression does not output p (or p*1)?

$\endgroup$
5
  • $\begingroup$ Seems like a bug to me... The output isn't even correct. $\endgroup$ Commented Jan 1, 2017 at 3:36
  • $\begingroup$ @JungHwanMin Why do you say the output is incorrect? Consider (0.5*H + R)*(H + R + T) /. H -> 1 - R - T // Factor. $\endgroup$
    – Michael E2
    Commented Jan 1, 2017 at 3:46
  • $\begingroup$ @MichaelE2 You're right... I somehow had a lingering definition for p $\endgroup$ Commented Jan 1, 2017 at 3:47
  • $\begingroup$ Try substituting x for p, then repeat your evaluation. The answer this time will be x. This behavior is not isolated to FullSimplify. See Question #95374 for how canonical order of symbols can affect the results of Integrate. $\endgroup$
    – Wodahs
    Commented Jan 1, 2017 at 6:59
  • $\begingroup$ Also check out @Jens answer to Question 17926. $\endgroup$
    – Wodahs
    Commented Jan 1, 2017 at 7:29

0

Browse other questions tagged or ask your own question.