Symbolics.jl
Symbolics.jl copied to clipboard
simplify not properly working for middle factors
I found that simplify does not work for the parts that are not the first or the last part of homogeneous factors.
Here's an example:
julia> using Symbolics
julia> @variables x, y, z
3-element Vector{Num}:
x
y
z
julia> simplify( cos(x)^2*cos(y)^2*cos(z)^2 + sin(x)^2*cos(y)^2*cos(z)^2 )
(cos(y)^2)*(cos(z)^2)
julia> simplify( cos(x)^2*cos(y)^2*cos(z)^2 + cos(x)^2*sin(y)^2*cos(z)^2 )
(cos(x)^2)*(cos(y)^2)*(cos(z)^2) + (cos(x)^2)*(sin(y)^2)*(cos(z)^2)
julia> simplify( cos(x)^2*cos(y)^2*cos(z)^2 + cos(x)^2*cos(y)^2*sin(z)^2 )
(cos(x)^2)*(cos(y)^2)
You can see the second simplify did not work properly.
┆Issue is synchronized with this Trello card by Unito