You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to simplify 2 - 2cos(x)^2 to 2sin(x)^2. However, simplify does not work because it does not apply the identity. I attempted to write a new rule in several ways such as @acrule 1 + -1cos(~x)^2 => sin(~x)^2 but that has not yet worked. I, of course, want the rule work for any constant a such that a - a*cos(x)^2 goes to a*sin(x)^2.
julia>using SymbolicUtils
julia>@syms x
(x,)
julia>simplify(2-2cos(x)^2)
2-2(cos(x)^2)
julia>simplify(2-2cos(x)^2, @acrule1+-1cos(~x)^2=>sin(~x)^2)
2-2(cos(x)^2)
The text was updated successfully, but these errors were encountered:
I would like to simplify
2 - 2cos(x)^2
to2sin(x)^2
. However,simplify
does not work because it does not apply the identity. I attempted to write a new rule in several ways such as@acrule 1 + -1cos(~x)^2 => sin(~x)^2
but that has not yet worked. I, of course, want the rule work for any constanta
such thata - a*cos(x)^2
goes toa*sin(x)^2
.The text was updated successfully, but these errors were encountered: