-
-
Notifications
You must be signed in to change notification settings - Fork 642
Open
Description
Pynac immediately factors out the positive content of a sum raised to an integer number:
sage: (5*cos(x) + 5)^2
25*(cos(x) + 1)^2
sage: (5*cos(x) + 5)^-3
1/125/(cos(x) + 1)^3
sage: (-5*x + 5)^-3
-1/125/(x - 1)^3
The last example shows how the leading coefficient is forced to be positive. This is not consistent with other CAS and considered a typical Sage quirk.
Also, the content of rational powers is usually extracted but we only do this if there is a rational power part!
sage: sqrt(5*cos(x) + 5)
sqrt(5*cos(x) + 5)
sage: sqrt(8*x + 8)
2*sqrt(2)*sqrt(x + 1)
Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/25639