Skip to content

sage fails to factor some easy expressions #33640

@DaveWitteMorris

Description

@DaveWitteMorris

As reported on sage-devel, sage fails to factor expressions that expand to something very easy, such as x^2 or 0. Instead, it returns the original expression.

sage: ((x + 1)^2 - 2*x - 1).factor()  # bad (should be x^2)
(x + 1)^2 - 2*x - 1
sage: ((x + 1)^2 - x^2 - 2*x - 1).factor()  # bad (should be 0)
(x + 1)^2 - x^2 - 2*x - 1
sage: ((x + 2)^2 - 2*x - 3).factor()  # good
(x + 1)^2

Component: symbolics

Keywords: factor, polynomial

Author: Frédéric Chapoton

Branch/Commit: b41c93f

Reviewer: David Lowry-Duda

Issue created by migration from https://trac.sagemath.org/ticket/33640

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions