Integrand size = 25, antiderivative size = 161 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {4 b^2 d e n^2 x^r}{r^3}+\frac {b^2 e^2 n^2 x^{2 r}}{4 r^3}-\frac {4 b d e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}-\frac {b e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}+\frac {2 d e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}+\frac {e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \] Output:
4*b^2*d*e*n^2*x^r/r^3+1/4*b^2*e^2*n^2*x^(2*r)/r^3-4*b*d*e*n*x^r*(a+b*ln(c* x^n))/r^2-1/2*b*e^2*n*x^(2*r)*(a+b*ln(c*x^n))/r^2+2*d*e*x^r*(a+b*ln(c*x^n) )^2/r+1/2*e^2*x^(2*r)*(a+b*ln(c*x^n))^2/r+1/3*d^2*(a+b*ln(c*x^n))^3/b/n
Time = 0.33 (sec) , antiderivative size = 179, 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 )^2}{x} \, dx=\frac {3 e n x^r \left (2 a^2 r^2 \left (4 d+e x^r\right )-2 a b n r \left (8 d+e x^r\right )+b^2 n^2 \left (16 d+e x^r\right )\right )+12 a^2 d^2 n r^3 \log (x)-6 b e n r x^r \left (-2 a r \left (4 d+e x^r\right )+b n \left (8 d+e x^r\right )\right ) \log \left (c x^n\right )+6 b r^2 \left (2 a d^2 r+b e n x^r \left (4 d+e x^r\right )\right ) \log ^2\left (c x^n\right )+4 b^2 d^2 r^3 \log ^3\left (c x^n\right )}{12 n r^3} \] Input:
Integrate[((d + e*x^r)^2*(a + b*Log[c*x^n])^2)/x,x]
Output:
(3*e*n*x^r*(2*a^2*r^2*(4*d + e*x^r) - 2*a*b*n*r*(8*d + e*x^r) + b^2*n^2*(1 6*d + e*x^r)) + 12*a^2*d^2*n*r^3*Log[x] - 6*b*e*n*r*x^r*(-2*a*r*(4*d + e*x ^r) + b*n*(8*d + e*x^r))*Log[c*x^n] + 6*b*r^2*(2*a*d^2*r + b*e*n*x^r*(4*d + e*x^r))*Log[c*x^n]^2 + 4*b^2*d^2*r^3*Log[c*x^n]^3)/(12*n*r^3)
Time = 0.48 (sec) , antiderivative size = 161, 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.080, Rules used = {2795, 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 )^2}{x} \, dx\) |
\(\Big \downarrow \) 2795 |
\(\displaystyle \int \left (\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+2 d e x^{r-1} \left (a+b \log \left (c x^n\right )\right )^2+e^2 x^{2 r-1} \left (a+b \log \left (c x^n\right )\right )^2\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac {4 b d e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}+\frac {2 d e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}-\frac {b e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}+\frac {e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac {4 b^2 d e n^2 x^r}{r^3}+\frac {b^2 e^2 n^2 x^{2 r}}{4 r^3}\) |
Input:
Int[((d + e*x^r)^2*(a + b*Log[c*x^n])^2)/x,x]
Output:
(4*b^2*d*e*n^2*x^r)/r^3 + (b^2*e^2*n^2*x^(2*r))/(4*r^3) - (4*b*d*e*n*x^r*( a + b*Log[c*x^n]))/r^2 - (b*e^2*n*x^(2*r)*(a + b*Log[c*x^n]))/(2*r^2) + (2 *d*e*x^r*(a + b*Log[c*x^n])^2)/r + (e^2*x^(2*r)*(a + b*Log[c*x^n])^2)/(2*r ) + (d^2*(a + b*Log[c*x^n])^3)/(3*b*n)
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[ c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b , c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0 ] && IntegerQ[m] && IntegerQ[r]))
Time = 3.27 (sec) , antiderivative size = 281, normalized size of antiderivative = 1.75
method | result | size |
parallelrisch | \(\frac {6 x^{2 r} \ln \left (c \,x^{n}\right )^{2} b^{2} e^{2} r^{2} n +12 x^{2 r} \ln \left (c \,x^{n}\right ) a b \,e^{2} n \,r^{2}-6 x^{2 r} \ln \left (c \,x^{n}\right ) b^{2} e^{2} n^{2} r +24 x^{r} \ln \left (c \,x^{n}\right )^{2} b^{2} d e \,r^{2} n +4 b^{2} d^{2} \ln \left (c \,x^{n}\right )^{3} r^{3}+12 \ln \left (x \right ) a^{2} d^{2} n \,r^{3}+6 x^{2 r} a^{2} e^{2} n \,r^{2}-6 x^{2 r} a b \,e^{2} n^{2} r +3 x^{2 r} b^{2} e^{2} n^{3}+48 x^{r} \ln \left (c \,x^{n}\right ) a b d e n \,r^{2}-48 x^{r} \ln \left (c \,x^{n}\right ) b^{2} d e \,n^{2} r +12 a b \,d^{2} \ln \left (c \,x^{n}\right )^{2} r^{3}+24 x^{r} a^{2} d e n \,r^{2}-48 x^{r} a b d e \,n^{2} r +48 x^{r} b^{2} d e \,n^{3}}{12 r^{3} n}\) | \(281\) |
risch | \(\text {Expression too large to display}\) | \(2844\) |
Input:
int((d+e*x^r)^2*(a+b*ln(c*x^n))^2/x,x,method=_RETURNVERBOSE)
Output:
1/12*(6*(x^r)^2*ln(c*x^n)^2*b^2*e^2*r^2*n+12*(x^r)^2*ln(c*x^n)*a*b*e^2*n*r ^2-6*(x^r)^2*ln(c*x^n)*b^2*e^2*n^2*r+24*x^r*ln(c*x^n)^2*b^2*d*e*r^2*n+4*b^ 2*d^2*ln(c*x^n)^3*r^3+12*ln(x)*a^2*d^2*n*r^3+6*(x^r)^2*a^2*e^2*n*r^2-6*(x^ r)^2*a*b*e^2*n^2*r+3*(x^r)^2*b^2*e^2*n^3+48*x^r*ln(c*x^n)*a*b*d*e*n*r^2-48 *x^r*ln(c*x^n)*b^2*d*e*n^2*r+12*a*b*d^2*ln(c*x^n)^2*r^3+24*x^r*a^2*d*e*n*r ^2-48*x^r*a*b*d*e*n^2*r+48*x^r*b^2*d*e*n^3)/r^3/n
Leaf count of result is larger than twice the leaf count of optimal. 353 vs. \(2 (153) = 306\).
Time = 0.08 (sec) , antiderivative size = 353, normalized size of antiderivative = 2.19 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {4 \, b^{2} d^{2} n^{2} r^{3} \log \left (x\right )^{3} + 12 \, {\left (b^{2} d^{2} n r^{3} \log \left (c\right ) + a b d^{2} n r^{3}\right )} \log \left (x\right )^{2} + 3 \, {\left (2 \, b^{2} e^{2} n^{2} r^{2} \log \left (x\right )^{2} + 2 \, b^{2} e^{2} r^{2} \log \left (c\right )^{2} + b^{2} e^{2} n^{2} - 2 \, a b e^{2} n r + 2 \, a^{2} e^{2} r^{2} - 2 \, {\left (b^{2} e^{2} n r - 2 \, a b e^{2} r^{2}\right )} \log \left (c\right ) + 2 \, {\left (2 \, b^{2} e^{2} n r^{2} \log \left (c\right ) - b^{2} e^{2} n^{2} r + 2 \, a b e^{2} n r^{2}\right )} \log \left (x\right )\right )} x^{2 \, r} + 24 \, {\left (b^{2} d e n^{2} r^{2} \log \left (x\right )^{2} + b^{2} d e r^{2} \log \left (c\right )^{2} + 2 \, b^{2} d e n^{2} - 2 \, a b d e n r + a^{2} d e r^{2} - 2 \, {\left (b^{2} d e n r - a b d e r^{2}\right )} \log \left (c\right ) + 2 \, {\left (b^{2} d e n r^{2} \log \left (c\right ) - b^{2} d e n^{2} r + a b d e n r^{2}\right )} \log \left (x\right )\right )} x^{r} + 12 \, {\left (b^{2} d^{2} r^{3} \log \left (c\right )^{2} + 2 \, a b d^{2} r^{3} \log \left (c\right ) + a^{2} d^{2} r^{3}\right )} \log \left (x\right )}{12 \, r^{3}} \] Input:
integrate((d+e*x^r)^2*(a+b*log(c*x^n))^2/x,x, algorithm="fricas")
Output:
1/12*(4*b^2*d^2*n^2*r^3*log(x)^3 + 12*(b^2*d^2*n*r^3*log(c) + a*b*d^2*n*r^ 3)*log(x)^2 + 3*(2*b^2*e^2*n^2*r^2*log(x)^2 + 2*b^2*e^2*r^2*log(c)^2 + b^2 *e^2*n^2 - 2*a*b*e^2*n*r + 2*a^2*e^2*r^2 - 2*(b^2*e^2*n*r - 2*a*b*e^2*r^2) *log(c) + 2*(2*b^2*e^2*n*r^2*log(c) - b^2*e^2*n^2*r + 2*a*b*e^2*n*r^2)*log (x))*x^(2*r) + 24*(b^2*d*e*n^2*r^2*log(x)^2 + b^2*d*e*r^2*log(c)^2 + 2*b^2 *d*e*n^2 - 2*a*b*d*e*n*r + a^2*d*e*r^2 - 2*(b^2*d*e*n*r - a*b*d*e*r^2)*log (c) + 2*(b^2*d*e*n*r^2*log(c) - b^2*d*e*n^2*r + a*b*d*e*n*r^2)*log(x))*x^r + 12*(b^2*d^2*r^3*log(c)^2 + 2*a*b*d^2*r^3*log(c) + a^2*d^2*r^3)*log(x))/ r^3
Leaf count of result is larger than twice the leaf count of optimal. 408 vs. \(2 (156) = 312\).
Time = 6.74 (sec) , antiderivative size = 408, normalized size of antiderivative = 2.53 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\begin {cases} \left (a + b \log {\left (c \right )}\right )^{2} \left (d + e\right )^{2} \log {\left (x \right )} & \text {for}\: n = 0 \wedge r = 0 \\\left (a + b \log {\left (c \right )}\right )^{2} \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} \frac {a^{2} \log {\left (c x^{n} \right )} + a b \log {\left (c x^{n} \right )}^{2} + \frac {b^{2} \log {\left (c x^{n} \right )}^{3}}{3}}{n} & \text {for}\: n \neq 0 \\\left (a^{2} + 2 a b \log {\left (c \right )} + b^{2} \log {\left (c \right )}^{2}\right ) \log {\left (x \right )} & \text {otherwise} \end {cases}\right ) & \text {for}\: r = 0 \\\frac {a^{2} d^{2} \log {\left (c x^{n} \right )}}{n} + \frac {2 a^{2} d e x^{r}}{r} + \frac {a^{2} e^{2} x^{2 r}}{2 r} + \frac {a b d^{2} \log {\left (c x^{n} \right )}^{2}}{n} - \frac {4 a b d e n x^{r}}{r^{2}} + \frac {4 a b d e x^{r} \log {\left (c x^{n} \right )}}{r} - \frac {a b e^{2} n x^{2 r}}{2 r^{2}} + \frac {a b e^{2} x^{2 r} \log {\left (c x^{n} \right )}}{r} + \frac {b^{2} d^{2} \log {\left (c x^{n} \right )}^{3}}{3 n} + \frac {4 b^{2} d e n^{2} x^{r}}{r^{3}} - \frac {4 b^{2} d e n x^{r} \log {\left (c x^{n} \right )}}{r^{2}} + \frac {2 b^{2} d e x^{r} \log {\left (c x^{n} \right )}^{2}}{r} + \frac {b^{2} e^{2} n^{2} x^{2 r}}{4 r^{3}} - \frac {b^{2} e^{2} n x^{2 r} \log {\left (c x^{n} \right )}}{2 r^{2}} + \frac {b^{2} e^{2} x^{2 r} \log {\left (c x^{n} \right )}^{2}}{2 r} & \text {otherwise} \end {cases} \] Input:
integrate((d+e*x**r)**2*(a+b*ln(c*x**n))**2/x,x)
Output:
Piecewise(((a + b*log(c))**2*(d + e)**2*log(x), Eq(n, 0) & Eq(r, 0)), ((a + b*log(c))**2*(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**2*log(c*x**n) + a*b*log(c*x**n)**2 + b**2*l og(c*x**n)**3/3)/n, Ne(n, 0)), ((a**2 + 2*a*b*log(c) + b**2*log(c)**2)*log (x), True)), Eq(r, 0)), (a**2*d**2*log(c*x**n)/n + 2*a**2*d*e*x**r/r + a** 2*e**2*x**(2*r)/(2*r) + a*b*d**2*log(c*x**n)**2/n - 4*a*b*d*e*n*x**r/r**2 + 4*a*b*d*e*x**r*log(c*x**n)/r - a*b*e**2*n*x**(2*r)/(2*r**2) + a*b*e**2*x **(2*r)*log(c*x**n)/r + b**2*d**2*log(c*x**n)**3/(3*n) + 4*b**2*d*e*n**2*x **r/r**3 - 4*b**2*d*e*n*x**r*log(c*x**n)/r**2 + 2*b**2*d*e*x**r*log(c*x**n )**2/r + b**2*e**2*n**2*x**(2*r)/(4*r**3) - b**2*e**2*n*x**(2*r)*log(c*x** n)/(2*r**2) + b**2*e**2*x**(2*r)*log(c*x**n)**2/(2*r), True))
Time = 0.04 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.61 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {b^{2} e^{2} x^{2 \, r} \log \left (c x^{n}\right )^{2}}{2 \, r} + \frac {2 \, b^{2} d e x^{r} \log \left (c x^{n}\right )^{2}}{r} + \frac {b^{2} d^{2} \log \left (c x^{n}\right )^{3}}{3 \, n} - \frac {1}{4} \, b^{2} e^{2} {\left (\frac {2 \, n x^{2 \, r} \log \left (c x^{n}\right )}{r^{2}} - \frac {n^{2} x^{2 \, r}}{r^{3}}\right )} - 4 \, b^{2} d e {\left (\frac {n x^{r} \log \left (c x^{n}\right )}{r^{2}} - \frac {n^{2} x^{r}}{r^{3}}\right )} + \frac {a b e^{2} x^{2 \, r} \log \left (c x^{n}\right )}{r} + \frac {4 \, a b d e x^{r} \log \left (c x^{n}\right )}{r} + \frac {a b d^{2} \log \left (c x^{n}\right )^{2}}{n} + a^{2} d^{2} \log \left (x\right ) - \frac {a b e^{2} n x^{2 \, r}}{2 \, r^{2}} + \frac {a^{2} e^{2} x^{2 \, r}}{2 \, r} - \frac {4 \, a b d e n x^{r}}{r^{2}} + \frac {2 \, a^{2} d e x^{r}}{r} \] Input:
integrate((d+e*x^r)^2*(a+b*log(c*x^n))^2/x,x, algorithm="maxima")
Output:
1/2*b^2*e^2*x^(2*r)*log(c*x^n)^2/r + 2*b^2*d*e*x^r*log(c*x^n)^2/r + 1/3*b^ 2*d^2*log(c*x^n)^3/n - 1/4*b^2*e^2*(2*n*x^(2*r)*log(c*x^n)/r^2 - n^2*x^(2* r)/r^3) - 4*b^2*d*e*(n*x^r*log(c*x^n)/r^2 - n^2*x^r/r^3) + a*b*e^2*x^(2*r) *log(c*x^n)/r + 4*a*b*d*e*x^r*log(c*x^n)/r + a*b*d^2*log(c*x^n)^2/n + a^2* d^2*log(x) - 1/2*a*b*e^2*n*x^(2*r)/r^2 + 1/2*a^2*e^2*x^(2*r)/r - 4*a*b*d*e *n*x^r/r^2 + 2*a^2*d*e*x^r/r
\[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\int { \frac {{\left (e x^{r} + d\right )}^{2} {\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{x} \,d x } \] Input:
integrate((d+e*x^r)^2*(a+b*log(c*x^n))^2/x,x, algorithm="giac")
Output:
integrate((e*x^r + d)^2*(b*log(c*x^n) + a)^2/x, x)
Timed out. \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\int \frac {{\left (d+e\,x^r\right )}^2\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x} \,d x \] Input:
int(((d + e*x^r)^2*(a + b*log(c*x^n))^2)/x,x)
Output:
int(((d + e*x^r)^2*(a + b*log(c*x^n))^2)/x, x)
Time = 0.16 (sec) , antiderivative size = 280, normalized size of antiderivative = 1.74 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {6 x^{2 r} \mathrm {log}\left (x^{n} c \right )^{2} b^{2} e^{2} n \,r^{2}+12 x^{2 r} \mathrm {log}\left (x^{n} c \right ) a b \,e^{2} n \,r^{2}-6 x^{2 r} \mathrm {log}\left (x^{n} c \right ) b^{2} e^{2} n^{2} r +6 x^{2 r} a^{2} e^{2} n \,r^{2}-6 x^{2 r} a b \,e^{2} n^{2} r +3 x^{2 r} b^{2} e^{2} n^{3}+24 x^{r} \mathrm {log}\left (x^{n} c \right )^{2} b^{2} d e n \,r^{2}+48 x^{r} \mathrm {log}\left (x^{n} c \right ) a b d e n \,r^{2}-48 x^{r} \mathrm {log}\left (x^{n} c \right ) b^{2} d e \,n^{2} r +24 x^{r} a^{2} d e n \,r^{2}-48 x^{r} a b d e \,n^{2} r +48 x^{r} b^{2} d e \,n^{3}+4 \mathrm {log}\left (x^{n} c \right )^{3} b^{2} d^{2} r^{3}+12 \mathrm {log}\left (x^{n} c \right )^{2} a b \,d^{2} r^{3}+12 \,\mathrm {log}\left (x \right ) a^{2} d^{2} n \,r^{3}}{12 n \,r^{3}} \] Input:
int((d+e*x^r)^2*(a+b*log(c*x^n))^2/x,x)
Output:
(6*x**(2*r)*log(x**n*c)**2*b**2*e**2*n*r**2 + 12*x**(2*r)*log(x**n*c)*a*b* e**2*n*r**2 - 6*x**(2*r)*log(x**n*c)*b**2*e**2*n**2*r + 6*x**(2*r)*a**2*e* *2*n*r**2 - 6*x**(2*r)*a*b*e**2*n**2*r + 3*x**(2*r)*b**2*e**2*n**3 + 24*x* *r*log(x**n*c)**2*b**2*d*e*n*r**2 + 48*x**r*log(x**n*c)*a*b*d*e*n*r**2 - 4 8*x**r*log(x**n*c)*b**2*d*e*n**2*r + 24*x**r*a**2*d*e*n*r**2 - 48*x**r*a*b *d*e*n**2*r + 48*x**r*b**2*d*e*n**3 + 4*log(x**n*c)**3*b**2*d**2*r**3 + 12 *log(x**n*c)**2*a*b*d**2*r**3 + 12*log(x)*a**2*d**2*n*r**3)/(12*n*r**3)