Integrand size = 21, antiderivative size = 70 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=-2 a b e n x+2 b^2 e n^2 x-2 b^2 e n x \log \left (c x^n\right )+e x \left (a+b \log \left (c x^n\right )\right )^2+\frac {d \left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \] Output:
-2*a*b*e*n*x+2*b^2*e*n^2*x-2*b^2*e*n*x*ln(c*x^n)+e*x*(a+b*ln(c*x^n))^2+1/3 *d*(a+b*ln(c*x^n))^3/b/n
Time = 0.03 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.84 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=e x \left (a+b \log \left (c x^n\right )\right )^2+\frac {d \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-2 b e n x \left (a-b n+b \log \left (c x^n\right )\right ) \] Input:
Integrate[((d + e*x)*(a + b*Log[c*x^n])^2)/x,x]
Output:
e*x*(a + b*Log[c*x^n])^2 + (d*(a + b*Log[c*x^n])^3)/(3*b*n) - 2*b*e*n*x*(a - b*n + b*Log[c*x^n])
Time = 0.35 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.90, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2788, 2733, 2009, 2739, 15}
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) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx\) |
\(\Big \downarrow \) 2788 |
\(\displaystyle d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x}dx+e \int \left (a+b \log \left (c x^n\right )\right )^2dx\) |
\(\Big \downarrow \) 2733 |
\(\displaystyle d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x}dx+e \left (x \left (a+b \log \left (c x^n\right )\right )^2-2 b n \int \left (a+b \log \left (c x^n\right )\right )dx\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x}dx+e \left (x \left (a+b \log \left (c x^n\right )\right )^2-2 b n \left (a x+b x \log \left (c x^n\right )-b n x\right )\right )\) |
\(\Big \downarrow \) 2739 |
\(\displaystyle \frac {d \int \left (a+b \log \left (c x^n\right )\right )^2d\left (a+b \log \left (c x^n\right )\right )}{b n}+e \left (x \left (a+b \log \left (c x^n\right )\right )^2-2 b n \left (a x+b x \log \left (c x^n\right )-b n x\right )\right )\) |
\(\Big \downarrow \) 15 |
\(\displaystyle \frac {d \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e \left (x \left (a+b \log \left (c x^n\right )\right )^2-2 b n \left (a x+b x \log \left (c x^n\right )-b n x\right )\right )\) |
Input:
Int[((d + e*x)*(a + b*Log[c*x^n])^2)/x,x]
Output:
(d*(a + b*Log[c*x^n])^3)/(3*b*n) + e*(x*(a + b*Log[c*x^n])^2 - 2*b*n*(a*x - b*n*x + b*x*Log[c*x^n]))
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b *Log[c*x^n])^p, x] - Simp[b*n*p Int[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Simp[1/( b*n) Subst[Int[x^p, x], x, a + b*Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p} , x]
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.)) /(x_), x_Symbol] :> Simp[d Int[(d + e*x)^(q - 1)*((a + b*Log[c*x^n])^p/x) , x], x] + Simp[e Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /; F reeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]
Time = 0.37 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.63
method | result | size |
parallelrisch | \(\frac {3 x \ln \left (c \,x^{n}\right )^{2} b^{2} e n -6 x \ln \left (c \,x^{n}\right ) b^{2} e \,n^{2}+6 x \,b^{2} e \,n^{3}+6 x \ln \left (c \,x^{n}\right ) a b e n -6 x a b e \,n^{2}+b^{2} d \ln \left (c \,x^{n}\right )^{3}+3 \ln \left (x \right ) a^{2} d n +3 x \,a^{2} e n +3 d a b \ln \left (c \,x^{n}\right )^{2}}{3 n}\) | \(114\) |
risch | \(\text {Expression too large to display}\) | \(1555\) |
Input:
int((e*x+d)*(a+b*ln(c*x^n))^2/x,x,method=_RETURNVERBOSE)
Output:
1/3*(3*x*ln(c*x^n)^2*b^2*e*n-6*x*ln(c*x^n)*b^2*e*n^2+6*x*b^2*e*n^3+6*x*ln( c*x^n)*a*b*e*n-6*x*a*b*e*n^2+b^2*d*ln(c*x^n)^3+3*ln(x)*a^2*d*n+3*x*a^2*e*n +3*d*a*b*ln(c*x^n)^2)/n
Leaf count of result is larger than twice the leaf count of optimal. 144 vs. \(2 (68) = 136\).
Time = 0.07 (sec) , antiderivative size = 144, normalized size of antiderivative = 2.06 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {1}{3} \, b^{2} d n^{2} \log \left (x\right )^{3} + b^{2} e x \log \left (c\right )^{2} - 2 \, {\left (b^{2} e n - a b e\right )} x \log \left (c\right ) + {\left (b^{2} e n^{2} x + b^{2} d n \log \left (c\right ) + a b d n\right )} \log \left (x\right )^{2} + {\left (2 \, b^{2} e n^{2} - 2 \, a b e n + a^{2} e\right )} x + {\left (b^{2} d \log \left (c\right )^{2} + a^{2} d - 2 \, {\left (b^{2} e n^{2} - a b e n\right )} x + 2 \, {\left (b^{2} e n x + a b d\right )} \log \left (c\right )\right )} \log \left (x\right ) \] Input:
integrate((e*x+d)*(a+b*log(c*x^n))^2/x,x, algorithm="fricas")
Output:
1/3*b^2*d*n^2*log(x)^3 + b^2*e*x*log(c)^2 - 2*(b^2*e*n - a*b*e)*x*log(c) + (b^2*e*n^2*x + b^2*d*n*log(c) + a*b*d*n)*log(x)^2 + (2*b^2*e*n^2 - 2*a*b* e*n + a^2*e)*x + (b^2*d*log(c)^2 + a^2*d - 2*(b^2*e*n^2 - a*b*e*n)*x + 2*( b^2*e*n*x + a*b*d)*log(c))*log(x)
Time = 0.28 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.97 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\begin {cases} \frac {a^{2} d \log {\left (c x^{n} \right )}}{n} + a^{2} e x + \frac {a b d \log {\left (c x^{n} \right )}^{2}}{n} - 2 a b e n x + 2 a b e x \log {\left (c x^{n} \right )} + \frac {b^{2} d \log {\left (c x^{n} \right )}^{3}}{3 n} + 2 b^{2} e n^{2} x - 2 b^{2} e n x \log {\left (c x^{n} \right )} + b^{2} e x \log {\left (c x^{n} \right )}^{2} & \text {for}\: n \neq 0 \\\left (a + b \log {\left (c \right )}\right )^{2} \left (d \log {\left (x \right )} + e x\right ) & \text {otherwise} \end {cases} \] Input:
integrate((e*x+d)*(a+b*ln(c*x**n))**2/x,x)
Output:
Piecewise((a**2*d*log(c*x**n)/n + a**2*e*x + a*b*d*log(c*x**n)**2/n - 2*a* b*e*n*x + 2*a*b*e*x*log(c*x**n) + b**2*d*log(c*x**n)**3/(3*n) + 2*b**2*e*n **2*x - 2*b**2*e*n*x*log(c*x**n) + b**2*e*x*log(c*x**n)**2, Ne(n, 0)), ((a + b*log(c))**2*(d*log(x) + e*x), True))
Time = 0.04 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.44 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=b^{2} e x \log \left (c x^{n}\right )^{2} - 2 \, a b e n x + 2 \, a b e x \log \left (c x^{n}\right ) + \frac {b^{2} d \log \left (c x^{n}\right )^{3}}{3 \, n} + 2 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} e + a^{2} e x + \frac {a b d \log \left (c x^{n}\right )^{2}}{n} + a^{2} d \log \left (x\right ) \] Input:
integrate((e*x+d)*(a+b*log(c*x^n))^2/x,x, algorithm="maxima")
Output:
b^2*e*x*log(c*x^n)^2 - 2*a*b*e*n*x + 2*a*b*e*x*log(c*x^n) + 1/3*b^2*d*log( c*x^n)^3/n + 2*(n^2*x - n*x*log(c*x^n))*b^2*e + a^2*e*x + a*b*d*log(c*x^n) ^2/n + a^2*d*log(x)
Leaf count of result is larger than twice the leaf count of optimal. 144 vs. \(2 (68) = 136\).
Time = 0.13 (sec) , antiderivative size = 144, normalized size of antiderivative = 2.06 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {1}{3} \, b^{2} d n^{2} \log \left (x\right )^{3} - 2 \, {\left (b^{2} e n^{2} - b^{2} e n \log \left (c\right ) - a b e n\right )} x \log \left (x\right ) + {\left (b^{2} e n^{2} x + b^{2} d n \log \left (c\right ) + a b d n\right )} \log \left (x\right )^{2} + {\left (2 \, b^{2} e n^{2} - 2 \, b^{2} e n \log \left (c\right ) + b^{2} e \log \left (c\right )^{2} - 2 \, a b e n + 2 \, a b e \log \left (c\right ) + a^{2} e\right )} x + {\left (b^{2} d \log \left (c\right )^{2} + 2 \, a b d \log \left (c\right ) + a^{2} d\right )} \log \left (x\right ) \] Input:
integrate((e*x+d)*(a+b*log(c*x^n))^2/x,x, algorithm="giac")
Output:
1/3*b^2*d*n^2*log(x)^3 - 2*(b^2*e*n^2 - b^2*e*n*log(c) - a*b*e*n)*x*log(x) + (b^2*e*n^2*x + b^2*d*n*log(c) + a*b*d*n)*log(x)^2 + (2*b^2*e*n^2 - 2*b^ 2*e*n*log(c) + b^2*e*log(c)^2 - 2*a*b*e*n + 2*a*b*e*log(c) + a^2*e)*x + (b ^2*d*log(c)^2 + 2*a*b*d*log(c) + a^2*d)*log(x)
Time = 27.71 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.21 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx={\ln \left (c\,x^n\right )}^2\,\left (b^2\,e\,x+\frac {a\,b\,d}{n}\right )+a^2\,d\,\ln \left (x\right )+e\,x\,\left (a^2-2\,a\,b\,n+2\,b^2\,n^2\right )+\frac {b^2\,d\,{\ln \left (c\,x^n\right )}^3}{3\,n}+2\,b\,e\,x\,\ln \left (c\,x^n\right )\,\left (a-b\,n\right ) \] Input:
int(((a + b*log(c*x^n))^2*(d + e*x))/x,x)
Output:
log(c*x^n)^2*(b^2*e*x + (a*b*d)/n) + a^2*d*log(x) + e*x*(a^2 + 2*b^2*n^2 - 2*a*b*n) + (b^2*d*log(c*x^n)^3)/(3*n) + 2*b*e*x*log(c*x^n)*(a - b*n)
Time = 0.16 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.61 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {\mathrm {log}\left (x^{n} c \right )^{3} b^{2} d +3 \mathrm {log}\left (x^{n} c \right )^{2} a b d +3 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} e n x +6 \,\mathrm {log}\left (x^{n} c \right ) a b e n x -6 \,\mathrm {log}\left (x^{n} c \right ) b^{2} e \,n^{2} x +3 \,\mathrm {log}\left (x \right ) a^{2} d n +3 a^{2} e n x -6 a b e \,n^{2} x +6 b^{2} e \,n^{3} x}{3 n} \] Input:
int((e*x+d)*(a+b*log(c*x^n))^2/x,x)
Output:
(log(x**n*c)**3*b**2*d + 3*log(x**n*c)**2*a*b*d + 3*log(x**n*c)**2*b**2*e* n*x + 6*log(x**n*c)*a*b*e*n*x - 6*log(x**n*c)*b**2*e*n**2*x + 3*log(x)*a** 2*d*n + 3*a**2*e*n*x - 6*a*b*e*n**2*x + 6*b**2*e*n**3*x)/(3*n)