Integrand size = 21, antiderivative size = 84 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=-\frac {b n (d+4 e x)^2}{4 x^2}-\frac {1}{2} b e^2 n \log ^2(x)-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{x}+e^2 \log (x) \left (a+b \log \left (c x^n\right )\right ) \] Output:
-1/4*b*n*(4*e*x+d)^2/x^2-1/2*b*e^2*n*ln(x)^2-1/2*d^2*(a+b*ln(c*x^n))/x^2-2 *d*e*(a+b*ln(c*x^n))/x+e^2*ln(x)*(a+b*ln(c*x^n))
Time = 0.07 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.00 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=-\frac {b d^2 n}{4 x^2}-\frac {2 b d e n}{x}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 b n} \] Input:
Integrate[((d + e*x)^2*(a + b*Log[c*x^n]))/x^3,x]
Output:
-1/4*(b*d^2*n)/x^2 - (2*b*d*e*n)/x - (d^2*(a + b*Log[c*x^n]))/(2*x^2) - (2 *d*e*(a + b*Log[c*x^n]))/x + (e^2*(a + b*Log[c*x^n])^2)/(2*b*n)
Time = 0.29 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.01, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2772, 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 {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx\) |
\(\Big \downarrow \) 2772 |
\(\displaystyle -b n \int \left (\frac {e^2 \log (x)}{x}-\frac {d (d+4 e x)}{2 x^3}\right )dx-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{x}+e^2 \log (x) \left (a+b \log \left (c x^n\right )\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{x}+e^2 \log (x) \left (a+b \log \left (c x^n\right )\right )-b n \left (\frac {(d+4 e x)^2}{4 x^2}+\frac {1}{2} e^2 \log ^2(x)\right )\) |
Input:
Int[((d + e*x)^2*(a + b*Log[c*x^n]))/x^3,x]
Output:
-(b*n*((d + 4*e*x)^2/(4*x^2) + (e^2*Log[x]^2)/2)) - (d^2*(a + b*Log[c*x^n] ))/(2*x^2) - (2*d*e*(a + b*Log[c*x^n]))/x + e^2*Log[x]*(a + b*Log[c*x^n])
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_ .))^(q_.), x_Symbol] :> With[{u = IntHide[x^m*(d + e*x^r)^q, x]}, Simp[(a + b*Log[c*x^n]) u, x] - Simp[b*n Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] && !(EqQ[q , 1] && EqQ[m, -1])
Time = 0.42 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.15
method | result | size |
parallelrisch | \(\frac {4 \ln \left (x \right ) x^{2} a \,e^{2} n +2 e^{2} b \ln \left (c \,x^{n}\right )^{2} x^{2}-8 x \ln \left (c \,x^{n}\right ) b d e n -8 x b d e \,n^{2}-8 x a d e n -2 \ln \left (c \,x^{n}\right ) b \,d^{2} n -b \,d^{2} n^{2}-2 a \,d^{2} n}{4 x^{2} n}\) | \(97\) |
risch | \(-\frac {b \left (-2 e^{2} \ln \left (x \right ) x^{2}+4 e x d +d^{2}\right ) \ln \left (x^{n}\right )}{2 x^{2}}-\frac {-2 i \ln \left (x \right ) \pi b \,e^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right ) x^{2}+4 i \pi b d e x \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )+2 i \ln \left (x \right ) \pi b \,e^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3} x^{2}+4 i \pi b d e x \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )+2 i \ln \left (x \right ) \pi b \,e^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right ) x^{2}-i \pi b \,d^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )-4 i \pi b d e x \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-4 i \pi b d e x \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )-i \pi b \,d^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-2 i \ln \left (x \right ) \pi b \,e^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} x^{2}+2 e^{2} b n \ln \left (x \right )^{2} x^{2}-4 \ln \left (x \right ) \ln \left (c \right ) b \,e^{2} x^{2}-4 \ln \left (x \right ) a \,e^{2} x^{2}+8 \ln \left (c \right ) b d e x +8 b d e n x +2 d^{2} b \ln \left (c \right )+8 a e x d +b \,d^{2} n +2 a \,d^{2}}{4 x^{2}}\) | \(418\) |
Input:
int((e*x+d)^2*(a+b*ln(c*x^n))/x^3,x,method=_RETURNVERBOSE)
Output:
1/4/x^2*(4*ln(x)*x^2*a*e^2*n+2*e^2*b*ln(c*x^n)^2*x^2-8*x*ln(c*x^n)*b*d*e*n -8*x*b*d*e*n^2-8*x*a*d*e*n-2*ln(c*x^n)*b*d^2*n-b*d^2*n^2-2*a*d^2*n)/n
Time = 0.07 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.20 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=\frac {2 \, b e^{2} n x^{2} \log \left (x\right )^{2} - b d^{2} n - 2 \, a d^{2} - 8 \, {\left (b d e n + a d e\right )} x - 2 \, {\left (4 \, b d e x + b d^{2}\right )} \log \left (c\right ) + 2 \, {\left (2 \, b e^{2} x^{2} \log \left (c\right ) - 4 \, b d e n x + 2 \, a e^{2} x^{2} - b d^{2} n\right )} \log \left (x\right )}{4 \, x^{2}} \] Input:
integrate((e*x+d)^2*(a+b*log(c*x^n))/x^3,x, algorithm="fricas")
Output:
1/4*(2*b*e^2*n*x^2*log(x)^2 - b*d^2*n - 2*a*d^2 - 8*(b*d*e*n + a*d*e)*x - 2*(4*b*d*e*x + b*d^2)*log(c) + 2*(2*b*e^2*x^2*log(c) - 4*b*d*e*n*x + 2*a*e ^2*x^2 - b*d^2*n)*log(x))/x^2
Time = 2.43 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.18 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=- \frac {a d^{2}}{2 x^{2}} - \frac {2 a d e}{x} + a e^{2} \log {\left (x \right )} + b d^{2} \left (- \frac {n}{4 x^{2}} - \frac {\log {\left (c x^{n} \right )}}{2 x^{2}}\right ) + 2 b d e \left (- \frac {n}{x} - \frac {\log {\left (c x^{n} \right )}}{x}\right ) - b e^{2} \left (\begin {cases} - \log {\left (c \right )} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{2}}{2 n} & \text {otherwise} \end {cases}\right ) \] Input:
integrate((e*x+d)**2*(a+b*ln(c*x**n))/x**3,x)
Output:
-a*d**2/(2*x**2) - 2*a*d*e/x + a*e**2*log(x) + b*d**2*(-n/(4*x**2) - log(c *x**n)/(2*x**2)) + 2*b*d*e*(-n/x - log(c*x**n)/x) - b*e**2*Piecewise((-log (c)*log(x), Eq(n, 0)), (-log(c*x**n)**2/(2*n), True))
Time = 0.04 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.07 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=\frac {b e^{2} \log \left (c x^{n}\right )^{2}}{2 \, n} + a e^{2} \log \left (x\right ) - \frac {2 \, b d e n}{x} - \frac {2 \, b d e \log \left (c x^{n}\right )}{x} - \frac {b d^{2} n}{4 \, x^{2}} - \frac {2 \, a d e}{x} - \frac {b d^{2} \log \left (c x^{n}\right )}{2 \, x^{2}} - \frac {a d^{2}}{2 \, x^{2}} \] Input:
integrate((e*x+d)^2*(a+b*log(c*x^n))/x^3,x, algorithm="maxima")
Output:
1/2*b*e^2*log(c*x^n)^2/n + a*e^2*log(x) - 2*b*d*e*n/x - 2*b*d*e*log(c*x^n) /x - 1/4*b*d^2*n/x^2 - 2*a*d*e/x - 1/2*b*d^2*log(c*x^n)/x^2 - 1/2*a*d^2/x^ 2
Time = 0.13 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.21 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=\frac {1}{2} \, b e^{2} n \log \left (x\right )^{2} - 2 \, b d e n {\left (\frac {\log \left (x\right )}{x} + \frac {1}{x}\right )} - \frac {1}{4} \, b d^{2} n {\left (\frac {2 \, \log \left (x\right )}{x^{2}} + \frac {1}{x^{2}}\right )} + b e^{2} \log \left (c\right ) \log \left ({\left | x \right |}\right ) + a e^{2} \log \left ({\left | x \right |}\right ) - \frac {2 \, b d e \log \left (c\right )}{x} - \frac {2 \, a d e}{x} - \frac {b d^{2} \log \left (c\right )}{2 \, x^{2}} - \frac {a d^{2}}{2 \, x^{2}} \] Input:
integrate((e*x+d)^2*(a+b*log(c*x^n))/x^3,x, algorithm="giac")
Output:
1/2*b*e^2*n*log(x)^2 - 2*b*d*e*n*(log(x)/x + 1/x) - 1/4*b*d^2*n*(2*log(x)/ x^2 + 1/x^2) + b*e^2*log(c)*log(abs(x)) + a*e^2*log(abs(x)) - 2*b*d*e*log( c)/x - 2*a*d*e/x - 1/2*b*d^2*log(c)/x^2 - 1/2*a*d^2/x^2
Time = 27.30 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.18 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=\ln \left (x\right )\,\left (a\,e^2+\frac {3\,b\,e^2\,n}{2}\right )-\frac {a\,d^2+x\,\left (4\,a\,d\,e+4\,b\,d\,e\,n\right )+\frac {b\,d^2\,n}{2}}{2\,x^2}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d^2}{2}+2\,b\,d\,e\,x+\frac {3\,b\,e^2\,x^2}{2}\right )}{x^2}+\frac {b\,e^2\,{\ln \left (c\,x^n\right )}^2}{2\,n} \] Input:
int(((a + b*log(c*x^n))*(d + e*x)^2)/x^3,x)
Output:
log(x)*(a*e^2 + (3*b*e^2*n)/2) - (a*d^2 + x*(4*a*d*e + 4*b*d*e*n) + (b*d^2 *n)/2)/(2*x^2) - (log(c*x^n)*((b*d^2)/2 + (3*b*e^2*x^2)/2 + 2*b*d*e*x))/x^ 2 + (b*e^2*log(c*x^n)^2)/(2*n)
Time = 0.16 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.14 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=\frac {2 \mathrm {log}\left (x^{n} c \right )^{2} b \,e^{2} x^{2}-2 \,\mathrm {log}\left (x^{n} c \right ) b \,d^{2} n -8 \,\mathrm {log}\left (x^{n} c \right ) b d e n x +4 \,\mathrm {log}\left (x \right ) a \,e^{2} n \,x^{2}-2 a \,d^{2} n -8 a d e n x -b \,d^{2} n^{2}-8 b d e \,n^{2} x}{4 n \,x^{2}} \] Input:
int((e*x+d)^2*(a+b*log(c*x^n))/x^3,x)
Output:
(2*log(x**n*c)**2*b*e**2*x**2 - 2*log(x**n*c)*b*d**2*n - 8*log(x**n*c)*b*d *e*n*x + 4*log(x)*a*e**2*n*x**2 - 2*a*d**2*n - 8*a*d*e*n*x - b*d**2*n**2 - 8*b*d*e*n**2*x)/(4*n*x**2)