Lack of ability to factor out square roots seems to be a particular cause for simplification issues like #23641 <https://github.com/sympy/sympy/issues/23641>. For example, one might expect factor(sqrt(x)+x) to return sqrt(x)*(1+sqrt(x)), but it does not do anything. In this specific case, we may be able to avoid simplification issues by using radsimp. However, in the more general scenario, it would be very beneficial to be able to factor out radicals "naturally".
One potential issue I see with this is that there are many expressions that would factor 'indefinitely' if we were able to factor using radicals. For instance, factor_rad(x+1) might return (sqrt(x)+I)*(sqrt(x)-I). However, there are many other <https://www.youtube.com/watch?v=pf5wc6E4Dxc> factorizations of this expression into different radicals. The simplest fix for this would be to implement a way to specify a "irreducible degree" with default setting 1. For instance, in the above examples, we would choose 1/2. I would attempt to implement this right away, but I am new to both open-source and SymPy, so I need some guidance. In particular, I don't quite understand how _symbolic_factor works, and how exactly formal mode is implemented for factor. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/69c94dea-3aa7-4461-91a7-c054f5a416f0n%40googlegroups.com.