Apart3

Description

Apart3[expr, x] is equivalent to Map2[Factor2, Collect2[Apart1[expr,x],x]].

See also:  Apart1.

Examples

t = 
      1/4 (1 - x)^4 x (21 + 13 x + 3 x^2) - 
        11/24 I π (1 - x)^4 x (21 + 13 x + 
              3 x^2) + ((1 - x)^4 x^2 (21 + 13 x + 
                  3 x^2))/(36 (-1 + 
                    x)^4) - (I π (1 - x)^4 x^2 (21 + 
                  13 x + 
                  3 x^2))/(12 (-1 + x)^4) - (7 (1 - 
                    x)^4 x^3 (21 + 13 x + 
                  3 x^2))/(48 (-1 + 
                    x)^4) + (3 I π (1 - x)^4 x^3 (21 + 
                  13 x + 
                  3 x^2))/(8 (-1 + x)^4) + (11 (1 - 
                    x)^4 x^4 (21 + 13 x + 
                  3 x^2))/(24 (-1 + 
                    x)^4) - (3 I π (1 - x)^4 x^4 (21 + 
                  13 x + 
                  3 x^2))/(4 (-1 + x)^4) - (49 (1 - 
                    x)^4 x^5 (21 + 13 x + 
                  3 x^2))/(144 (-1 + 
                    x)^4) + (11 I π (1 - x)^4 x^5 (21 + 
                  13 x + 3 x^2))/(24 (-1 + x)^4) + 
        1/4 (1 - x)^4 x (21 + 13 x + 3 x^2) Zeta2 + 
        11/24 (1 - x)^4 x (21 + 13 x + 3 x^2) Log[x] + 
        1/4 I π (1 - x)^4 x (21 + 13 x + 3 x^2) Log[
            x] + ((1 - x)^4 x^2 (21 + 13 x + 3 x^2) Log[
                x])/(12 (-1 + x)^4) - (3 (1 - 
                    x)^4 x^3 (21 + 13 x + 3 x^2) Log[
                x])/(8 (-1 + x)^4) + (3 (1 - 
                    x)^4 x^4 (21 + 13 x + 3 x^2) Log[
                x])/(4 (-1 + x)^4);

Timing[a1 = Apart3[t, x]; ]

Timing[a2 = Apart[t, x]; ]

a1 - a2 // Expand

Clear[t, a1, a2]