Simplify seems to be struggling with basic polynomial common factor extraction. It in fact seems to favor the expanded form of a factorpolynomial ie `2(a+b)"simplifies" to2a+2b`.
julia> using Symbolics
julia> @syms a b c
(a, b, c)
julia> simplify(2*(a+b) )
2a + 2b
julia> simplify(2*(1+a+a^2+a^3+a^4+a^5))
2 + 2a + 2(a^2) + 2(a^3) + 2(a^4) + 2(a^5)
julia> simplify( a / (b + c) + a / (b + c)^2 )
(a + a*b + a*c) / ((b + c)^2)
I understand that sometimes the expanded form is needed for other simplifications to be investigated, but you would expect that once no further simplifications are found in that search tree it reverts to non-expanded form.
Simplify seems to be struggling with basic polynomial common factor extraction. It in fact seems to favor the expanded form of a factorpolynomial ie `2(a+b)
"simplifies" to
2a+2b`.I understand that sometimes the expanded form is needed for other simplifications to be investigated, but you would expect that once no further simplifications are found in that search tree it reverts to non-expanded form.