Skip to content

Wrong output of sympy. Integrate with Rational #130765

@osmerlex

Description

@osmerlex

Bug report

Bug description:

# sympy.integrate((3*x)/(x**2+smp.Rational(7/4)),x)
System response: 3/2*log(4x**2+7)

When I put the expression to integrate, it turns out that the answer is different than integrating without considering Rational.

sympy.integrate((3x)/(x**2+7/4),x)
System response: 1.5
log(1.0x**2+1.75)

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions