Integrand size = 20, antiderivative size = 102 \[ \int (d+e x)^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx=\frac {b e (3 a d-b e) p x}{3 a^2}+\frac {b e^2 p x^2}{6 a}+\frac {(d+e x)^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )}{3 e}+\frac {d^3 p \log (x)}{3 e}-\frac {(a d-b e)^3 p \log (b+a x)}{3 a^3 e} \] Output:
1/3*b*e*(3*a*d-b*e)*p*x/a^2+1/6*b*e^2*p*x^2/a+1/3*(e*x+d)^3*ln(c*(a+b/x)^p )/e+1/3*d^3*p*ln(x)/e-1/3*(a*d-b*e)^3*p*ln(a*x+b)/a^3/e
Time = 0.09 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.84 \[ \int (d+e x)^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx=\frac {2 a^3 (d+e x)^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )+p \left (a b e^2 x (6 a d-2 b e+a e x)+2 a^3 d^3 \log (x)-2 (a d-b e)^3 \log (b+a x)\right )}{6 a^3 e} \] Input:
Integrate[(d + e*x)^2*Log[c*(a + b/x)^p],x]
Output:
(2*a^3*(d + e*x)^3*Log[c*(a + b/x)^p] + p*(a*b*e^2*x*(6*a*d - 2*b*e + a*e* x) + 2*a^3*d^3*Log[x] - 2*(a*d - b*e)^3*Log[b + a*x]))/(6*a^3*e)
Time = 0.50 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.98, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2913, 1016, 93, 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 (d+e x)^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx\) |
\(\Big \downarrow \) 2913 |
\(\displaystyle \frac {b p \int \frac {(d+e x)^3}{\left (a+\frac {b}{x}\right ) x^2}dx}{3 e}+\frac {(d+e x)^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )}{3 e}\) |
\(\Big \downarrow \) 1016 |
\(\displaystyle \frac {b p \int \frac {(d+e x)^3}{x (b+a x)}dx}{3 e}+\frac {(d+e x)^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )}{3 e}\) |
\(\Big \downarrow \) 93 |
\(\displaystyle \frac {b p \int \left (\frac {d^3}{b x}+\frac {e^2 (3 a d-b e)}{a^2}+\frac {e^3 x}{a}-\frac {(a d-b e)^3}{a^2 b (b+a x)}\right )dx}{3 e}+\frac {(d+e x)^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )}{3 e}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b p \left (-\frac {(a d-b e)^3 \log (a x+b)}{a^3 b}+\frac {e^2 x (3 a d-b e)}{a^2}+\frac {e^3 x^2}{2 a}+\frac {d^3 \log (x)}{b}\right )}{3 e}+\frac {(d+e x)^3 \log \left (c \left (a+\frac {b}{x}\right )^p\right )}{3 e}\) |
Input:
Int[(d + e*x)^2*Log[c*(a + b/x)^p],x]
Output:
((d + e*x)^3*Log[c*(a + b/x)^p])/(3*e) + (b*p*((e^2*(3*a*d - b*e)*x)/a^2 + (e^3*x^2)/(2*a) + (d^3*Log[x])/b - ((a*d - b*e)^3*Log[b + a*x])/(a^3*b))) /(3*e)
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_] :> Int[ExpandIntegrand[(e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; Fre eQ[{a, b, c, d, e, f}, x] && IntegerQ[p]
Int[(x_)^(m_.)*((c_) + (d_.)*(x_)^(mn_.))^(q_.)*((a_) + (b_.)*(x_)^(n_.))^( p_.), x_Symbol] :> Int[x^(m - n*q)*(a + b*x^n)^p*(d + c*x^n)^q, x] /; FreeQ [{a, b, c, d, m, n, p}, x] && EqQ[mn, -n] && IntegerQ[q] && (PosQ[n] || !I ntegerQ[p])
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.) + (g_. )*(x_))^(r_.), x_Symbol] :> Simp[(f + g*x)^(r + 1)*((a + b*Log[c*(d + e*x^n )^p])/(g*(r + 1))), x] - Simp[b*e*n*(p/(g*(r + 1))) Int[x^(n - 1)*((f + g *x)^(r + 1)/(d + e*x^n)), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, r}, x ] && (IGtQ[r, 0] || RationalQ[n]) && NeQ[r, -1]
Time = 0.69 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.65
method | result | size |
parts | \(\frac {\ln \left (c \left (a +\frac {b}{x}\right )^{p}\right ) e^{2} x^{3}}{3}+\ln \left (c \left (a +\frac {b}{x}\right )^{p}\right ) e d \,x^{2}+\ln \left (c \left (a +\frac {b}{x}\right )^{p}\right ) d^{2} x +\frac {\ln \left (c \left (a +\frac {b}{x}\right )^{p}\right ) d^{3}}{3 e}+\frac {p b \left (\frac {e^{2} \left (\frac {1}{2} a e \,x^{2}+3 x d a -b e x \right )}{a^{2}}+\frac {\left (-a^{3} d^{3}+3 a^{2} b \,d^{2} e -3 b^{2} d \,e^{2} a +b^{3} e^{3}\right ) \ln \left (a x +b \right )}{a^{3} b}+\frac {d^{3} \ln \left (x \right )}{b}\right )}{3 e}\) | \(168\) |
parallelrisch | \(-\frac {-2 x^{3} \ln \left (c \left (\frac {a x +b}{x}\right )^{p}\right ) a^{3} e^{2}-6 x^{2} \ln \left (c \left (\frac {a x +b}{x}\right )^{p}\right ) a^{3} d e -x^{2} a^{2} b \,e^{2} p +6 \ln \left (x \right ) a^{2} b \,d^{2} p -12 \ln \left (a x +b \right ) a^{2} b \,d^{2} p +6 \ln \left (a x +b \right ) a \,b^{2} d e p -2 \ln \left (a x +b \right ) b^{3} e^{2} p -6 x \ln \left (c \left (\frac {a x +b}{x}\right )^{p}\right ) a^{3} d^{2}-6 x \,a^{2} b d e p +2 x a \,b^{2} e^{2} p +6 \ln \left (c \left (\frac {a x +b}{x}\right )^{p}\right ) a^{2} b \,d^{2}+6 a \,b^{2} d e p -2 b^{3} e^{2} p}{6 a^{3}}\) | \(212\) |
Input:
int((e*x+d)^2*ln(c*(a+b/x)^p),x,method=_RETURNVERBOSE)
Output:
1/3*ln(c*(a+b/x)^p)*e^2*x^3+ln(c*(a+b/x)^p)*e*d*x^2+ln(c*(a+b/x)^p)*d^2*x+ 1/3*ln(c*(a+b/x)^p)/e*d^3+1/3*p*b/e*(e^2/a^2*(1/2*a*e*x^2+3*x*d*a-b*e*x)+( -a^3*d^3+3*a^2*b*d^2*e-3*a*b^2*d*e^2+b^3*e^3)/a^3/b*ln(a*x+b)+d^3/b*ln(x))
Time = 0.08 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.50 \[ \int (d+e x)^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx=\frac {a^{2} b e^{2} p x^{2} + 2 \, {\left (3 \, a^{2} b d e - a b^{2} e^{2}\right )} p x + 2 \, {\left (3 \, a^{2} b d^{2} - 3 \, a b^{2} d e + b^{3} e^{2}\right )} p \log \left (a x + b\right ) + 2 \, {\left (a^{3} e^{2} x^{3} + 3 \, a^{3} d e x^{2} + 3 \, a^{3} d^{2} x\right )} \log \left (c\right ) + 2 \, {\left (a^{3} e^{2} p x^{3} + 3 \, a^{3} d e p x^{2} + 3 \, a^{3} d^{2} p x\right )} \log \left (\frac {a x + b}{x}\right )}{6 \, a^{3}} \] Input:
integrate((e*x+d)^2*log(c*(a+b/x)^p),x, algorithm="fricas")
Output:
1/6*(a^2*b*e^2*p*x^2 + 2*(3*a^2*b*d*e - a*b^2*e^2)*p*x + 2*(3*a^2*b*d^2 - 3*a*b^2*d*e + b^3*e^2)*p*log(a*x + b) + 2*(a^3*e^2*x^3 + 3*a^3*d*e*x^2 + 3 *a^3*d^2*x)*log(c) + 2*(a^3*e^2*p*x^3 + 3*a^3*d*e*p*x^2 + 3*a^3*d^2*p*x)*l og((a*x + b)/x))/a^3
Leaf count of result is larger than twice the leaf count of optimal. 216 vs. \(2 (88) = 176\).
Time = 0.87 (sec) , antiderivative size = 216, normalized size of antiderivative = 2.12 \[ \int (d+e x)^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx=\begin {cases} d^{2} x \log {\left (c \left (a + \frac {b}{x}\right )^{p} \right )} + d e x^{2} \log {\left (c \left (a + \frac {b}{x}\right )^{p} \right )} + \frac {e^{2} x^{3} \log {\left (c \left (a + \frac {b}{x}\right )^{p} \right )}}{3} + \frac {b d^{2} p \log {\left (x + \frac {b}{a} \right )}}{a} + \frac {b d e p x}{a} + \frac {b e^{2} p x^{2}}{6 a} - \frac {b^{2} d e p \log {\left (x + \frac {b}{a} \right )}}{a^{2}} - \frac {b^{2} e^{2} p x}{3 a^{2}} + \frac {b^{3} e^{2} p \log {\left (x + \frac {b}{a} \right )}}{3 a^{3}} & \text {for}\: a \neq 0 \\d^{2} p x + d^{2} x \log {\left (c \left (\frac {b}{x}\right )^{p} \right )} + \frac {d e p x^{2}}{2} + d e x^{2} \log {\left (c \left (\frac {b}{x}\right )^{p} \right )} + \frac {e^{2} p x^{3}}{9} + \frac {e^{2} x^{3} \log {\left (c \left (\frac {b}{x}\right )^{p} \right )}}{3} & \text {otherwise} \end {cases} \] Input:
integrate((e*x+d)**2*ln(c*(a+b/x)**p),x)
Output:
Piecewise((d**2*x*log(c*(a + b/x)**p) + d*e*x**2*log(c*(a + b/x)**p) + e** 2*x**3*log(c*(a + b/x)**p)/3 + b*d**2*p*log(x + b/a)/a + b*d*e*p*x/a + b*e **2*p*x**2/(6*a) - b**2*d*e*p*log(x + b/a)/a**2 - b**2*e**2*p*x/(3*a**2) + b**3*e**2*p*log(x + b/a)/(3*a**3), Ne(a, 0)), (d**2*p*x + d**2*x*log(c*(b /x)**p) + d*e*p*x**2/2 + d*e*x**2*log(c*(b/x)**p) + e**2*p*x**3/9 + e**2*x **3*log(c*(b/x)**p)/3, True))
Time = 0.03 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.00 \[ \int (d+e x)^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx=\frac {1}{6} \, b p {\left (\frac {a e^{2} x^{2} + 2 \, {\left (3 \, a d e - b e^{2}\right )} x}{a^{2}} + \frac {2 \, {\left (3 \, a^{2} d^{2} - 3 \, a b d e + b^{2} e^{2}\right )} \log \left (a x + b\right )}{a^{3}}\right )} + \frac {1}{3} \, {\left (e^{2} x^{3} + 3 \, d e x^{2} + 3 \, d^{2} x\right )} \log \left ({\left (a + \frac {b}{x}\right )}^{p} c\right ) \] Input:
integrate((e*x+d)^2*log(c*(a+b/x)^p),x, algorithm="maxima")
Output:
1/6*b*p*((a*e^2*x^2 + 2*(3*a*d*e - b*e^2)*x)/a^2 + 2*(3*a^2*d^2 - 3*a*b*d* e + b^2*e^2)*log(a*x + b)/a^3) + 1/3*(e^2*x^3 + 3*d*e*x^2 + 3*d^2*x)*log(( a + b/x)^p*c)
Leaf count of result is larger than twice the leaf count of optimal. 490 vs. \(2 (92) = 184\).
Time = 0.13 (sec) , antiderivative size = 490, normalized size of antiderivative = 4.80 \[ \int (d+e x)^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx=-\frac {\frac {2 \, {\left (3 \, a^{2} b^{2} d^{2} p - 3 \, a b^{3} d e p + b^{4} e^{2} p - \frac {6 \, {\left (a x + b\right )} a b^{2} d^{2} p}{x} + \frac {3 \, {\left (a x + b\right )} b^{3} d e p}{x} + \frac {3 \, {\left (a x + b\right )}^{2} b^{2} d^{2} p}{x^{2}}\right )} \log \left (\frac {a x + b}{x}\right )}{a^{3} - \frac {3 \, {\left (a x + b\right )} a^{2}}{x} + \frac {3 \, {\left (a x + b\right )}^{2} a}{x^{2}} - \frac {{\left (a x + b\right )}^{3}}{x^{3}}} + \frac {6 \, a^{3} b^{3} d e p - 3 \, a^{2} b^{4} e^{2} p + 6 \, a^{4} b^{2} d^{2} \log \left (c\right ) - 6 \, a^{3} b^{3} d e \log \left (c\right ) + 2 \, a^{2} b^{4} e^{2} \log \left (c\right ) - \frac {12 \, {\left (a x + b\right )} a^{2} b^{3} d e p}{x} + \frac {5 \, {\left (a x + b\right )} a b^{4} e^{2} p}{x} - \frac {12 \, {\left (a x + b\right )} a^{3} b^{2} d^{2} \log \left (c\right )}{x} + \frac {6 \, {\left (a x + b\right )} a^{2} b^{3} d e \log \left (c\right )}{x} + \frac {6 \, {\left (a x + b\right )}^{2} a b^{3} d e p}{x^{2}} - \frac {2 \, {\left (a x + b\right )}^{2} b^{4} e^{2} p}{x^{2}} + \frac {6 \, {\left (a x + b\right )}^{2} a^{2} b^{2} d^{2} \log \left (c\right )}{x^{2}}}{a^{5} - \frac {3 \, {\left (a x + b\right )} a^{4}}{x} + \frac {3 \, {\left (a x + b\right )}^{2} a^{3}}{x^{2}} - \frac {{\left (a x + b\right )}^{3} a^{2}}{x^{3}}} + \frac {2 \, {\left (3 \, a^{2} b^{2} d^{2} p - 3 \, a b^{3} d e p + b^{4} e^{2} p\right )} \log \left (-a + \frac {a x + b}{x}\right )}{a^{3}} - \frac {2 \, {\left (3 \, a^{2} b^{2} d^{2} p - 3 \, a b^{3} d e p + b^{4} e^{2} p\right )} \log \left (\frac {a x + b}{x}\right )}{a^{3}}}{6 \, b} \] Input:
integrate((e*x+d)^2*log(c*(a+b/x)^p),x, algorithm="giac")
Output:
-1/6*(2*(3*a^2*b^2*d^2*p - 3*a*b^3*d*e*p + b^4*e^2*p - 6*(a*x + b)*a*b^2*d ^2*p/x + 3*(a*x + b)*b^3*d*e*p/x + 3*(a*x + b)^2*b^2*d^2*p/x^2)*log((a*x + b)/x)/(a^3 - 3*(a*x + b)*a^2/x + 3*(a*x + b)^2*a/x^2 - (a*x + b)^3/x^3) + (6*a^3*b^3*d*e*p - 3*a^2*b^4*e^2*p + 6*a^4*b^2*d^2*log(c) - 6*a^3*b^3*d*e *log(c) + 2*a^2*b^4*e^2*log(c) - 12*(a*x + b)*a^2*b^3*d*e*p/x + 5*(a*x + b )*a*b^4*e^2*p/x - 12*(a*x + b)*a^3*b^2*d^2*log(c)/x + 6*(a*x + b)*a^2*b^3* d*e*log(c)/x + 6*(a*x + b)^2*a*b^3*d*e*p/x^2 - 2*(a*x + b)^2*b^4*e^2*p/x^2 + 6*(a*x + b)^2*a^2*b^2*d^2*log(c)/x^2)/(a^5 - 3*(a*x + b)*a^4/x + 3*(a*x + b)^2*a^3/x^2 - (a*x + b)^3*a^2/x^3) + 2*(3*a^2*b^2*d^2*p - 3*a*b^3*d*e* p + b^4*e^2*p)*log(-a + (a*x + b)/x)/a^3 - 2*(3*a^2*b^2*d^2*p - 3*a*b^3*d* e*p + b^4*e^2*p)*log((a*x + b)/x)/a^3)/b
Time = 25.72 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.09 \[ \int (d+e x)^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx=\ln \left (c\,{\left (a+\frac {b}{x}\right )}^p\right )\,\left (d^2\,x+d\,e\,x^2+\frac {e^2\,x^3}{3}\right )-x\,\left (\frac {b^2\,e^2\,p}{3\,a^2}-\frac {b\,d\,e\,p}{a}\right )+\frac {\ln \left (b+a\,x\right )\,\left (3\,p\,a^2\,b\,d^2-3\,p\,a\,b^2\,d\,e+p\,b^3\,e^2\right )}{3\,a^3}+\frac {b\,e^2\,p\,x^2}{6\,a} \] Input:
int(log(c*(a + b/x)^p)*(d + e*x)^2,x)
Output:
log(c*(a + b/x)^p)*(d^2*x + (e^2*x^3)/3 + d*e*x^2) - x*((b^2*e^2*p)/(3*a^2 ) - (b*d*e*p)/a) + (log(b + a*x)*(b^3*e^2*p + 3*a^2*b*d^2*p - 3*a*b^2*d*e* p))/(3*a^3) + (b*e^2*p*x^2)/(6*a)
Time = 0.19 (sec) , antiderivative size = 218, normalized size of antiderivative = 2.14 \[ \int (d+e x)^2 \log \left (c \left (a+\frac {b}{x}\right )^p\right ) \, dx=\frac {6 \,\mathrm {log}\left (\frac {\left (a x +b \right )^{p} c}{x^{p}}\right ) a^{3} d^{2} x +6 \,\mathrm {log}\left (\frac {\left (a x +b \right )^{p} c}{x^{p}}\right ) a^{3} d e \,x^{2}+2 \,\mathrm {log}\left (\frac {\left (a x +b \right )^{p} c}{x^{p}}\right ) a^{3} e^{2} x^{3}+6 \,\mathrm {log}\left (\frac {\left (a x +b \right )^{p} c}{x^{p}}\right ) a^{2} b \,d^{2}-6 \,\mathrm {log}\left (\frac {\left (a x +b \right )^{p} c}{x^{p}}\right ) a \,b^{2} d e +2 \,\mathrm {log}\left (\frac {\left (a x +b \right )^{p} c}{x^{p}}\right ) b^{3} e^{2}+6 \,\mathrm {log}\left (x \right ) a^{2} b \,d^{2} p -6 \,\mathrm {log}\left (x \right ) a \,b^{2} d e p +2 \,\mathrm {log}\left (x \right ) b^{3} e^{2} p +6 a^{2} b d e p x +a^{2} b \,e^{2} p \,x^{2}-2 a \,b^{2} e^{2} p x}{6 a^{3}} \] Input:
int((e*x+d)^2*log(c*(a+b/x)^p),x)
Output:
(6*log(((a*x + b)**p*c)/x**p)*a**3*d**2*x + 6*log(((a*x + b)**p*c)/x**p)*a **3*d*e*x**2 + 2*log(((a*x + b)**p*c)/x**p)*a**3*e**2*x**3 + 6*log(((a*x + b)**p*c)/x**p)*a**2*b*d**2 - 6*log(((a*x + b)**p*c)/x**p)*a*b**2*d*e + 2* log(((a*x + b)**p*c)/x**p)*b**3*e**2 + 6*log(x)*a**2*b*d**2*p - 6*log(x)*a *b**2*d*e*p + 2*log(x)*b**3*e**2*p + 6*a**2*b*d*e*p*x + a**2*b*e**2*p*x**2 - 2*a*b**2*e**2*p*x)/(6*a**3)