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 + 4sin(x)^2 - 2cos(x)^2)/sin(x)^2 as the expression is actually equal to 6. However, simplify does not work because it does not apply the identity 1 - cos(x)^2 = sin(x)^2. 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.
julia>using Symbolics
julia>@variables x
1-element Vector{Num}:
x
julia>simplify((2+4sin(x)^2-2cos(x)^2)/sin(x)^2)
(2+4(sin(x)^2) -2(cos(x)^2)) / (sin(x)^2)
julia>simplify((2+4sin(x)^2-2cos(x)^2)/sin(x)^2, @acrule1+-1cos(~x)^2=>sin(~x)^2)
(2+4(sin(x)^2) -2(cos(x)^2)) / (sin(x)^2)
The text was updated successfully, but these errors were encountered:
danielpporras
changed the title
Adding a new simplification rule does not work
adding a new simplification rule does not work
Sep 22, 2024
danielpporras
changed the title
adding a new simplification rule does not worksimplify and adding a new simplification rule does not work
Sep 22, 2024
I would like to simplify
(2 + 4sin(x)^2 - 2cos(x)^2)/sin(x)^2
as the expression is actually equal to6
. However,simplify
does not work because it does not apply the identity1 - cos(x)^2 = sin(x)^2
. 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.The text was updated successfully, but these errors were encountered: