I would like to simplify complicated expressions by defining some variable that is a combination of other variables that appear in the expression, but without eliminating the original variables.

As a simple example, I would like to convert

a^2 + a*b^2 + b


a*c + b

by introducing the relation

c == a + b^2

I saw this question, but the answers require that one variable be eliminated. The best expressions I could get with those strategies are

b - b^2 c + c^2
a*c - Sqrt[-a + c]
a*c + Sqrt[-a + c]

depending on whether I eliminate a or b, but these are not meaningfully simpler than the original expression. Is there any way to introduce a new variable without eliminating one of the dependent variables in the expression? If it matters, I have Mathematica 10.3.

  • $\begingroup$ Check 'PolynomialReduce'. $\endgroup$ – Daniel Lichtblau Dec 24 '15 at 15:08
Simplify[a^2 + a*b^2 + b, b^2 == c - a]

(*  b + a c  *)


a^2 + a*b^2 + b /. b^2 -> c - a // Simplify

(*  b + a c  *)
| improve this answer | |


Simplify[a^2 + a*b^2 + b, Assumptions -> {c == a + b^2}]


| improve this answer | |
  • 1
    $\begingroup$ In Simplify or FullSimplify it is not necessary to to use the Assumptions -> before the assumptions. $\endgroup$ – Bob Hanlon Dec 23 '15 at 17:43

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.