Closed lhotejc closed 8 months ago
The Expand
function is not recursive and only applies to the top-level. In your example, the expression (x+2)^2
is at the second level, and is not expanded.
To expand recursively, use the ExpandAll
function. This function is available in the next version of the Compute Engine.
Génial ! Merci !
I have the expression : const expr = ce.parse('4(x+2)^2') and I use ce.box(['Expand', expr]).evaluate().simplify().canonical... And I get : the same expr...
I think, that Expand return the same beacause it think that (x+2)^2 is not expandable ? The solution : expand (x+2)^2 and after expand 4(x^2+4x+4) to get 4x^2+16x+16 finally.
I don't see any other solution to that problem