JuliaSymbolics / SymbolicUtils.jl

Symbolic expressions, rewriting and simplification
https://docs.sciml.ai/SymbolicUtils/stable/
Other
541 stars 108 forks source link

Missed simplification in ratio of differences #473

Open bernardosulzbach opened 2 years ago

bernardosulzbach commented 2 years ago

simplify doesn't simplify the following expression

@syms n::Real
simplify((2 - 2^(1 - n)) / (2^n - 1)) # (2 - (2^(1 - n))) / (2^n - 1)

This is what can be done (and is found by another CAS): image

I'd be grateful if someone could point out how I could get this to work. Is a bare simplify expected to find this?


This was reproduced using

Julia Version 1.8.0-rc1
Commit 6368fdc656 (2022-05-27 18:33 UTC)

with [d1185830] SymbolicUtils v0.19.11.