I would like to simplify r = sqrt(16((1 + x)^2 + (-1 - x)^2))
with x>0 with Symbolics.jl
How can I approach this ?
I first tried to introduce the rule rule = @rule (-1 - ~x)^2 => (1 + ~x)^2
But the following example doesnt even make use of the rule :
using Symbolics
@variables x
r = (-1 - x)^2
rule = @rule (-1 - ~x)^2 => (1 + ~x)^2
println(simplify(r, rule))
this ouputs (-1 - x)^2
so I’m not sure how to procede