Integrand size = 31, antiderivative size = 193 \[ \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{(d+e x)^3} \, dx=\frac {2 b^2 (b d-a e) (5 b B d-2 A b e-3 a B e) x}{e^5}+\frac {(b d-a e)^4 (B d-A e)}{2 e^6 (d+e x)^2}-\frac {(b d-a e)^3 (5 b B d-4 A b e-a B e)}{e^6 (d+e x)}-\frac {b^3 (5 b B d-A b e-4 a B e) (d+e x)^2}{2 e^6}+\frac {b^4 B (d+e x)^3}{3 e^6}-\frac {2 b (b d-a e)^2 (5 b B d-3 A b e-2 a B e) \log (d+e x)}{e^6} \] Output:
2*b^2*(-a*e+b*d)*(-2*A*b*e-3*B*a*e+5*B*b*d)*x/e^5+1/2*(-a*e+b*d)^4*(-A*e+B *d)/e^6/(e*x+d)^2-(-a*e+b*d)^3*(-4*A*b*e-B*a*e+5*B*b*d)/e^6/(e*x+d)-1/2*b^ 3*(-A*b*e-4*B*a*e+5*B*b*d)*(e*x+d)^2/e^6+1/3*b^4*B*(e*x+d)^3/e^6-2*b*(-a*e +b*d)^2*(-3*A*b*e-2*B*a*e+5*B*b*d)*ln(e*x+d)/e^6
Time = 0.11 (sec) , antiderivative size = 187, normalized size of antiderivative = 0.97 \[ \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{(d+e x)^3} \, dx=\frac {-6 b^2 e \left (-6 a^2 B e^2-4 a b e (-3 B d+A e)+3 b^2 d (-2 B d+A e)\right ) x+3 b^3 e^2 (-3 b B d+A b e+4 a B e) x^2+2 b^4 B e^3 x^3+\frac {3 (b d-a e)^4 (B d-A e)}{(d+e x)^2}-\frac {6 (b d-a e)^3 (5 b B d-4 A b e-a B e)}{d+e x}-12 b (b d-a e)^2 (5 b B d-3 A b e-2 a B e) \log (d+e x)}{6 e^6} \] Input:
Integrate[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2)^2)/(d + e*x)^3,x]
Output:
(-6*b^2*e*(-6*a^2*B*e^2 - 4*a*b*e*(-3*B*d + A*e) + 3*b^2*d*(-2*B*d + A*e)) *x + 3*b^3*e^2*(-3*b*B*d + A*b*e + 4*a*B*e)*x^2 + 2*b^4*B*e^3*x^3 + (3*(b* d - a*e)^4*(B*d - A*e))/(d + e*x)^2 - (6*(b*d - a*e)^3*(5*b*B*d - 4*A*b*e - a*B*e))/(d + e*x) - 12*b*(b*d - a*e)^2*(5*b*B*d - 3*A*b*e - 2*a*B*e)*Log [d + e*x])/(6*e^6)
Time = 0.74 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {1184, 27, 86, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^2 (A+B x)}{(d+e x)^3} \, dx\) |
\(\Big \downarrow \) 1184 |
\(\displaystyle \frac {\int \frac {b^4 (a+b x)^4 (A+B x)}{(d+e x)^3}dx}{b^4}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {(a+b x)^4 (A+B x)}{(d+e x)^3}dx\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \int \left (\frac {b^3 (d+e x) (4 a B e+A b e-5 b B d)}{e^5}-\frac {2 b^2 (b d-a e) (3 a B e+2 A b e-5 b B d)}{e^5}+\frac {2 b (b d-a e)^2 (2 a B e+3 A b e-5 b B d)}{e^5 (d+e x)}+\frac {(a e-b d)^3 (a B e+4 A b e-5 b B d)}{e^5 (d+e x)^2}+\frac {(a e-b d)^4 (A e-B d)}{e^5 (d+e x)^3}+\frac {b^4 B (d+e x)^2}{e^5}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {b^3 (d+e x)^2 (-4 a B e-A b e+5 b B d)}{2 e^6}+\frac {2 b^2 x (b d-a e) (-3 a B e-2 A b e+5 b B d)}{e^5}-\frac {(b d-a e)^3 (-a B e-4 A b e+5 b B d)}{e^6 (d+e x)}+\frac {(b d-a e)^4 (B d-A e)}{2 e^6 (d+e x)^2}-\frac {2 b (b d-a e)^2 \log (d+e x) (-2 a B e-3 A b e+5 b B d)}{e^6}+\frac {b^4 B (d+e x)^3}{3 e^6}\) |
Input:
Int[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2)^2)/(d + e*x)^3,x]
Output:
(2*b^2*(b*d - a*e)*(5*b*B*d - 2*A*b*e - 3*a*B*e)*x)/e^5 + ((b*d - a*e)^4*( B*d - A*e))/(2*e^6*(d + e*x)^2) - ((b*d - a*e)^3*(5*b*B*d - 4*A*b*e - a*B* e))/(e^6*(d + e*x)) - (b^3*(5*b*B*d - A*b*e - 4*a*B*e)*(d + e*x)^2)/(2*e^6 ) + (b^4*B*(d + e*x)^3)/(3*e^6) - (2*b*(b*d - a*e)^2*(5*b*B*d - 3*A*b*e - 2*a*B*e)*Log[d + e*x])/e^6
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_) + (b_.)*(x_ ) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[1/c^p Int[(d + e*x)^m*(f + g*x )^n*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x] && E qQ[b^2 - 4*a*c, 0] && IntegerQ[p]
Leaf count of result is larger than twice the leaf count of optimal. \(413\) vs. \(2(187)=374\).
Time = 1.20 (sec) , antiderivative size = 414, normalized size of antiderivative = 2.15
method | result | size |
norman | \(\frac {-\frac {a^{4} A \,e^{5}+4 A \,a^{3} b d \,e^{4}-18 A \,a^{2} b^{2} d^{2} e^{3}+36 A a \,b^{3} d^{3} e^{2}-18 A \,b^{4} d^{4} e +B \,a^{4} d \,e^{4}-12 B \,a^{3} b \,d^{2} e^{3}+54 B \,a^{2} b^{2} d^{3} e^{2}-72 B a \,b^{3} d^{4} e +30 B \,b^{4} d^{5}}{2 e^{6}}-\frac {\left (4 A \,a^{3} b \,e^{4}-12 A \,a^{2} b^{2} d \,e^{3}+24 A a \,b^{3} d^{2} e^{2}-12 A \,b^{4} d^{3} e +B \,e^{4} a^{4}-8 B \,a^{3} b d \,e^{3}+36 B \,a^{2} b^{2} d^{2} e^{2}-48 B a \,b^{3} d^{3} e +20 B \,b^{4} d^{4}\right ) x}{e^{5}}+\frac {B \,b^{4} x^{5}}{3 e}+\frac {2 b^{2} \left (6 A a b \,e^{2}-3 A \,b^{2} d e +9 B \,e^{2} a^{2}-12 B a b d e +5 B \,b^{2} d^{2}\right ) x^{3}}{3 e^{3}}+\frac {b^{3} \left (3 A b e +12 B a e -5 B b d \right ) x^{4}}{6 e^{2}}}{\left (e x +d \right )^{2}}+\frac {2 b \left (3 A \,a^{2} b \,e^{3}-6 A a \,b^{2} d \,e^{2}+3 A \,b^{3} d^{2} e +2 B \,e^{3} a^{3}-9 B \,a^{2} b d \,e^{2}+12 B a \,b^{2} d^{2} e -5 B \,b^{3} d^{3}\right ) \ln \left (e x +d \right )}{e^{6}}\) | \(414\) |
default | \(\frac {b^{2} \left (\frac {1}{3} x^{3} B \,b^{2} e^{2}+\frac {1}{2} A \,b^{2} e^{2} x^{2}+2 B a b \,e^{2} x^{2}-\frac {3}{2} B \,b^{2} d e \,x^{2}+4 A a b \,e^{2} x -3 A \,b^{2} d e x +6 B \,a^{2} e^{2} x -12 B a b d e x +6 B \,b^{2} d^{2} x \right )}{e^{5}}+\frac {2 b \left (3 A \,a^{2} b \,e^{3}-6 A a \,b^{2} d \,e^{2}+3 A \,b^{3} d^{2} e +2 B \,e^{3} a^{3}-9 B \,a^{2} b d \,e^{2}+12 B a \,b^{2} d^{2} e -5 B \,b^{3} d^{3}\right ) \ln \left (e x +d \right )}{e^{6}}-\frac {4 A \,a^{3} b \,e^{4}-12 A \,a^{2} b^{2} d \,e^{3}+12 A a \,b^{3} d^{2} e^{2}-4 A \,b^{4} d^{3} e +B \,e^{4} a^{4}-8 B \,a^{3} b d \,e^{3}+18 B \,a^{2} b^{2} d^{2} e^{2}-16 B a \,b^{3} d^{3} e +5 B \,b^{4} d^{4}}{e^{6} \left (e x +d \right )}-\frac {a^{4} A \,e^{5}-4 A \,a^{3} b d \,e^{4}+6 A \,a^{2} b^{2} d^{2} e^{3}-4 A a \,b^{3} d^{3} e^{2}+A \,b^{4} d^{4} e -B \,a^{4} d \,e^{4}+4 B \,a^{3} b \,d^{2} e^{3}-6 B \,a^{2} b^{2} d^{3} e^{2}+4 B a \,b^{3} d^{4} e -B \,b^{4} d^{5}}{2 e^{6} \left (e x +d \right )^{2}}\) | \(426\) |
risch | \(\frac {b^{4} x^{3} B}{3 e^{3}}+\frac {b^{4} A \,x^{2}}{2 e^{3}}+\frac {2 b^{3} B a \,x^{2}}{e^{3}}-\frac {3 b^{4} B d \,x^{2}}{2 e^{4}}+\frac {4 b^{3} A a x}{e^{3}}-\frac {3 b^{4} A d x}{e^{4}}+\frac {6 b^{2} B \,a^{2} x}{e^{3}}-\frac {12 b^{3} B a d x}{e^{4}}+\frac {6 b^{4} B \,d^{2} x}{e^{5}}+\frac {\left (-4 A \,a^{3} b \,e^{4}+12 A \,a^{2} b^{2} d \,e^{3}-12 A a \,b^{3} d^{2} e^{2}+4 A \,b^{4} d^{3} e -B \,e^{4} a^{4}+8 B \,a^{3} b d \,e^{3}-18 B \,a^{2} b^{2} d^{2} e^{2}+16 B a \,b^{3} d^{3} e -5 B \,b^{4} d^{4}\right ) x -\frac {a^{4} A \,e^{5}+4 A \,a^{3} b d \,e^{4}-18 A \,a^{2} b^{2} d^{2} e^{3}+20 A a \,b^{3} d^{3} e^{2}-7 A \,b^{4} d^{4} e +B \,a^{4} d \,e^{4}-12 B \,a^{3} b \,d^{2} e^{3}+30 B \,a^{2} b^{2} d^{3} e^{2}-28 B a \,b^{3} d^{4} e +9 B \,b^{4} d^{5}}{2 e}}{e^{5} \left (e x +d \right )^{2}}+\frac {6 b^{2} \ln \left (e x +d \right ) A \,a^{2}}{e^{3}}-\frac {12 b^{3} \ln \left (e x +d \right ) A a d}{e^{4}}+\frac {6 b^{4} \ln \left (e x +d \right ) A \,d^{2}}{e^{5}}+\frac {4 b \ln \left (e x +d \right ) B \,a^{3}}{e^{3}}-\frac {18 b^{2} \ln \left (e x +d \right ) B \,a^{2} d}{e^{4}}+\frac {24 b^{3} \ln \left (e x +d \right ) B a \,d^{2}}{e^{5}}-\frac {10 b^{4} \ln \left (e x +d \right ) B \,d^{3}}{e^{6}}\) | \(473\) |
parallelrisch | \(\frac {72 A \ln \left (e x +d \right ) x \,a^{2} b^{2} d \,e^{4}-144 A \ln \left (e x +d \right ) x a \,b^{3} d^{2} e^{3}+48 B \ln \left (e x +d \right ) x \,a^{3} b d \,e^{4}-216 B \ln \left (e x +d \right ) x \,a^{2} b^{2} d^{2} e^{3}+288 B \ln \left (e x +d \right ) x a \,b^{3} d^{3} e^{2}+216 B a \,b^{3} d^{4} e +54 A \,a^{2} b^{2} d^{2} e^{3}-108 A a \,b^{3} d^{3} e^{2}-162 B \,a^{2} b^{2} d^{3} e^{2}+3 A \,b^{4} e^{5} x^{4}-72 A \ln \left (e x +d \right ) x^{2} a \,b^{3} d \,e^{4}-108 B \ln \left (e x +d \right ) x^{2} a^{2} b^{2} d \,e^{4}+144 B \ln \left (e x +d \right ) x^{2} a \,b^{3} d^{2} e^{3}-12 A \,a^{3} b d \,e^{4}-60 B \ln \left (e x +d \right ) b^{4} d^{5}-6 B x \,a^{4} e^{5}+2 B \,x^{5} b^{4} e^{5}+36 A \ln \left (e x +d \right ) b^{4} d^{4} e +12 B \,x^{4} a \,b^{3} e^{5}+36 B \,a^{3} b \,d^{2} e^{3}-5 B \,x^{4} b^{4} d \,e^{4}+24 A \,x^{3} a \,b^{3} e^{5}-12 A \,x^{3} b^{4} d \,e^{4}+36 B \,x^{3} a^{2} b^{2} e^{5}+20 B \,x^{3} b^{4} d^{2} e^{3}-24 A x \,a^{3} b \,e^{5}+72 A x \,b^{4} d^{3} e^{2}-120 B x \,b^{4} d^{4} e -3 B \,a^{4} d \,e^{4}+54 A \,b^{4} d^{4} e +36 A \ln \left (e x +d \right ) x^{2} b^{4} d^{2} e^{3}+36 A \ln \left (e x +d \right ) x^{2} a^{2} b^{2} e^{5}-72 A \ln \left (e x +d \right ) a \,b^{3} d^{3} e^{2}+48 B x \,a^{3} b d \,e^{4}-216 B x \,a^{2} b^{2} d^{2} e^{3}+288 B x a \,b^{3} d^{3} e^{2}+36 A \ln \left (e x +d \right ) a^{2} b^{2} d^{2} e^{3}+24 B \ln \left (e x +d \right ) x^{2} a^{3} b \,e^{5}-60 B \ln \left (e x +d \right ) x^{2} b^{4} d^{3} e^{2}-144 A x a \,b^{3} d^{2} e^{3}-48 B \,x^{3} a \,b^{3} d \,e^{4}+72 A x \,a^{2} b^{2} d \,e^{4}+24 B \ln \left (e x +d \right ) a^{3} b \,d^{2} e^{3}-108 B \ln \left (e x +d \right ) a^{2} b^{2} d^{3} e^{2}+144 B \ln \left (e x +d \right ) a \,b^{3} d^{4} e +72 A \ln \left (e x +d \right ) x \,b^{4} d^{3} e^{2}-120 B \ln \left (e x +d \right ) x \,b^{4} d^{4} e -3 a^{4} A \,e^{5}-90 B \,b^{4} d^{5}}{6 e^{6} \left (e x +d \right )^{2}}\) | \(775\) |
Input:
int((B*x+A)*(b^2*x^2+2*a*b*x+a^2)^2/(e*x+d)^3,x,method=_RETURNVERBOSE)
Output:
(-1/2*(A*a^4*e^5+4*A*a^3*b*d*e^4-18*A*a^2*b^2*d^2*e^3+36*A*a*b^3*d^3*e^2-1 8*A*b^4*d^4*e+B*a^4*d*e^4-12*B*a^3*b*d^2*e^3+54*B*a^2*b^2*d^3*e^2-72*B*a*b ^3*d^4*e+30*B*b^4*d^5)/e^6-(4*A*a^3*b*e^4-12*A*a^2*b^2*d*e^3+24*A*a*b^3*d^ 2*e^2-12*A*b^4*d^3*e+B*a^4*e^4-8*B*a^3*b*d*e^3+36*B*a^2*b^2*d^2*e^2-48*B*a *b^3*d^3*e+20*B*b^4*d^4)/e^5*x+1/3*B*b^4/e*x^5+2/3*b^2*(6*A*a*b*e^2-3*A*b^ 2*d*e+9*B*a^2*e^2-12*B*a*b*d*e+5*B*b^2*d^2)/e^3*x^3+1/6*b^3*(3*A*b*e+12*B* a*e-5*B*b*d)/e^2*x^4)/(e*x+d)^2+2*b/e^6*(3*A*a^2*b*e^3-6*A*a*b^2*d*e^2+3*A *b^3*d^2*e+2*B*a^3*e^3-9*B*a^2*b*d*e^2+12*B*a*b^2*d^2*e-5*B*b^3*d^3)*ln(e* x+d)
Leaf count of result is larger than twice the leaf count of optimal. 652 vs. \(2 (187) = 374\).
Time = 0.09 (sec) , antiderivative size = 652, normalized size of antiderivative = 3.38 \[ \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{(d+e x)^3} \, dx=\frac {2 \, B b^{4} e^{5} x^{5} - 27 \, B b^{4} d^{5} - 3 \, A a^{4} e^{5} + 21 \, {\left (4 \, B a b^{3} + A b^{4}\right )} d^{4} e - 30 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} d^{3} e^{2} + 18 \, {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} d^{2} e^{3} - 3 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} d e^{4} - {\left (5 \, B b^{4} d e^{4} - 3 \, {\left (4 \, B a b^{3} + A b^{4}\right )} e^{5}\right )} x^{4} + 4 \, {\left (5 \, B b^{4} d^{2} e^{3} - 3 \, {\left (4 \, B a b^{3} + A b^{4}\right )} d e^{4} + 3 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} e^{5}\right )} x^{3} + 3 \, {\left (21 \, B b^{4} d^{3} e^{2} - 11 \, {\left (4 \, B a b^{3} + A b^{4}\right )} d^{2} e^{3} + 8 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} d e^{4}\right )} x^{2} + 6 \, {\left (B b^{4} d^{4} e + {\left (4 \, B a b^{3} + A b^{4}\right )} d^{3} e^{2} - 4 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} d^{2} e^{3} + 4 \, {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} d e^{4} - {\left (B a^{4} + 4 \, A a^{3} b\right )} e^{5}\right )} x - 12 \, {\left (5 \, B b^{4} d^{5} - 3 \, {\left (4 \, B a b^{3} + A b^{4}\right )} d^{4} e + 3 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} d^{3} e^{2} - {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} d^{2} e^{3} + {\left (5 \, B b^{4} d^{3} e^{2} - 3 \, {\left (4 \, B a b^{3} + A b^{4}\right )} d^{2} e^{3} + 3 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} d e^{4} - {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} e^{5}\right )} x^{2} + 2 \, {\left (5 \, B b^{4} d^{4} e - 3 \, {\left (4 \, B a b^{3} + A b^{4}\right )} d^{3} e^{2} + 3 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} d^{2} e^{3} - {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} d e^{4}\right )} x\right )} \log \left (e x + d\right )}{6 \, {\left (e^{8} x^{2} + 2 \, d e^{7} x + d^{2} e^{6}\right )}} \] Input:
integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)^2/(e*x+d)^3,x, algorithm="fricas")
Output:
1/6*(2*B*b^4*e^5*x^5 - 27*B*b^4*d^5 - 3*A*a^4*e^5 + 21*(4*B*a*b^3 + A*b^4) *d^4*e - 30*(3*B*a^2*b^2 + 2*A*a*b^3)*d^3*e^2 + 18*(2*B*a^3*b + 3*A*a^2*b^ 2)*d^2*e^3 - 3*(B*a^4 + 4*A*a^3*b)*d*e^4 - (5*B*b^4*d*e^4 - 3*(4*B*a*b^3 + A*b^4)*e^5)*x^4 + 4*(5*B*b^4*d^2*e^3 - 3*(4*B*a*b^3 + A*b^4)*d*e^4 + 3*(3 *B*a^2*b^2 + 2*A*a*b^3)*e^5)*x^3 + 3*(21*B*b^4*d^3*e^2 - 11*(4*B*a*b^3 + A *b^4)*d^2*e^3 + 8*(3*B*a^2*b^2 + 2*A*a*b^3)*d*e^4)*x^2 + 6*(B*b^4*d^4*e + (4*B*a*b^3 + A*b^4)*d^3*e^2 - 4*(3*B*a^2*b^2 + 2*A*a*b^3)*d^2*e^3 + 4*(2*B *a^3*b + 3*A*a^2*b^2)*d*e^4 - (B*a^4 + 4*A*a^3*b)*e^5)*x - 12*(5*B*b^4*d^5 - 3*(4*B*a*b^3 + A*b^4)*d^4*e + 3*(3*B*a^2*b^2 + 2*A*a*b^3)*d^3*e^2 - (2* B*a^3*b + 3*A*a^2*b^2)*d^2*e^3 + (5*B*b^4*d^3*e^2 - 3*(4*B*a*b^3 + A*b^4)* d^2*e^3 + 3*(3*B*a^2*b^2 + 2*A*a*b^3)*d*e^4 - (2*B*a^3*b + 3*A*a^2*b^2)*e^ 5)*x^2 + 2*(5*B*b^4*d^4*e - 3*(4*B*a*b^3 + A*b^4)*d^3*e^2 + 3*(3*B*a^2*b^2 + 2*A*a*b^3)*d^2*e^3 - (2*B*a^3*b + 3*A*a^2*b^2)*d*e^4)*x)*log(e*x + d))/ (e^8*x^2 + 2*d*e^7*x + d^2*e^6)
Leaf count of result is larger than twice the leaf count of optimal. 444 vs. \(2 (192) = 384\).
Time = 3.56 (sec) , antiderivative size = 444, normalized size of antiderivative = 2.30 \[ \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{(d+e x)^3} \, dx=\frac {B b^{4} x^{3}}{3 e^{3}} + \frac {2 b \left (a e - b d\right )^{2} \cdot \left (3 A b e + 2 B a e - 5 B b d\right ) \log {\left (d + e x \right )}}{e^{6}} + x^{2} \left (\frac {A b^{4}}{2 e^{3}} + \frac {2 B a b^{3}}{e^{3}} - \frac {3 B b^{4} d}{2 e^{4}}\right ) + x \left (\frac {4 A a b^{3}}{e^{3}} - \frac {3 A b^{4} d}{e^{4}} + \frac {6 B a^{2} b^{2}}{e^{3}} - \frac {12 B a b^{3} d}{e^{4}} + \frac {6 B b^{4} d^{2}}{e^{5}}\right ) + \frac {- A a^{4} e^{5} - 4 A a^{3} b d e^{4} + 18 A a^{2} b^{2} d^{2} e^{3} - 20 A a b^{3} d^{3} e^{2} + 7 A b^{4} d^{4} e - B a^{4} d e^{4} + 12 B a^{3} b d^{2} e^{3} - 30 B a^{2} b^{2} d^{3} e^{2} + 28 B a b^{3} d^{4} e - 9 B b^{4} d^{5} + x \left (- 8 A a^{3} b e^{5} + 24 A a^{2} b^{2} d e^{4} - 24 A a b^{3} d^{2} e^{3} + 8 A b^{4} d^{3} e^{2} - 2 B a^{4} e^{5} + 16 B a^{3} b d e^{4} - 36 B a^{2} b^{2} d^{2} e^{3} + 32 B a b^{3} d^{3} e^{2} - 10 B b^{4} d^{4} e\right )}{2 d^{2} e^{6} + 4 d e^{7} x + 2 e^{8} x^{2}} \] Input:
integrate((B*x+A)*(b**2*x**2+2*a*b*x+a**2)**2/(e*x+d)**3,x)
Output:
B*b**4*x**3/(3*e**3) + 2*b*(a*e - b*d)**2*(3*A*b*e + 2*B*a*e - 5*B*b*d)*lo g(d + e*x)/e**6 + x**2*(A*b**4/(2*e**3) + 2*B*a*b**3/e**3 - 3*B*b**4*d/(2* e**4)) + x*(4*A*a*b**3/e**3 - 3*A*b**4*d/e**4 + 6*B*a**2*b**2/e**3 - 12*B* a*b**3*d/e**4 + 6*B*b**4*d**2/e**5) + (-A*a**4*e**5 - 4*A*a**3*b*d*e**4 + 18*A*a**2*b**2*d**2*e**3 - 20*A*a*b**3*d**3*e**2 + 7*A*b**4*d**4*e - B*a** 4*d*e**4 + 12*B*a**3*b*d**2*e**3 - 30*B*a**2*b**2*d**3*e**2 + 28*B*a*b**3* d**4*e - 9*B*b**4*d**5 + x*(-8*A*a**3*b*e**5 + 24*A*a**2*b**2*d*e**4 - 24* A*a*b**3*d**2*e**3 + 8*A*b**4*d**3*e**2 - 2*B*a**4*e**5 + 16*B*a**3*b*d*e* *4 - 36*B*a**2*b**2*d**2*e**3 + 32*B*a*b**3*d**3*e**2 - 10*B*b**4*d**4*e)) /(2*d**2*e**6 + 4*d*e**7*x + 2*e**8*x**2)
Leaf count of result is larger than twice the leaf count of optimal. 419 vs. \(2 (187) = 374\).
Time = 0.04 (sec) , antiderivative size = 419, normalized size of antiderivative = 2.17 \[ \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{(d+e x)^3} \, dx=-\frac {9 \, B b^{4} d^{5} + A a^{4} e^{5} - 7 \, {\left (4 \, B a b^{3} + A b^{4}\right )} d^{4} e + 10 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} d^{3} e^{2} - 6 \, {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} d^{2} e^{3} + {\left (B a^{4} + 4 \, A a^{3} b\right )} d e^{4} + 2 \, {\left (5 \, B b^{4} d^{4} e - 4 \, {\left (4 \, B a b^{3} + A b^{4}\right )} d^{3} e^{2} + 6 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} d^{2} e^{3} - 4 \, {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} d e^{4} + {\left (B a^{4} + 4 \, A a^{3} b\right )} e^{5}\right )} x}{2 \, {\left (e^{8} x^{2} + 2 \, d e^{7} x + d^{2} e^{6}\right )}} + \frac {2 \, B b^{4} e^{2} x^{3} - 3 \, {\left (3 \, B b^{4} d e - {\left (4 \, B a b^{3} + A b^{4}\right )} e^{2}\right )} x^{2} + 6 \, {\left (6 \, B b^{4} d^{2} - 3 \, {\left (4 \, B a b^{3} + A b^{4}\right )} d e + 2 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} e^{2}\right )} x}{6 \, e^{5}} - \frac {2 \, {\left (5 \, B b^{4} d^{3} - 3 \, {\left (4 \, B a b^{3} + A b^{4}\right )} d^{2} e + 3 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} d e^{2} - {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} e^{3}\right )} \log \left (e x + d\right )}{e^{6}} \] Input:
integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)^2/(e*x+d)^3,x, algorithm="maxima")
Output:
-1/2*(9*B*b^4*d^5 + A*a^4*e^5 - 7*(4*B*a*b^3 + A*b^4)*d^4*e + 10*(3*B*a^2* b^2 + 2*A*a*b^3)*d^3*e^2 - 6*(2*B*a^3*b + 3*A*a^2*b^2)*d^2*e^3 + (B*a^4 + 4*A*a^3*b)*d*e^4 + 2*(5*B*b^4*d^4*e - 4*(4*B*a*b^3 + A*b^4)*d^3*e^2 + 6*(3 *B*a^2*b^2 + 2*A*a*b^3)*d^2*e^3 - 4*(2*B*a^3*b + 3*A*a^2*b^2)*d*e^4 + (B*a ^4 + 4*A*a^3*b)*e^5)*x)/(e^8*x^2 + 2*d*e^7*x + d^2*e^6) + 1/6*(2*B*b^4*e^2 *x^3 - 3*(3*B*b^4*d*e - (4*B*a*b^3 + A*b^4)*e^2)*x^2 + 6*(6*B*b^4*d^2 - 3* (4*B*a*b^3 + A*b^4)*d*e + 2*(3*B*a^2*b^2 + 2*A*a*b^3)*e^2)*x)/e^5 - 2*(5*B *b^4*d^3 - 3*(4*B*a*b^3 + A*b^4)*d^2*e + 3*(3*B*a^2*b^2 + 2*A*a*b^3)*d*e^2 - (2*B*a^3*b + 3*A*a^2*b^2)*e^3)*log(e*x + d)/e^6
Leaf count of result is larger than twice the leaf count of optimal. 442 vs. \(2 (187) = 374\).
Time = 0.15 (sec) , antiderivative size = 442, normalized size of antiderivative = 2.29 \[ \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{(d+e x)^3} \, dx=-\frac {2 \, {\left (5 \, B b^{4} d^{3} - 12 \, B a b^{3} d^{2} e - 3 \, A b^{4} d^{2} e + 9 \, B a^{2} b^{2} d e^{2} + 6 \, A a b^{3} d e^{2} - 2 \, B a^{3} b e^{3} - 3 \, A a^{2} b^{2} e^{3}\right )} \log \left ({\left | e x + d \right |}\right )}{e^{6}} - \frac {9 \, B b^{4} d^{5} - 28 \, B a b^{3} d^{4} e - 7 \, A b^{4} d^{4} e + 30 \, B a^{2} b^{2} d^{3} e^{2} + 20 \, A a b^{3} d^{3} e^{2} - 12 \, B a^{3} b d^{2} e^{3} - 18 \, A a^{2} b^{2} d^{2} e^{3} + B a^{4} d e^{4} + 4 \, A a^{3} b d e^{4} + A a^{4} e^{5} + 2 \, {\left (5 \, B b^{4} d^{4} e - 16 \, B a b^{3} d^{3} e^{2} - 4 \, A b^{4} d^{3} e^{2} + 18 \, B a^{2} b^{2} d^{2} e^{3} + 12 \, A a b^{3} d^{2} e^{3} - 8 \, B a^{3} b d e^{4} - 12 \, A a^{2} b^{2} d e^{4} + B a^{4} e^{5} + 4 \, A a^{3} b e^{5}\right )} x}{2 \, {\left (e x + d\right )}^{2} e^{6}} + \frac {2 \, B b^{4} e^{6} x^{3} - 9 \, B b^{4} d e^{5} x^{2} + 12 \, B a b^{3} e^{6} x^{2} + 3 \, A b^{4} e^{6} x^{2} + 36 \, B b^{4} d^{2} e^{4} x - 72 \, B a b^{3} d e^{5} x - 18 \, A b^{4} d e^{5} x + 36 \, B a^{2} b^{2} e^{6} x + 24 \, A a b^{3} e^{6} x}{6 \, e^{9}} \] Input:
integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)^2/(e*x+d)^3,x, algorithm="giac")
Output:
-2*(5*B*b^4*d^3 - 12*B*a*b^3*d^2*e - 3*A*b^4*d^2*e + 9*B*a^2*b^2*d*e^2 + 6 *A*a*b^3*d*e^2 - 2*B*a^3*b*e^3 - 3*A*a^2*b^2*e^3)*log(abs(e*x + d))/e^6 - 1/2*(9*B*b^4*d^5 - 28*B*a*b^3*d^4*e - 7*A*b^4*d^4*e + 30*B*a^2*b^2*d^3*e^2 + 20*A*a*b^3*d^3*e^2 - 12*B*a^3*b*d^2*e^3 - 18*A*a^2*b^2*d^2*e^3 + B*a^4* d*e^4 + 4*A*a^3*b*d*e^4 + A*a^4*e^5 + 2*(5*B*b^4*d^4*e - 16*B*a*b^3*d^3*e^ 2 - 4*A*b^4*d^3*e^2 + 18*B*a^2*b^2*d^2*e^3 + 12*A*a*b^3*d^2*e^3 - 8*B*a^3* b*d*e^4 - 12*A*a^2*b^2*d*e^4 + B*a^4*e^5 + 4*A*a^3*b*e^5)*x)/((e*x + d)^2* e^6) + 1/6*(2*B*b^4*e^6*x^3 - 9*B*b^4*d*e^5*x^2 + 12*B*a*b^3*e^6*x^2 + 3*A *b^4*e^6*x^2 + 36*B*b^4*d^2*e^4*x - 72*B*a*b^3*d*e^5*x - 18*A*b^4*d*e^5*x + 36*B*a^2*b^2*e^6*x + 24*A*a*b^3*e^6*x)/e^9
Time = 11.96 (sec) , antiderivative size = 451, normalized size of antiderivative = 2.34 \[ \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{(d+e x)^3} \, dx=x^2\,\left (\frac {A\,b^4+4\,B\,a\,b^3}{2\,e^3}-\frac {3\,B\,b^4\,d}{2\,e^4}\right )-\frac {\frac {B\,a^4\,d\,e^4+A\,a^4\,e^5-12\,B\,a^3\,b\,d^2\,e^3+4\,A\,a^3\,b\,d\,e^4+30\,B\,a^2\,b^2\,d^3\,e^2-18\,A\,a^2\,b^2\,d^2\,e^3-28\,B\,a\,b^3\,d^4\,e+20\,A\,a\,b^3\,d^3\,e^2+9\,B\,b^4\,d^5-7\,A\,b^4\,d^4\,e}{2\,e}+x\,\left (B\,a^4\,e^4-8\,B\,a^3\,b\,d\,e^3+4\,A\,a^3\,b\,e^4+18\,B\,a^2\,b^2\,d^2\,e^2-12\,A\,a^2\,b^2\,d\,e^3-16\,B\,a\,b^3\,d^3\,e+12\,A\,a\,b^3\,d^2\,e^2+5\,B\,b^4\,d^4-4\,A\,b^4\,d^3\,e\right )}{d^2\,e^5+2\,d\,e^6\,x+e^7\,x^2}-x\,\left (\frac {3\,d\,\left (\frac {A\,b^4+4\,B\,a\,b^3}{e^3}-\frac {3\,B\,b^4\,d}{e^4}\right )}{e}-\frac {2\,a\,b^2\,\left (2\,A\,b+3\,B\,a\right )}{e^3}+\frac {3\,B\,b^4\,d^2}{e^5}\right )+\frac {\ln \left (d+e\,x\right )\,\left (4\,B\,a^3\,b\,e^3-18\,B\,a^2\,b^2\,d\,e^2+6\,A\,a^2\,b^2\,e^3+24\,B\,a\,b^3\,d^2\,e-12\,A\,a\,b^3\,d\,e^2-10\,B\,b^4\,d^3+6\,A\,b^4\,d^2\,e\right )}{e^6}+\frac {B\,b^4\,x^3}{3\,e^3} \] Input:
int(((A + B*x)*(a^2 + b^2*x^2 + 2*a*b*x)^2)/(d + e*x)^3,x)
Output:
x^2*((A*b^4 + 4*B*a*b^3)/(2*e^3) - (3*B*b^4*d)/(2*e^4)) - ((A*a^4*e^5 + 9* B*b^4*d^5 - 7*A*b^4*d^4*e + B*a^4*d*e^4 + 20*A*a*b^3*d^3*e^2 - 12*B*a^3*b* d^2*e^3 - 18*A*a^2*b^2*d^2*e^3 + 30*B*a^2*b^2*d^3*e^2 + 4*A*a^3*b*d*e^4 - 28*B*a*b^3*d^4*e)/(2*e) + x*(B*a^4*e^4 + 5*B*b^4*d^4 + 4*A*a^3*b*e^4 - 4*A *b^4*d^3*e + 12*A*a*b^3*d^2*e^2 - 12*A*a^2*b^2*d*e^3 + 18*B*a^2*b^2*d^2*e^ 2 - 16*B*a*b^3*d^3*e - 8*B*a^3*b*d*e^3))/(d^2*e^5 + e^7*x^2 + 2*d*e^6*x) - x*((3*d*((A*b^4 + 4*B*a*b^3)/e^3 - (3*B*b^4*d)/e^4))/e - (2*a*b^2*(2*A*b + 3*B*a))/e^3 + (3*B*b^4*d^2)/e^5) + (log(d + e*x)*(4*B*a^3*b*e^3 - 10*B*b ^4*d^3 + 6*A*b^4*d^2*e + 6*A*a^2*b^2*e^3 - 18*B*a^2*b^2*d*e^2 - 12*A*a*b^3 *d*e^2 + 24*B*a*b^3*d^2*e))/e^6 + (B*b^4*x^3)/(3*e^3)
Time = 0.23 (sec) , antiderivative size = 470, normalized size of antiderivative = 2.44 \[ \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{(d+e x)^3} \, dx=\frac {-30 b^{5} d^{6}+60 \,\mathrm {log}\left (e x +d \right ) a^{3} b^{2} d^{3} e^{3}-180 \,\mathrm {log}\left (e x +d \right ) a^{2} b^{3} d^{4} e^{2}+180 \,\mathrm {log}\left (e x +d \right ) a \,b^{4} d^{5} e -120 \,\mathrm {log}\left (e x +d \right ) b^{5} d^{5} e x -60 a^{3} b^{2} d \,e^{5} x^{2}+180 a^{2} b^{3} d^{2} e^{4} x^{2}+60 a^{2} b^{3} d \,e^{5} x^{3}-180 a \,b^{4} d^{3} e^{3} x^{2}-60 a \,b^{4} d^{2} e^{4} x^{3}+15 a \,b^{4} d \,e^{5} x^{4}+15 a^{4} b \,e^{6} x^{2}+30 a^{3} b^{2} d^{3} e^{3}-90 a^{2} b^{3} d^{4} e^{2}+90 a \,b^{4} d^{5} e -60 \,\mathrm {log}\left (e x +d \right ) b^{5} d^{4} e^{2} x^{2}+180 \,\mathrm {log}\left (e x +d \right ) a \,b^{4} d^{3} e^{3} x^{2}-3 a^{5} d \,e^{5}+60 \,\mathrm {log}\left (e x +d \right ) a^{3} b^{2} d \,e^{5} x^{2}+120 \,\mathrm {log}\left (e x +d \right ) a^{3} b^{2} d^{2} e^{4} x -360 \,\mathrm {log}\left (e x +d \right ) a^{2} b^{3} d^{3} e^{3} x +360 \,\mathrm {log}\left (e x +d \right ) a \,b^{4} d^{4} e^{2} x -180 \,\mathrm {log}\left (e x +d \right ) a^{2} b^{3} d^{2} e^{4} x^{2}-60 \,\mathrm {log}\left (e x +d \right ) b^{5} d^{6}+60 b^{5} d^{4} e^{2} x^{2}+20 b^{5} d^{3} e^{3} x^{3}-5 b^{5} d^{2} e^{4} x^{4}+2 b^{5} d \,e^{5} x^{5}}{6 d \,e^{6} \left (e^{2} x^{2}+2 d e x +d^{2}\right )} \] Input:
int((B*x+A)*(b^2*x^2+2*a*b*x+a^2)^2/(e*x+d)^3,x)
Output:
(60*log(d + e*x)*a**3*b**2*d**3*e**3 + 120*log(d + e*x)*a**3*b**2*d**2*e** 4*x + 60*log(d + e*x)*a**3*b**2*d*e**5*x**2 - 180*log(d + e*x)*a**2*b**3*d **4*e**2 - 360*log(d + e*x)*a**2*b**3*d**3*e**3*x - 180*log(d + e*x)*a**2* b**3*d**2*e**4*x**2 + 180*log(d + e*x)*a*b**4*d**5*e + 360*log(d + e*x)*a* b**4*d**4*e**2*x + 180*log(d + e*x)*a*b**4*d**3*e**3*x**2 - 60*log(d + e*x )*b**5*d**6 - 120*log(d + e*x)*b**5*d**5*e*x - 60*log(d + e*x)*b**5*d**4*e **2*x**2 - 3*a**5*d*e**5 + 15*a**4*b*e**6*x**2 + 30*a**3*b**2*d**3*e**3 - 60*a**3*b**2*d*e**5*x**2 - 90*a**2*b**3*d**4*e**2 + 180*a**2*b**3*d**2*e** 4*x**2 + 60*a**2*b**3*d*e**5*x**3 + 90*a*b**4*d**5*e - 180*a*b**4*d**3*e** 3*x**2 - 60*a*b**4*d**2*e**4*x**3 + 15*a*b**4*d*e**5*x**4 - 30*b**5*d**6 + 60*b**5*d**4*e**2*x**2 + 20*b**5*d**3*e**3*x**3 - 5*b**5*d**2*e**4*x**4 + 2*b**5*d*e**5*x**5)/(6*d*e**6*(d**2 + 2*d*e*x + e**2*x**2))