# Get Symbolics.simplify to work a little bit harder

**URL:** <https://discourse.julialang.org/t/get-symbolics-simplify-to-work-a-little-bit-harder/96353>\
**Category:** General Usage\
**Tags:** symbolic, symbolics\
**Created:** [March 20, 2023, 3:57pm UTC](https://discourse.julialang.org/t/get-symbolics-simplify-to-work-a-little-bit-harder/96353 "2023-03-20T15:57:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![moble](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/moble/32/23535_2.png) [@moble](https://discourse.julialang.org/u/moble)\
**Post date:** [March 20, 2023, 3:57pm UTC](https://discourse.julialang.org/t/get-symbolics-simplify-to-work-a-little-bit-harder/96353/1 "2023-03-20T15:57:12Z")

</div>

I’m working with some fairly long expressions, where the structure of each term is reasonably simple, but _every_ term has the same three variables, and then a smattering of one or two other variables, and maybe an Int or Rational. It seems like `simplify` should pull those three variables out; by any metric I can think of, this would lead to a simpler expression. But that’s not what happens. Here’s a MWE:

```julia
julia> using Symbolics

julia> @variables a b c x y z;

julia> simplify(a*b*c*x + a*b*c*y*z)
a*b*c*x + a*b*c*y*z

```

I would have expected `a*b*c*(x + y*z)`. Note that the same thing happens if I change — say — `y` to a literal `2`, but the expression simplifies nicely if I just remove `y`. (Though that’s not the expression I actually have.)

This failure to pull out `a*b*c` gets even more problematic the more terms you have — and I have dozens. Is there anything I can do to get more compact results?
