Integrand size = 20, antiderivative size = 129 \[ \int \frac {\left (a+b x+c x^2\right )^2}{d+e x} \, dx=-\frac {(c d-b e) \left (c d^2-e (b d-2 a e)\right ) x}{e^4}+\frac {\left (c^2 d^2+b^2 e^2-2 c e (b d-a e)\right ) x^2}{2 e^3}-\frac {c (c d-2 b e) x^3}{3 e^2}+\frac {c^2 x^4}{4 e}+\frac {\left (c d^2-b d e+a e^2\right )^2 \log (d+e x)}{e^5} \] Output:
-(-b*e+c*d)*(c*d^2-e*(-2*a*e+b*d))*x/e^4+1/2*(c^2*d^2+b^2*e^2-2*c*e*(-a*e+ b*d))*x^2/e^3-1/3*c*(-2*b*e+c*d)*x^3/e^2+1/4*c^2*x^4/e+(a*e^2-b*d*e+c*d^2) ^2*ln(e*x+d)/e^5
Time = 0.05 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.99 \[ \int \frac {\left (a+b x+c x^2\right )^2}{d+e x} \, dx=\frac {e x \left (6 b e^2 (-2 b d+4 a e+b e x)+c^2 \left (-12 d^3+6 d^2 e x-4 d e^2 x^2+3 e^3 x^3\right )+4 c e \left (3 a e (-2 d+e x)+b \left (6 d^2-3 d e x+2 e^2 x^2\right )\right )\right )+12 \left (c d^2+e (-b d+a e)\right )^2 \log (d+e x)}{12 e^5} \] Input:
Integrate[(a + b*x + c*x^2)^2/(d + e*x),x]
Output:
(e*x*(6*b*e^2*(-2*b*d + 4*a*e + b*e*x) + c^2*(-12*d^3 + 6*d^2*e*x - 4*d*e^ 2*x^2 + 3*e^3*x^3) + 4*c*e*(3*a*e*(-2*d + e*x) + b*(6*d^2 - 3*d*e*x + 2*e^ 2*x^2))) + 12*(c*d^2 + e*(-(b*d) + a*e))^2*Log[d + e*x])/(12*e^5)
Time = 0.35 (sec) , antiderivative size = 129, 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} \, dx\) |
\(\Big \downarrow \) 1140 |
\(\displaystyle \int \left (\frac {x \left (-2 c e (b d-a e)+b^2 e^2+c^2 d^2\right )}{e^3}+\frac {(c d-b e) \left (e (b d-2 a e)-c d^2\right )}{e^4}+\frac {\left (a e^2-b d e+c d^2\right )^2}{e^4 (d+e x)}-\frac {c x^2 (c d-2 b e)}{e^2}+\frac {c^2 x^3}{e}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {x^2 \left (-2 c e (b d-a e)+b^2 e^2+c^2 d^2\right )}{2 e^3}-\frac {x (c d-b e) \left (c d^2-e (b d-2 a e)\right )}{e^4}+\frac {\log (d+e x) \left (a e^2-b d e+c d^2\right )^2}{e^5}-\frac {c x^3 (c d-2 b e)}{3 e^2}+\frac {c^2 x^4}{4 e}\) |
Input:
Int[(a + b*x + c*x^2)^2/(d + e*x),x]
Output:
-(((c*d - b*e)*(c*d^2 - e*(b*d - 2*a*e))*x)/e^4) + ((c^2*d^2 + b^2*e^2 - 2 *c*e*(b*d - a*e))*x^2)/(2*e^3) - (c*(c*d - 2*b*e)*x^3)/(3*e^2) + (c^2*x^4) /(4*e) + ((c*d^2 - b*d*e + a*e^2)^2*Log[d + e*x])/e^5
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]
Time = 0.94 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.32
method | result | size |
default | \(\frac {\frac {c^{2} x^{4} e^{3}}{4}+\frac {\left (\left (b e -c d \right ) c \,e^{2}+e^{3} b c \right ) x^{3}}{3}+\frac {\left (\left (b e -c d \right ) b \,e^{2}+c e \left (2 a \,e^{2}-b d e +c \,d^{2}\right )\right ) x^{2}}{2}+\left (b e -c d \right ) \left (2 a \,e^{2}-b d e +c \,d^{2}\right ) x}{e^{4}}+\frac {\left (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}\right ) \ln \left (e x +d \right )}{e^{5}}\) | \(170\) |
norman | \(\frac {\left (2 a \,e^{3} b -2 a d \,e^{2} c -d \,e^{2} b^{2}+2 d^{2} e b c -c^{2} d^{3}\right ) x}{e^{4}}+\frac {c^{2} x^{4}}{4 e}+\frac {\left (2 a c \,e^{2}+b^{2} e^{2}-2 b c d e +c^{2} d^{2}\right ) x^{2}}{2 e^{3}}+\frac {c \left (2 b e -c d \right ) x^{3}}{3 e^{2}}+\frac {\left (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}\right ) \ln \left (e x +d \right )}{e^{5}}\) | \(174\) |
risch | \(\frac {c^{2} x^{4}}{4 e}+\frac {2 x^{3} b c}{3 e}-\frac {c^{2} d \,x^{3}}{3 e^{2}}+\frac {b^{2} x^{2}}{2 e}-\frac {x^{2} d b c}{e^{2}}+\frac {x^{2} a c}{e}+\frac {x^{2} d^{2} c^{2}}{2 e^{3}}+\frac {2 a b x}{e}-\frac {2 a c d x}{e^{2}}-\frac {b^{2} d x}{e^{2}}+\frac {2 b c \,d^{2} x}{e^{3}}-\frac {c^{2} d^{3} x}{e^{4}}+\frac {\ln \left (e x +d \right ) a^{2}}{e}-\frac {2 \ln \left (e x +d \right ) d a b}{e^{2}}+\frac {2 \ln \left (e x +d \right ) a c \,d^{2}}{e^{3}}+\frac {\ln \left (e x +d \right ) d^{2} b^{2}}{e^{3}}-\frac {2 \ln \left (e x +d \right ) b c \,d^{3}}{e^{4}}+\frac {\ln \left (e x +d \right ) c^{2} d^{4}}{e^{5}}\) | \(221\) |
parallelrisch | \(\frac {3 c^{2} x^{4} e^{4}+8 x^{3} b c \,e^{4}-4 d \,c^{2} x^{3} e^{3}+12 x^{2} a c \,e^{4}+6 x^{2} b^{2} e^{4}-12 x^{2} b c d \,e^{3}+6 x^{2} c^{2} d^{2} e^{2}+12 \ln \left (e x +d \right ) a^{2} e^{4}-24 \ln \left (e x +d \right ) a b d \,e^{3}+24 \ln \left (e x +d \right ) a c \,d^{2} e^{2}+12 \ln \left (e x +d \right ) b^{2} d^{2} e^{2}-24 \ln \left (e x +d \right ) b c \,d^{3} e +12 \ln \left (e x +d \right ) c^{2} d^{4}+24 x a b \,e^{4}-24 x a c d \,e^{3}-12 x \,b^{2} d \,e^{3}+24 x b c \,d^{2} e^{2}-12 x \,c^{2} d^{3} e}{12 e^{5}}\) | \(223\) |
Input:
int((c*x^2+b*x+a)^2/(e*x+d),x,method=_RETURNVERBOSE)
Output:
1/e^4*(1/4*c^2*x^4*e^3+1/3*((b*e-c*d)*c*e^2+e^3*b*c)*x^3+1/2*((b*e-c*d)*b* e^2+c*e*(2*a*e^2-b*d*e+c*d^2))*x^2+(b*e-c*d)*(2*a*e^2-b*d*e+c*d^2)*x)+(a^2 *e^4-2*a*b*d*e^3+2*a*c*d^2*e^2+b^2*d^2*e^2-2*b*c*d^3*e+c^2*d^4)/e^5*ln(e*x +d)
Time = 0.08 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.32 \[ \int \frac {\left (a+b x+c x^2\right )^2}{d+e x} \, dx=\frac {3 \, c^{2} e^{4} x^{4} - 4 \, {\left (c^{2} d e^{3} - 2 \, b c e^{4}\right )} x^{3} + 6 \, {\left (c^{2} d^{2} e^{2} - 2 \, b c d e^{3} + {\left (b^{2} + 2 \, a c\right )} e^{4}\right )} x^{2} - 12 \, {\left (c^{2} d^{3} e - 2 \, b c d^{2} e^{2} - 2 \, a b e^{4} + {\left (b^{2} + 2 \, a c\right )} d e^{3}\right )} x + 12 \, {\left (c^{2} d^{4} - 2 \, b c d^{3} e - 2 \, a b d e^{3} + a^{2} e^{4} + {\left (b^{2} + 2 \, a c\right )} d^{2} e^{2}\right )} \log \left (e x + d\right )}{12 \, e^{5}} \] Input:
integrate((c*x^2+b*x+a)^2/(e*x+d),x, algorithm="fricas")
Output:
1/12*(3*c^2*e^4*x^4 - 4*(c^2*d*e^3 - 2*b*c*e^4)*x^3 + 6*(c^2*d^2*e^2 - 2*b *c*d*e^3 + (b^2 + 2*a*c)*e^4)*x^2 - 12*(c^2*d^3*e - 2*b*c*d^2*e^2 - 2*a*b* e^4 + (b^2 + 2*a*c)*d*e^3)*x + 12*(c^2*d^4 - 2*b*c*d^3*e - 2*a*b*d*e^3 + a ^2*e^4 + (b^2 + 2*a*c)*d^2*e^2)*log(e*x + d))/e^5
Time = 0.29 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.11 \[ \int \frac {\left (a+b x+c x^2\right )^2}{d+e x} \, dx=\frac {c^{2} x^{4}}{4 e} + x^{3} \cdot \left (\frac {2 b c}{3 e} - \frac {c^{2} d}{3 e^{2}}\right ) + x^{2} \left (\frac {a c}{e} + \frac {b^{2}}{2 e} - \frac {b c d}{e^{2}} + \frac {c^{2} d^{2}}{2 e^{3}}\right ) + x \left (\frac {2 a b}{e} - \frac {2 a c d}{e^{2}} - \frac {b^{2} d}{e^{2}} + \frac {2 b c d^{2}}{e^{3}} - \frac {c^{2} d^{3}}{e^{4}}\right ) + \frac {\left (a e^{2} - b d e + c d^{2}\right )^{2} \log {\left (d + e x \right )}}{e^{5}} \] Input:
integrate((c*x**2+b*x+a)**2/(e*x+d),x)
Output:
c**2*x**4/(4*e) + x**3*(2*b*c/(3*e) - c**2*d/(3*e**2)) + x**2*(a*c/e + b** 2/(2*e) - b*c*d/e**2 + c**2*d**2/(2*e**3)) + x*(2*a*b/e - 2*a*c*d/e**2 - b **2*d/e**2 + 2*b*c*d**2/e**3 - c**2*d**3/e**4) + (a*e**2 - b*d*e + c*d**2) **2*log(d + e*x)/e**5
Time = 0.05 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.30 \[ \int \frac {\left (a+b x+c x^2\right )^2}{d+e x} \, dx=\frac {3 \, c^{2} e^{3} x^{4} - 4 \, {\left (c^{2} d e^{2} - 2 \, b c e^{3}\right )} x^{3} + 6 \, {\left (c^{2} d^{2} e - 2 \, b c d e^{2} + {\left (b^{2} + 2 \, a c\right )} e^{3}\right )} x^{2} - 12 \, {\left (c^{2} d^{3} - 2 \, b c d^{2} e - 2 \, a b e^{3} + {\left (b^{2} + 2 \, a c\right )} d e^{2}\right )} x}{12 \, e^{4}} + \frac {{\left (c^{2} d^{4} - 2 \, b c d^{3} e - 2 \, a b d e^{3} + a^{2} e^{4} + {\left (b^{2} + 2 \, a c\right )} d^{2} e^{2}\right )} \log \left (e x + d\right )}{e^{5}} \] Input:
integrate((c*x^2+b*x+a)^2/(e*x+d),x, algorithm="maxima")
Output:
1/12*(3*c^2*e^3*x^4 - 4*(c^2*d*e^2 - 2*b*c*e^3)*x^3 + 6*(c^2*d^2*e - 2*b*c *d*e^2 + (b^2 + 2*a*c)*e^3)*x^2 - 12*(c^2*d^3 - 2*b*c*d^2*e - 2*a*b*e^3 + (b^2 + 2*a*c)*d*e^2)*x)/e^4 + (c^2*d^4 - 2*b*c*d^3*e - 2*a*b*d*e^3 + a^2*e ^4 + (b^2 + 2*a*c)*d^2*e^2)*log(e*x + d)/e^5
Time = 0.32 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.48 \[ \int \frac {\left (a+b x+c x^2\right )^2}{d+e x} \, dx=\frac {3 \, c^{2} e^{3} x^{4} - 4 \, c^{2} d e^{2} x^{3} + 8 \, b c e^{3} x^{3} + 6 \, c^{2} d^{2} e x^{2} - 12 \, b c d e^{2} x^{2} + 6 \, b^{2} e^{3} x^{2} + 12 \, a c e^{3} x^{2} - 12 \, c^{2} d^{3} x + 24 \, b c d^{2} e x - 12 \, b^{2} d e^{2} x - 24 \, a c d e^{2} x + 24 \, a b e^{3} x}{12 \, e^{4}} + \frac {{\left (c^{2} d^{4} - 2 \, b c d^{3} e + b^{2} d^{2} e^{2} + 2 \, a c d^{2} e^{2} - 2 \, a b d e^{3} + a^{2} e^{4}\right )} \log \left ({\left | e x + d \right |}\right )}{e^{5}} \] Input:
integrate((c*x^2+b*x+a)^2/(e*x+d),x, algorithm="giac")
Output:
1/12*(3*c^2*e^3*x^4 - 4*c^2*d*e^2*x^3 + 8*b*c*e^3*x^3 + 6*c^2*d^2*e*x^2 - 12*b*c*d*e^2*x^2 + 6*b^2*e^3*x^2 + 12*a*c*e^3*x^2 - 12*c^2*d^3*x + 24*b*c* d^2*e*x - 12*b^2*d*e^2*x - 24*a*c*d*e^2*x + 24*a*b*e^3*x)/e^4 + (c^2*d^4 - 2*b*c*d^3*e + b^2*d^2*e^2 + 2*a*c*d^2*e^2 - 2*a*b*d*e^3 + a^2*e^4)*log(ab s(e*x + d))/e^5
Time = 0.03 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.43 \[ \int \frac {\left (a+b x+c x^2\right )^2}{d+e x} \, dx=x^2\,\left (\frac {b^2+2\,a\,c}{2\,e}+\frac {d\,\left (\frac {c^2\,d}{e^2}-\frac {2\,b\,c}{e}\right )}{2\,e}\right )-x\,\left (\frac {d\,\left (\frac {b^2+2\,a\,c}{e}+\frac {d\,\left (\frac {c^2\,d}{e^2}-\frac {2\,b\,c}{e}\right )}{e}\right )}{e}-\frac {2\,a\,b}{e}\right )-x^3\,\left (\frac {c^2\,d}{3\,e^2}-\frac {2\,b\,c}{3\,e}\right )+\frac {\ln \left (d+e\,x\right )\,\left (a^2\,e^4-2\,a\,b\,d\,e^3+2\,a\,c\,d^2\,e^2+b^2\,d^2\,e^2-2\,b\,c\,d^3\,e+c^2\,d^4\right )}{e^5}+\frac {c^2\,x^4}{4\,e} \] Input:
int((a + b*x + c*x^2)^2/(d + e*x),x)
Output:
x^2*((2*a*c + b^2)/(2*e) + (d*((c^2*d)/e^2 - (2*b*c)/e))/(2*e)) - x*((d*(( 2*a*c + b^2)/e + (d*((c^2*d)/e^2 - (2*b*c)/e))/e))/e - (2*a*b)/e) - x^3*(( c^2*d)/(3*e^2) - (2*b*c)/(3*e)) + (log(d + e*x)*(a^2*e^4 + c^2*d^4 + b^2*d ^2*e^2 - 2*a*b*d*e^3 - 2*b*c*d^3*e + 2*a*c*d^2*e^2))/e^5 + (c^2*x^4)/(4*e)
Time = 0.21 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.72 \[ \int \frac {\left (a+b x+c x^2\right )^2}{d+e x} \, dx=\frac {12 \,\mathrm {log}\left (e x +d \right ) a^{2} e^{4}-24 \,\mathrm {log}\left (e x +d \right ) a b d \,e^{3}+24 \,\mathrm {log}\left (e x +d \right ) a c \,d^{2} e^{2}+12 \,\mathrm {log}\left (e x +d \right ) b^{2} d^{2} e^{2}-24 \,\mathrm {log}\left (e x +d \right ) b c \,d^{3} e +12 \,\mathrm {log}\left (e x +d \right ) c^{2} d^{4}+24 a b \,e^{4} x -24 a c d \,e^{3} x +12 a c \,e^{4} x^{2}-12 b^{2} d \,e^{3} x +6 b^{2} e^{4} x^{2}+24 b c \,d^{2} e^{2} x -12 b c d \,e^{3} x^{2}+8 b c \,e^{4} x^{3}-12 c^{2} d^{3} e x +6 c^{2} d^{2} e^{2} x^{2}-4 c^{2} d \,e^{3} x^{3}+3 c^{2} e^{4} x^{4}}{12 e^{5}} \] Input:
int((c*x^2+b*x+a)^2/(e*x+d),x)
Output:
(12*log(d + e*x)*a**2*e**4 - 24*log(d + e*x)*a*b*d*e**3 + 24*log(d + e*x)* a*c*d**2*e**2 + 12*log(d + e*x)*b**2*d**2*e**2 - 24*log(d + e*x)*b*c*d**3* e + 12*log(d + e*x)*c**2*d**4 + 24*a*b*e**4*x - 24*a*c*d*e**3*x + 12*a*c*e **4*x**2 - 12*b**2*d*e**3*x + 6*b**2*e**4*x**2 + 24*b*c*d**2*e**2*x - 12*b *c*d*e**3*x**2 + 8*b*c*e**4*x**3 - 12*c**2*d**3*e*x + 6*c**2*d**2*e**2*x** 2 - 4*c**2*d*e**3*x**3 + 3*c**2*e**4*x**4)/(12*e**5)