# Symbolics.jl symplify (-1 - x)^2

**URL:** <https://discourse.julialang.org/t/symbolics-jl-symplify-1-x-2/126825>\
**Category:** General Usage\
**Tags:** symbolics\
**Created:** [March 11, 2025, 5:52pm UTC](https://discourse.julialang.org/t/symbolics-jl-symplify-1-x-2/126825 "2025-03-11T17:52:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nichola](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@Nichola](https://discourse.julialang.org/u/Nichola)\
**Post date:** [March 11, 2025, 5:52pm UTC](https://discourse.julialang.org/t/symbolics-jl-symplify-1-x-2/126825/1 "2025-03-11T17:52:26Z")

</div>

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 :

```julia
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
