Skip to content

The antiderivative of a sum multiplies its terms' piecewise cases #1874

Closed

Description

@Rafael-SOWNet

Part of #718

When two terms each integrate to a piecewise answer in the signs of the constants, the antiderivative of their sum lists every combination of cases, not one piecewise answer per term. Measured on master ed821bf:

Integrand Answer
1/(b*x^2 + m) 287 chars
1/(sqrt(a + b*x^2)*(b*x^2 + m)) 685 chars
1/(b*x^2 + m) - 1/(sqrt(a + b*x^2)*(b*x^2 + m)) 3,685 chars

The answer for the sum is almost four times the two pieces together.

#1873 meets this. Its conjugate splits 1/(a c + b c x^2 + d sqrt(a + b x^2)) into two such pieces and answers in 3,464 characters, and Rubi's 1.3.2:752 comes to 5,052. The answers are right; I checked them exactly at 50 and 2,000 digits. They are just much longer than they need to be.

What I'd expect: the sum of two piecewise answers stays a sum of two piecewise answers, unless the cases are merged where their conditions coincide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions