\(\int \frac {(a+b x+c x^2)^2}{(d+e x)^4} \, dx\) [424]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 139 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^4} \, dx=\frac {c^2 x}{e^4}-\frac {\left (c d^2-b d e+a e^2\right )^2}{3 e^5 (d+e x)^3}+\frac {(2 c d-b e) \left (c d^2-b d e+a e^2\right )}{e^5 (d+e x)^2}-\frac {6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)}{e^5 (d+e x)}-\frac {2 c (2 c d-b e) \log (d+e x)}{e^5} \] Output:

c^2*x/e^4-1/3*(a*e^2-b*d*e+c*d^2)^2/e^5/(e*x+d)^3+(-b*e+2*c*d)*(a*e^2-b*d* 
e+c*d^2)/e^5/(e*x+d)^2-(6*c^2*d^2+b^2*e^2-2*c*e*(-a*e+3*b*d))/e^5/(e*x+d)- 
2*c*(-b*e+2*c*d)*ln(e*x+d)/e^5
 

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.27 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^4} \, dx=\frac {c^2 \left (-13 d^4-27 d^3 e x-9 d^2 e^2 x^2+9 d e^3 x^3+3 e^4 x^4\right )-e^2 \left (a^2 e^2+a b e (d+3 e x)+b^2 \left (d^2+3 d e x+3 e^2 x^2\right )\right )+c e \left (-2 a e \left (d^2+3 d e x+3 e^2 x^2\right )+b d \left (11 d^2+27 d e x+18 e^2 x^2\right )\right )-6 c (2 c d-b e) (d+e x)^3 \log (d+e x)}{3 e^5 (d+e x)^3} \] Input:

Integrate[(a + b*x + c*x^2)^2/(d + e*x)^4,x]
 

Output:

(c^2*(-13*d^4 - 27*d^3*e*x - 9*d^2*e^2*x^2 + 9*d*e^3*x^3 + 3*e^4*x^4) - e^ 
2*(a^2*e^2 + a*b*e*(d + 3*e*x) + b^2*(d^2 + 3*d*e*x + 3*e^2*x^2)) + c*e*(- 
2*a*e*(d^2 + 3*d*e*x + 3*e^2*x^2) + b*d*(11*d^2 + 27*d*e*x + 18*e^2*x^2)) 
- 6*c*(2*c*d - b*e)*(d + e*x)^3*Log[d + e*x])/(3*e^5*(d + e*x)^3)
 

Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {1140, 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+b x+c x^2\right )^2}{(d+e x)^4} \, dx\)

\(\Big \downarrow \) 1140

\(\displaystyle \int \left (\frac {-2 c e (3 b d-a e)+b^2 e^2+6 c^2 d^2}{e^4 (d+e x)^2}+\frac {2 (b e-2 c d) \left (a e^2-b d e+c d^2\right )}{e^4 (d+e x)^3}+\frac {\left (a e^2-b d e+c d^2\right )^2}{e^4 (d+e x)^4}-\frac {2 c (2 c d-b e)}{e^4 (d+e x)}+\frac {c^2}{e^4}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {-2 c e (3 b d-a e)+b^2 e^2+6 c^2 d^2}{e^5 (d+e x)}+\frac {(2 c d-b e) \left (a e^2-b d e+c d^2\right )}{e^5 (d+e x)^2}-\frac {\left (a e^2-b d e+c d^2\right )^2}{3 e^5 (d+e x)^3}-\frac {2 c (2 c d-b e) \log (d+e x)}{e^5}+\frac {c^2 x}{e^4}\)

Input:

Int[(a + b*x + c*x^2)^2/(d + e*x)^4,x]
 

Output:

(c^2*x)/e^4 - (c*d^2 - b*d*e + a*e^2)^2/(3*e^5*(d + e*x)^3) + ((2*c*d - b* 
e)*(c*d^2 - b*d*e + a*e^2))/(e^5*(d + e*x)^2) - (6*c^2*d^2 + b^2*e^2 - 2*c 
*e*(3*b*d - a*e))/(e^5*(d + e*x)) - (2*c*(2*c*d - b*e)*Log[d + e*x])/e^5
 

Defintions of rubi rules used

rule 1140
Int[((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x 
_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + b*x + c*x^2)^p, x], x] /; 
FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [A] (verified)

Time = 0.90 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.29

method result size
norman \(\frac {\frac {c^{2} x^{4}}{e}-\frac {a^{2} e^{4}+d \,e^{3} a b +2 a c \,d^{2} e^{2}+d^{2} e^{2} b^{2}-11 b c \,d^{3} e +22 c^{2} d^{4}}{3 e^{5}}-\frac {\left (2 a c \,e^{2}+b^{2} e^{2}-6 b c d e +12 c^{2} d^{2}\right ) x^{2}}{e^{3}}-\frac {\left (a \,e^{3} b +2 a d \,e^{2} c +d \,e^{2} b^{2}-9 d^{2} e b c +18 c^{2} d^{3}\right ) x}{e^{4}}}{\left (e x +d \right )^{3}}+\frac {2 c \left (b e -2 c d \right ) \ln \left (e x +d \right )}{e^{5}}\) \(179\)
risch \(\frac {c^{2} x}{e^{4}}+\frac {\left (-2 a c \,e^{3}-b^{2} e^{3}+6 d \,e^{2} b c -6 d^{2} e \,c^{2}\right ) x^{2}+\left (-a \,e^{3} b -2 a d \,e^{2} c -d \,e^{2} b^{2}+9 d^{2} e b c -10 c^{2} d^{3}\right ) x -\frac {a^{2} e^{4}+d \,e^{3} a b +2 a c \,d^{2} e^{2}+d^{2} e^{2} b^{2}-11 b c \,d^{3} e +13 c^{2} d^{4}}{3 e}}{e^{4} \left (e x +d \right )^{3}}+\frac {2 c \ln \left (e x +d \right ) b}{e^{4}}-\frac {4 c^{2} d \ln \left (e x +d \right )}{e^{5}}\) \(186\)
default \(\frac {c^{2} x}{e^{4}}-\frac {a^{2} e^{4}-2 d \,e^{3} a b +2 a c \,d^{2} e^{2}+d^{2} e^{2} b^{2}-2 b c \,d^{3} e +c^{2} d^{4}}{3 e^{5} \left (e x +d \right )^{3}}+\frac {2 c \left (b e -2 c d \right ) \ln \left (e x +d \right )}{e^{5}}-\frac {2 a c \,e^{2}+b^{2} e^{2}-6 b c d e +6 c^{2} d^{2}}{e^{5} \left (e x +d \right )}-\frac {2 a \,e^{3} b -4 a d \,e^{2} c -2 d \,e^{2} b^{2}+6 d^{2} e b c -4 c^{2} d^{3}}{2 e^{5} \left (e x +d \right )^{2}}\) \(187\)
parallelrisch \(\frac {-6 x^{2} a c \,e^{4}-36 x^{2} c^{2} d^{2} e^{2}-54 x \,c^{2} d^{3} e -d \,e^{3} a b -22 c^{2} d^{4}-36 \ln \left (e x +d \right ) x^{2} c^{2} d^{2} e^{2}+3 c^{2} x^{4} e^{4}+18 \ln \left (e x +d \right ) x b c \,d^{2} e^{2}+18 \ln \left (e x +d \right ) x^{2} b c d \,e^{3}-2 a c \,d^{2} e^{2}+11 b c \,d^{3} e -6 x a c d \,e^{3}+6 \ln \left (e x +d \right ) x^{3} b c \,e^{4}-12 \ln \left (e x +d \right ) x^{3} c^{2} d \,e^{3}-a^{2} e^{4}+18 x^{2} b c d \,e^{3}-36 \ln \left (e x +d \right ) x \,c^{2} d^{3} e +6 \ln \left (e x +d \right ) b c \,d^{3} e +27 x b c \,d^{2} e^{2}-3 x a b \,e^{4}-3 x \,b^{2} d \,e^{3}-d^{2} e^{2} b^{2}-3 x^{2} b^{2} e^{4}-12 \ln \left (e x +d \right ) c^{2} d^{4}}{3 e^{5} \left (e x +d \right )^{3}}\) \(304\)

Input:

int((c*x^2+b*x+a)^2/(e*x+d)^4,x,method=_RETURNVERBOSE)
 

Output:

(c^2*x^4/e-1/3*(a^2*e^4+a*b*d*e^3+2*a*c*d^2*e^2+b^2*d^2*e^2-11*b*c*d^3*e+2 
2*c^2*d^4)/e^5-(2*a*c*e^2+b^2*e^2-6*b*c*d*e+12*c^2*d^2)/e^3*x^2-(a*b*e^3+2 
*a*c*d*e^2+b^2*d*e^2-9*b*c*d^2*e+18*c^2*d^3)/e^4*x)/(e*x+d)^3+2/e^5*c*(b*e 
-2*c*d)*ln(e*x+d)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 282 vs. \(2 (137) = 274\).

Time = 0.08 (sec) , antiderivative size = 282, normalized size of antiderivative = 2.03 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^4} \, dx=\frac {3 \, c^{2} e^{4} x^{4} + 9 \, c^{2} d e^{3} x^{3} - 13 \, c^{2} d^{4} + 11 \, b c d^{3} e - a b d e^{3} - a^{2} e^{4} - {\left (b^{2} + 2 \, a c\right )} d^{2} e^{2} - 3 \, {\left (3 \, c^{2} d^{2} e^{2} - 6 \, b c d e^{3} + {\left (b^{2} + 2 \, a c\right )} e^{4}\right )} x^{2} - 3 \, {\left (9 \, c^{2} d^{3} e - 9 \, b c d^{2} e^{2} + a b e^{4} + {\left (b^{2} + 2 \, a c\right )} d e^{3}\right )} x - 6 \, {\left (2 \, c^{2} d^{4} - b c d^{3} e + {\left (2 \, c^{2} d e^{3} - b c e^{4}\right )} x^{3} + 3 \, {\left (2 \, c^{2} d^{2} e^{2} - b c d e^{3}\right )} x^{2} + 3 \, {\left (2 \, c^{2} d^{3} e - b c d^{2} e^{2}\right )} x\right )} \log \left (e x + d\right )}{3 \, {\left (e^{8} x^{3} + 3 \, d e^{7} x^{2} + 3 \, d^{2} e^{6} x + d^{3} e^{5}\right )}} \] Input:

integrate((c*x^2+b*x+a)^2/(e*x+d)^4,x, algorithm="fricas")
 

Output:

1/3*(3*c^2*e^4*x^4 + 9*c^2*d*e^3*x^3 - 13*c^2*d^4 + 11*b*c*d^3*e - a*b*d*e 
^3 - a^2*e^4 - (b^2 + 2*a*c)*d^2*e^2 - 3*(3*c^2*d^2*e^2 - 6*b*c*d*e^3 + (b 
^2 + 2*a*c)*e^4)*x^2 - 3*(9*c^2*d^3*e - 9*b*c*d^2*e^2 + a*b*e^4 + (b^2 + 2 
*a*c)*d*e^3)*x - 6*(2*c^2*d^4 - b*c*d^3*e + (2*c^2*d*e^3 - b*c*e^4)*x^3 + 
3*(2*c^2*d^2*e^2 - b*c*d*e^3)*x^2 + 3*(2*c^2*d^3*e - b*c*d^2*e^2)*x)*log(e 
*x + d))/(e^8*x^3 + 3*d*e^7*x^2 + 3*d^2*e^6*x + d^3*e^5)
 

Sympy [A] (verification not implemented)

Time = 3.66 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.57 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^4} \, dx=\frac {c^{2} x}{e^{4}} + \frac {2 c \left (b e - 2 c d\right ) \log {\left (d + e x \right )}}{e^{5}} + \frac {- a^{2} e^{4} - a b d e^{3} - 2 a c d^{2} e^{2} - b^{2} d^{2} e^{2} + 11 b c d^{3} e - 13 c^{2} d^{4} + x^{2} \left (- 6 a c e^{4} - 3 b^{2} e^{4} + 18 b c d e^{3} - 18 c^{2} d^{2} e^{2}\right ) + x \left (- 3 a b e^{4} - 6 a c d e^{3} - 3 b^{2} d e^{3} + 27 b c d^{2} e^{2} - 30 c^{2} d^{3} e\right )}{3 d^{3} e^{5} + 9 d^{2} e^{6} x + 9 d e^{7} x^{2} + 3 e^{8} x^{3}} \] Input:

integrate((c*x**2+b*x+a)**2/(e*x+d)**4,x)
 

Output:

c**2*x/e**4 + 2*c*(b*e - 2*c*d)*log(d + e*x)/e**5 + (-a**2*e**4 - a*b*d*e* 
*3 - 2*a*c*d**2*e**2 - b**2*d**2*e**2 + 11*b*c*d**3*e - 13*c**2*d**4 + x** 
2*(-6*a*c*e**4 - 3*b**2*e**4 + 18*b*c*d*e**3 - 18*c**2*d**2*e**2) + x*(-3* 
a*b*e**4 - 6*a*c*d*e**3 - 3*b**2*d*e**3 + 27*b*c*d**2*e**2 - 30*c**2*d**3* 
e))/(3*d**3*e**5 + 9*d**2*e**6*x + 9*d*e**7*x**2 + 3*e**8*x**3)
 

Maxima [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.40 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^4} \, dx=-\frac {13 \, c^{2} d^{4} - 11 \, b c d^{3} e + a b d e^{3} + a^{2} e^{4} + {\left (b^{2} + 2 \, a c\right )} d^{2} e^{2} + 3 \, {\left (6 \, c^{2} d^{2} e^{2} - 6 \, b c d e^{3} + {\left (b^{2} + 2 \, a c\right )} e^{4}\right )} x^{2} + 3 \, {\left (10 \, c^{2} d^{3} e - 9 \, b c d^{2} e^{2} + a b e^{4} + {\left (b^{2} + 2 \, a c\right )} d e^{3}\right )} x}{3 \, {\left (e^{8} x^{3} + 3 \, d e^{7} x^{2} + 3 \, d^{2} e^{6} x + d^{3} e^{5}\right )}} + \frac {c^{2} x}{e^{4}} - \frac {2 \, {\left (2 \, c^{2} d - b c e\right )} \log \left (e x + d\right )}{e^{5}} \] Input:

integrate((c*x^2+b*x+a)^2/(e*x+d)^4,x, algorithm="maxima")
 

Output:

-1/3*(13*c^2*d^4 - 11*b*c*d^3*e + a*b*d*e^3 + a^2*e^4 + (b^2 + 2*a*c)*d^2* 
e^2 + 3*(6*c^2*d^2*e^2 - 6*b*c*d*e^3 + (b^2 + 2*a*c)*e^4)*x^2 + 3*(10*c^2* 
d^3*e - 9*b*c*d^2*e^2 + a*b*e^4 + (b^2 + 2*a*c)*d*e^3)*x)/(e^8*x^3 + 3*d*e 
^7*x^2 + 3*d^2*e^6*x + d^3*e^5) + c^2*x/e^4 - 2*(2*c^2*d - b*c*e)*log(e*x 
+ d)/e^5
 

Giac [A] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.29 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^4} \, dx=\frac {c^{2} x}{e^{4}} - \frac {2 \, {\left (2 \, c^{2} d - b c e\right )} \log \left ({\left | e x + d \right |}\right )}{e^{5}} - \frac {13 \, c^{2} d^{4} - 11 \, b c d^{3} e + b^{2} d^{2} e^{2} + 2 \, a c d^{2} e^{2} + a b d e^{3} + a^{2} e^{4} + 3 \, {\left (6 \, c^{2} d^{2} e^{2} - 6 \, b c d e^{3} + b^{2} e^{4} + 2 \, a c e^{4}\right )} x^{2} + 3 \, {\left (10 \, c^{2} d^{3} e - 9 \, b c d^{2} e^{2} + b^{2} d e^{3} + 2 \, a c d e^{3} + a b e^{4}\right )} x}{3 \, {\left (e x + d\right )}^{3} e^{5}} \] Input:

integrate((c*x^2+b*x+a)^2/(e*x+d)^4,x, algorithm="giac")
 

Output:

c^2*x/e^4 - 2*(2*c^2*d - b*c*e)*log(abs(e*x + d))/e^5 - 1/3*(13*c^2*d^4 - 
11*b*c*d^3*e + b^2*d^2*e^2 + 2*a*c*d^2*e^2 + a*b*d*e^3 + a^2*e^4 + 3*(6*c^ 
2*d^2*e^2 - 6*b*c*d*e^3 + b^2*e^4 + 2*a*c*e^4)*x^2 + 3*(10*c^2*d^3*e - 9*b 
*c*d^2*e^2 + b^2*d*e^3 + 2*a*c*d*e^3 + a*b*e^4)*x)/((e*x + d)^3*e^5)
 

Mupad [B] (verification not implemented)

Time = 5.52 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.46 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^4} \, dx=\frac {c^2\,x}{e^4}-\frac {\frac {a^2\,e^4+a\,b\,d\,e^3+2\,a\,c\,d^2\,e^2+b^2\,d^2\,e^2-11\,b\,c\,d^3\,e+13\,c^2\,d^4}{3\,e}+x\,\left (b^2\,d\,e^2-9\,b\,c\,d^2\,e+a\,b\,e^3+10\,c^2\,d^3+2\,a\,c\,d\,e^2\right )+x^2\,\left (b^2\,e^3-6\,b\,c\,d\,e^2+6\,c^2\,d^2\,e+2\,a\,c\,e^3\right )}{d^3\,e^4+3\,d^2\,e^5\,x+3\,d\,e^6\,x^2+e^7\,x^3}-\frac {\ln \left (d+e\,x\right )\,\left (4\,c^2\,d-2\,b\,c\,e\right )}{e^5} \] Input:

int((a + b*x + c*x^2)^2/(d + e*x)^4,x)
 

Output:

(c^2*x)/e^4 - ((a^2*e^4 + 13*c^2*d^4 + b^2*d^2*e^2 + a*b*d*e^3 - 11*b*c*d^ 
3*e + 2*a*c*d^2*e^2)/(3*e) + x*(10*c^2*d^3 + b^2*d*e^2 + a*b*e^3 + 2*a*c*d 
*e^2 - 9*b*c*d^2*e) + x^2*(b^2*e^3 + 6*c^2*d^2*e + 2*a*c*e^3 - 6*b*c*d*e^2 
))/(d^3*e^4 + e^7*x^3 + 3*d^2*e^5*x + 3*d*e^6*x^2) - (log(d + e*x)*(4*c^2* 
d - 2*b*c*e))/e^5
 

Reduce [B] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 297, normalized size of antiderivative = 2.14 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^4} \, dx=\frac {6 \,\mathrm {log}\left (e x +d \right ) b c \,d^{4} e +18 \,\mathrm {log}\left (e x +d \right ) b c \,d^{3} e^{2} x +18 \,\mathrm {log}\left (e x +d \right ) b c \,d^{2} e^{3} x^{2}+6 \,\mathrm {log}\left (e x +d \right ) b c d \,e^{4} x^{3}-12 \,\mathrm {log}\left (e x +d \right ) c^{2} d^{5}-36 \,\mathrm {log}\left (e x +d \right ) c^{2} d^{4} e x -36 \,\mathrm {log}\left (e x +d \right ) c^{2} d^{3} e^{2} x^{2}-12 \,\mathrm {log}\left (e x +d \right ) c^{2} d^{2} e^{3} x^{3}-a^{2} d \,e^{4}-a b \,d^{2} e^{3}-3 a b d \,e^{4} x +2 a c \,e^{5} x^{3}+b^{2} e^{5} x^{3}+5 b c \,d^{4} e +9 b c \,d^{3} e^{2} x -6 b c d \,e^{4} x^{3}-10 c^{2} d^{5}-18 c^{2} d^{4} e x +12 c^{2} d^{2} e^{3} x^{3}+3 c^{2} d \,e^{4} x^{4}}{3 d \,e^{5} \left (e^{3} x^{3}+3 d \,e^{2} x^{2}+3 d^{2} e x +d^{3}\right )} \] Input:

int((c*x^2+b*x+a)^2/(e*x+d)^4,x)
 

Output:

(6*log(d + e*x)*b*c*d**4*e + 18*log(d + e*x)*b*c*d**3*e**2*x + 18*log(d + 
e*x)*b*c*d**2*e**3*x**2 + 6*log(d + e*x)*b*c*d*e**4*x**3 - 12*log(d + e*x) 
*c**2*d**5 - 36*log(d + e*x)*c**2*d**4*e*x - 36*log(d + e*x)*c**2*d**3*e** 
2*x**2 - 12*log(d + e*x)*c**2*d**2*e**3*x**3 - a**2*d*e**4 - a*b*d**2*e**3 
 - 3*a*b*d*e**4*x + 2*a*c*e**5*x**3 + b**2*e**5*x**3 + 5*b*c*d**4*e + 9*b* 
c*d**3*e**2*x - 6*b*c*d*e**4*x**3 - 10*c**2*d**5 - 18*c**2*d**4*e*x + 12*c 
**2*d**2*e**3*x**3 + 3*c**2*d*e**4*x**4)/(3*d*e**5*(d**3 + 3*d**2*e*x + 3* 
d*e**2*x**2 + e**3*x**3))