Integrand size = 23, antiderivative size = 104 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {2 b d e n x^r}{r^2}-\frac {b e^2 n x^{2 r}}{4 r^2}-\frac {1}{2} b d^2 n \log ^2(x)+\frac {2 d e x^r \left (a+b \log \left (c x^n\right )\right )}{r}+\frac {e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r}+d^2 \log (x) \left (a+b \log \left (c x^n\right )\right ) \] Output:
-2*b*d*e*n*x^r/r^2-1/4*b*e^2*n*x^(2*r)/r^2-1/2*b*d^2*n*ln(x)^2+2*d*e*x^r*( a+b*ln(c*x^n))/r+1/2*e^2*x^(2*r)*(a+b*ln(c*x^n))/r+d^2*ln(x)*(a+b*ln(c*x^n ))
Time = 0.17 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.87 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {1}{4} \left (\frac {e x^r \left (2 a r \left (4 d+e x^r\right )-b n \left (8 d+e x^r\right )\right )}{r^2}+4 a d^2 \log (x)+\frac {2 b e x^r \left (4 d+e x^r\right ) \log \left (c x^n\right )}{r}+\frac {2 b d^2 \log ^2\left (c x^n\right )}{n}\right ) \] Input:
Integrate[((d + e*x^r)^2*(a + b*Log[c*x^n]))/x,x]
Output:
((e*x^r*(2*a*r*(4*d + e*x^r) - b*n*(8*d + e*x^r)))/r^2 + 4*a*d^2*Log[x] + (2*b*e*x^r*(4*d + e*x^r)*Log[c*x^n])/r + (2*b*d^2*Log[c*x^n]^2)/n)/4
Time = 0.39 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.02, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2772, 27, 2010, 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 (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx\) |
\(\Big \downarrow \) 2772 |
\(\displaystyle -b n \int \frac {e \left (e x^r+4 d\right ) x^r+2 d^2 r \log (x)}{2 r x}dx+d^2 \log (x) \left (a+b \log \left (c x^n\right )\right )+\frac {2 d e x^r \left (a+b \log \left (c x^n\right )\right )}{r}+\frac {e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {b n \int \frac {e \left (e x^r+4 d\right ) x^r+2 d^2 r \log (x)}{x}dx}{2 r}+d^2 \log (x) \left (a+b \log \left (c x^n\right )\right )+\frac {2 d e x^r \left (a+b \log \left (c x^n\right )\right )}{r}+\frac {e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r}\) |
\(\Big \downarrow \) 2010 |
\(\displaystyle -\frac {b n \int \left (4 d e x^{r-1}+e^2 x^{2 r-1}+\frac {2 d^2 r \log (x)}{x}\right )dx}{2 r}+d^2 \log (x) \left (a+b \log \left (c x^n\right )\right )+\frac {2 d e x^r \left (a+b \log \left (c x^n\right )\right )}{r}+\frac {e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle d^2 \log (x) \left (a+b \log \left (c x^n\right )\right )+\frac {2 d e x^r \left (a+b \log \left (c x^n\right )\right )}{r}+\frac {e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r}-\frac {b n \left (d^2 r \log ^2(x)+\frac {4 d e x^r}{r}+\frac {e^2 x^{2 r}}{2 r}\right )}{2 r}\) |
Input:
Int[((d + e*x^r)^2*(a + b*Log[c*x^n]))/x,x]
Output:
-1/2*(b*n*((4*d*e*x^r)/r + (e^2*x^(2*r))/(2*r) + d^2*r*Log[x]^2))/r + (2*d *e*x^r*(a + b*Log[c*x^n]))/r + (e^2*x^(2*r)*(a + b*Log[c*x^n]))/(2*r) + d^ 2*Log[x]*(a + b*Log[c*x^n])
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x] , x] /; FreeQ[{c, m}, x] && SumQ[u] && !LinearQ[u, x] && !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]
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.97 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.17
method | result | size |
parallelrisch | \(\frac {2 x^{2 r} \ln \left (c \,x^{n}\right ) b \,e^{2} r n +4 \ln \left (x \right ) a \,d^{2} n \,r^{2}+2 x^{2 r} a \,e^{2} n r -x^{2 r} b \,e^{2} n^{2}+8 x^{r} \ln \left (c \,x^{n}\right ) b d e r n +2 b \,d^{2} \ln \left (c \,x^{n}\right )^{2} r^{2}+8 x^{r} a d e n r -8 x^{r} b d e \,n^{2}}{4 r^{2} n}\) | \(122\) |
risch | \(\frac {b \left (2 d^{2} \ln \left (x \right ) r +e^{2} x^{2 r}+4 d e \,x^{r}\right ) \ln \left (x^{n}\right )}{2 r}+\frac {i \pi b \,e^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} x^{2 r}}{4 r}-\frac {i \pi \ln \left (x \right ) b \,d^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{2}-\frac {i \pi b d e \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right ) x^{r}}{r}+\frac {i \pi \ln \left (x \right ) b \,d^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i \pi b d e \operatorname {csgn}\left (i c \,x^{n}\right )^{3} x^{r}}{r}-\frac {i \pi b \,e^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3} x^{2 r}}{4 r}-\frac {i \pi \ln \left (x \right ) b \,d^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}+\frac {i \pi b \,e^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right ) x^{2 r}}{4 r}+\frac {i \pi b d e \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right ) x^{r}}{r}-\frac {i \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 r}}{4 r}+\frac {i \pi \ln \left (x \right ) b \,d^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{2}+\frac {i \pi b d e \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} x^{r}}{r}-\frac {b \,d^{2} n \ln \left (x \right )^{2}}{2}+\frac {\ln \left (c \right ) b \,e^{2} x^{2 r}}{2 r}+\ln \left (x \right ) \ln \left (c \right ) b \,d^{2}+\frac {a \,e^{2} x^{2 r}}{2 r}-\frac {b \,e^{2} n \,x^{2 r}}{4 r^{2}}+\frac {2 \ln \left (c \right ) b d e \,x^{r}}{r}+\ln \left (x \right ) a \,d^{2}+\frac {2 a d e \,x^{r}}{r}-\frac {2 b d e n \,x^{r}}{r^{2}}\) | \(487\) |
Input:
int((d+e*x^r)^2*(a+b*ln(c*x^n))/x,x,method=_RETURNVERBOSE)
Output:
1/4*(2*(x^r)^2*ln(c*x^n)*b*e^2*r*n+4*ln(x)*a*d^2*n*r^2+2*(x^r)^2*a*e^2*n*r -(x^r)^2*b*e^2*n^2+8*x^r*ln(c*x^n)*b*d*e*r*n+2*b*d^2*ln(c*x^n)^2*r^2+8*x^r *a*d*e*n*r-8*x^r*b*d*e*n^2)/r^2/n
Time = 0.08 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.11 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {2 \, b d^{2} n r^{2} \log \left (x\right )^{2} + {\left (2 \, b e^{2} n r \log \left (x\right ) + 2 \, b e^{2} r \log \left (c\right ) - b e^{2} n + 2 \, a e^{2} r\right )} x^{2 \, r} + 8 \, {\left (b d e n r \log \left (x\right ) + b d e r \log \left (c\right ) - b d e n + a d e r\right )} x^{r} + 4 \, {\left (b d^{2} r^{2} \log \left (c\right ) + a d^{2} r^{2}\right )} \log \left (x\right )}{4 \, r^{2}} \] Input:
integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x,x, algorithm="fricas")
Output:
1/4*(2*b*d^2*n*r^2*log(x)^2 + (2*b*e^2*n*r*log(x) + 2*b*e^2*r*log(c) - b*e ^2*n + 2*a*e^2*r)*x^(2*r) + 8*(b*d*e*n*r*log(x) + b*d*e*r*log(c) - b*d*e*n + a*d*e*r)*x^r + 4*(b*d^2*r^2*log(c) + a*d^2*r^2)*log(x))/r^2
Leaf count of result is larger than twice the leaf count of optimal. 216 vs. \(2 (104) = 208\).
Time = 2.22 (sec) , antiderivative size = 216, normalized size of antiderivative = 2.08 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\begin {cases} \left (a + b \log {\left (c \right )}\right ) \left (d + e\right )^{2} \log {\left (x \right )} & \text {for}\: n = 0 \wedge r = 0 \\\left (a + b \log {\left (c \right )}\right ) \left (d^{2} \log {\left (x \right )} + \frac {2 d e x^{r}}{r} + \frac {e^{2} x^{2 r}}{2 r}\right ) & \text {for}\: n = 0 \\\left (d + e\right )^{2} \left (\begin {cases} a \log {\left (x \right )} & \text {for}\: b = 0 \\- \left (- a - b \log {\left (c \right )}\right ) \log {\left (x \right )} & \text {for}\: n = 0 \\\frac {\left (- a - b \log {\left (c x^{n} \right )}\right )^{2}}{2 b n} & \text {otherwise} \end {cases}\right ) & \text {for}\: r = 0 \\\frac {a d^{2} \log {\left (c x^{n} \right )}}{n} + \frac {2 a d e x^{r}}{r} + \frac {a e^{2} x^{2 r}}{2 r} + \frac {b d^{2} \log {\left (c x^{n} \right )}^{2}}{2 n} - \frac {2 b d e n x^{r}}{r^{2}} + \frac {2 b d e x^{r} \log {\left (c x^{n} \right )}}{r} - \frac {b e^{2} n x^{2 r}}{4 r^{2}} + \frac {b e^{2} x^{2 r} \log {\left (c x^{n} \right )}}{2 r} & \text {otherwise} \end {cases} \] Input:
integrate((d+e*x**r)**2*(a+b*ln(c*x**n))/x,x)
Output:
Piecewise(((a + b*log(c))*(d + e)**2*log(x), Eq(n, 0) & Eq(r, 0)), ((a + b *log(c))*(d**2*log(x) + 2*d*e*x**r/r + e**2*x**(2*r)/(2*r)), Eq(n, 0)), (( d + e)**2*Piecewise((a*log(x), Eq(b, 0)), (-(-a - b*log(c))*log(x), Eq(n, 0)), ((-a - b*log(c*x**n))**2/(2*b*n), True)), Eq(r, 0)), (a*d**2*log(c*x* *n)/n + 2*a*d*e*x**r/r + a*e**2*x**(2*r)/(2*r) + b*d**2*log(c*x**n)**2/(2* n) - 2*b*d*e*n*x**r/r**2 + 2*b*d*e*x**r*log(c*x**n)/r - b*e**2*n*x**(2*r)/ (4*r**2) + b*e**2*x**(2*r)*log(c*x**n)/(2*r), True))
Time = 0.03 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.10 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {b e^{2} x^{2 \, r} \log \left (c x^{n}\right )}{2 \, r} + \frac {2 \, b d e x^{r} \log \left (c x^{n}\right )}{r} + \frac {b d^{2} \log \left (c x^{n}\right )^{2}}{2 \, n} + a d^{2} \log \left (x\right ) - \frac {b e^{2} n x^{2 \, r}}{4 \, r^{2}} + \frac {a e^{2} x^{2 \, r}}{2 \, r} - \frac {2 \, b d e n x^{r}}{r^{2}} + \frac {2 \, a d e x^{r}}{r} \] Input:
integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x,x, algorithm="maxima")
Output:
1/2*b*e^2*x^(2*r)*log(c*x^n)/r + 2*b*d*e*x^r*log(c*x^n)/r + 1/2*b*d^2*log( c*x^n)^2/n + a*d^2*log(x) - 1/4*b*e^2*n*x^(2*r)/r^2 + 1/2*a*e^2*x^(2*r)/r - 2*b*d*e*n*x^r/r^2 + 2*a*d*e*x^r/r
\[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\int { \frac {{\left (e x^{r} + d\right )}^{2} {\left (b \log \left (c x^{n}\right ) + a\right )}}{x} \,d x } \] Input:
integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x,x, algorithm="giac")
Output:
integrate((e*x^r + d)^2*(b*log(c*x^n) + a)/x, x)
Timed out. \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\int \frac {{\left (d+e\,x^r\right )}^2\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x} \,d x \] Input:
int(((d + e*x^r)^2*(a + b*log(c*x^n)))/x,x)
Output:
int(((d + e*x^r)^2*(a + b*log(c*x^n)))/x, x)
Time = 0.16 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.16 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {2 x^{2 r} \mathrm {log}\left (x^{n} c \right ) b \,e^{2} n r +2 x^{2 r} a \,e^{2} n r -x^{2 r} b \,e^{2} n^{2}+8 x^{r} \mathrm {log}\left (x^{n} c \right ) b d e n r +8 x^{r} a d e n r -8 x^{r} b d e \,n^{2}+2 \mathrm {log}\left (x^{n} c \right )^{2} b \,d^{2} r^{2}+4 \,\mathrm {log}\left (x \right ) a \,d^{2} n \,r^{2}}{4 n \,r^{2}} \] Input:
int((d+e*x^r)^2*(a+b*log(c*x^n))/x,x)
Output:
(2*x**(2*r)*log(x**n*c)*b*e**2*n*r + 2*x**(2*r)*a*e**2*n*r - x**(2*r)*b*e* *2*n**2 + 8*x**r*log(x**n*c)*b*d*e*n*r + 8*x**r*a*d*e*n*r - 8*x**r*b*d*e*n **2 + 2*log(x**n*c)**2*b*d**2*r**2 + 4*log(x)*a*d**2*n*r**2)/(4*n*r**2)