### 3.23 $$\int (\frac{a}{x^2}+\frac{2 b n \log (c x^n)}{x^3}) (a x^2+b x \log ^2(c x^n))^2 \, dx$$

Optimal. Leaf size=20 $\frac{1}{3} \left (a x+b \log ^2\left (c x^n\right )\right )^3$

[Out]

(a*x + b*Log[c*x^n]^2)^3/3

________________________________________________________________________________________

Rubi [A]  time = 0.151753, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 39, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.051, Rules used = {2561, 2544} $\frac{1}{3} \left (a x+b \log ^2\left (c x^n\right )\right )^3$

Antiderivative was successfully veriﬁed.

[In]

Int[(a/x^2 + (2*b*n*Log[c*x^n])/x^3)*(a*x^2 + b*x*Log[c*x^n]^2)^2,x]

[Out]

(a*x + b*Log[c*x^n]^2)^3/3

Rule 2561

Int[(u_.)*((a_.)*(x_)^(m_.) + Log[(c_.)*(x_)^(n_.)]^(q_.)*(b_.)*(x_)^(r_.))^(p_.), x_Symbol] :> Int[u*x^(p*r)*
(a*x^(m - r) + b*Log[c*x^n]^q)^p, x] /; FreeQ[{a, b, c, m, n, p, q, r}, x] && IntegerQ[p]

Rule 2544

Int[((Log[(c_.)*(x_)^(n_.)]^(q_)*(b_.) + (a_.)*(x_)^(m_.))^(p_.)*(Log[(c_.)*(x_)^(n_.)]^(r_.)*(e_.) + (d_.)*(x
_)^(m_.)))/(x_), x_Symbol] :> Simp[(e*(a*x^m + b*Log[c*x^n]^q)^(p + 1))/(b*n*q*(p + 1)), x] /; FreeQ[{a, b, c,
d, e, m, n, p, q, r}, x] && EqQ[r, q - 1] && NeQ[p, -1] && EqQ[a*e*m - b*d*n*q, 0]

Rubi steps

\begin{align*} \int \left (\frac{a}{x^2}+\frac{2 b n \log \left (c x^n\right )}{x^3}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2 \, dx &=\int \frac{\left (a x+2 b n \log \left (c x^n\right )\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2}{x^3} \, dx\\ &=\int \frac{\left (a x+2 b n \log \left (c x^n\right )\right ) \left (a x+b \log ^2\left (c x^n\right )\right )^2}{x} \, dx\\ &=\frac{1}{3} \left (a x+b \log ^2\left (c x^n\right )\right )^3\\ \end{align*}

Mathematica [A]  time = 0.0175154, size = 20, normalized size = 1. $\frac{1}{3} \left (a x+b \log ^2\left (c x^n\right )\right )^3$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(a/x^2 + (2*b*n*Log[c*x^n])/x^3)*(a*x^2 + b*x*Log[c*x^n]^2)^2,x]

[Out]

(a*x + b*Log[c*x^n]^2)^3/3

________________________________________________________________________________________

Maple [C]  time = 1.223, size = 16321, normalized size = 816.1 \begin{align*} \text{output too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((a/x^2+2*b*n*ln(c*x^n)/x^3)*(a*x^2+b*x*ln(c*x^n)^2)^2,x)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [B]  time = 1.02688, size = 285, normalized size = 14.25 \begin{align*} \frac{1}{3} \, b^{3} \log \left (c x^{n}\right )^{6} + 4 \, a b^{2} n x \log \left (c x^{n}\right )^{3} + a b^{2} x \log \left (c x^{n}\right )^{4} - \frac{1}{2} \, a^{2} b n^{2} x^{2} + a^{2} b n x^{2} \log \left (c x^{n}\right ) + a^{2} b x^{2} \log \left (c x^{n}\right )^{2} + \frac{1}{3} \, a^{3} x^{3} - 12 \,{\left (n x \log \left (c x^{n}\right )^{2} + 2 \,{\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} n\right )} a b^{2} n + \frac{1}{2} \,{\left (n^{2} x^{2} - 2 \, n x^{2} \log \left (c x^{n}\right )\right )} a^{2} b - 4 \,{\left (n x \log \left (c x^{n}\right )^{3} - 3 \,{\left (n x \log \left (c x^{n}\right )^{2} + 2 \,{\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} n\right )} n\right )} a b^{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((a/x^2+2*b*n*log(c*x^n)/x^3)*(a*x^2+b*x*log(c*x^n)^2)^2,x, algorithm="maxima")

[Out]

1/3*b^3*log(c*x^n)^6 + 4*a*b^2*n*x*log(c*x^n)^3 + a*b^2*x*log(c*x^n)^4 - 1/2*a^2*b*n^2*x^2 + a^2*b*n*x^2*log(c
*x^n) + a^2*b*x^2*log(c*x^n)^2 + 1/3*a^3*x^3 - 12*(n*x*log(c*x^n)^2 + 2*(n^2*x - n*x*log(c*x^n))*n)*a*b^2*n +
1/2*(n^2*x^2 - 2*n*x^2*log(c*x^n))*a^2*b - 4*(n*x*log(c*x^n)^3 - 3*(n*x*log(c*x^n)^2 + 2*(n^2*x - n*x*log(c*x^
n))*n)*n)*a*b^2

________________________________________________________________________________________

Fricas [B]  time = 1.84464, size = 478, normalized size = 23.9 \begin{align*} \frac{1}{3} \, b^{3} n^{6} \log \left (x\right )^{6} + 2 \, b^{3} n^{5} \log \left (c\right ) \log \left (x\right )^{5} + a b^{2} x \log \left (c\right )^{4} + a^{2} b x^{2} \log \left (c\right )^{2} + \frac{1}{3} \, a^{3} x^{3} +{\left (5 \, b^{3} n^{4} \log \left (c\right )^{2} + a b^{2} n^{4} x\right )} \log \left (x\right )^{4} + \frac{4}{3} \,{\left (5 \, b^{3} n^{3} \log \left (c\right )^{3} + 3 \, a b^{2} n^{3} x \log \left (c\right )\right )} \log \left (x\right )^{3} +{\left (5 \, b^{3} n^{2} \log \left (c\right )^{4} + 6 \, a b^{2} n^{2} x \log \left (c\right )^{2} + a^{2} b n^{2} x^{2}\right )} \log \left (x\right )^{2} + 2 \,{\left (b^{3} n \log \left (c\right )^{5} + 2 \, a b^{2} n x \log \left (c\right )^{3} + a^{2} b n x^{2} \log \left (c\right )\right )} \log \left (x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((a/x^2+2*b*n*log(c*x^n)/x^3)*(a*x^2+b*x*log(c*x^n)^2)^2,x, algorithm="fricas")

[Out]

1/3*b^3*n^6*log(x)^6 + 2*b^3*n^5*log(c)*log(x)^5 + a*b^2*x*log(c)^4 + a^2*b*x^2*log(c)^2 + 1/3*a^3*x^3 + (5*b^
3*n^4*log(c)^2 + a*b^2*n^4*x)*log(x)^4 + 4/3*(5*b^3*n^3*log(c)^3 + 3*a*b^2*n^3*x*log(c))*log(x)^3 + (5*b^3*n^2
*log(c)^4 + 6*a*b^2*n^2*x*log(c)^2 + a^2*b*n^2*x^2)*log(x)^2 + 2*(b^3*n*log(c)^5 + 2*a*b^2*n*x*log(c)^3 + a^2*
b*n*x^2*log(c))*log(x)

________________________________________________________________________________________

Sympy [A]  time = 13.4414, size = 221, normalized size = 11.05 \begin{align*} \frac{a^{3} x^{3}}{3} + a^{2} b n^{2} x^{2} \log{\left (x \right )}^{2} - a^{2} b n^{2} x^{2} \log{\left (x \right )} + 2 a^{2} b n x^{2} \log{\left (c \right )} \log{\left (x \right )} - a^{2} b n x^{2} \log{\left (c \right )} + a^{2} b n x^{2} \log{\left (c x^{n} \right )} + a^{2} b x^{2} \log{\left (c \right )}^{2} + a b^{2} n^{4} x \log{\left (x \right )}^{4} + 4 a b^{2} n^{3} x \log{\left (c \right )} \log{\left (x \right )}^{3} + 6 a b^{2} n^{2} x \log{\left (c \right )}^{2} \log{\left (x \right )}^{2} + 4 a b^{2} n x \log{\left (c \right )}^{3} \log{\left (x \right )} + a b^{2} x \log{\left (c \right )}^{4} - 2 b^{3} n \left (\begin{cases} - \log{\left (c \right )}^{5} \log{\left (x \right )} & \text{for}\: n = 0 \\- \frac{\log{\left (c x^{n} \right )}^{6}}{6 n} & \text{otherwise} \end{cases}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((a/x**2+2*b*n*ln(c*x**n)/x**3)*(a*x**2+b*x*ln(c*x**n)**2)**2,x)

[Out]

a**3*x**3/3 + a**2*b*n**2*x**2*log(x)**2 - a**2*b*n**2*x**2*log(x) + 2*a**2*b*n*x**2*log(c)*log(x) - a**2*b*n*
x**2*log(c) + a**2*b*n*x**2*log(c*x**n) + a**2*b*x**2*log(c)**2 + a*b**2*n**4*x*log(x)**4 + 4*a*b**2*n**3*x*lo
g(c)*log(x)**3 + 6*a*b**2*n**2*x*log(c)**2*log(x)**2 + 4*a*b**2*n*x*log(c)**3*log(x) + a*b**2*x*log(c)**4 - 2*
b**3*n*Piecewise((-log(c)**5*log(x), Eq(n, 0)), (-log(c*x**n)**6/(6*n), True))

________________________________________________________________________________________

Giac [B]  time = 1.29055, size = 267, normalized size = 13.35 \begin{align*} \frac{1}{3} \, b^{3} n^{6} \log \left (x\right )^{6} + 2 \, b^{3} n^{5} \log \left (c\right ) \log \left (x\right )^{5} + 2 \, b^{3} n \log \left (c\right )^{5} \log \left (x\right ) + a b^{2} x \log \left (c\right )^{4} + a^{2} b x^{2} \log \left (c\right )^{2} + \frac{1}{3} \, a^{3} x^{3} +{\left (5 \, b^{3} n^{4} \log \left (c\right )^{2} + a b^{2} n^{4} x\right )} \log \left (x\right )^{4} + \frac{4}{3} \,{\left (5 \, b^{3} n^{3} \log \left (c\right )^{3} + 3 \, a b^{2} n^{3} x \log \left (c\right )\right )} \log \left (x\right )^{3} +{\left (5 \, b^{3} n^{2} \log \left (c\right )^{4} + 6 \, a b^{2} n^{2} x \log \left (c\right )^{2} + a^{2} b n^{2} x^{2}\right )} \log \left (x\right )^{2} + 2 \,{\left (2 \, a b^{2} n x \log \left (c\right )^{3} + a^{2} b n x^{2} \log \left (c\right )\right )} \log \left (x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((a/x^2+2*b*n*log(c*x^n)/x^3)*(a*x^2+b*x*log(c*x^n)^2)^2,x, algorithm="giac")

[Out]

1/3*b^3*n^6*log(x)^6 + 2*b^3*n^5*log(c)*log(x)^5 + 2*b^3*n*log(c)^5*log(x) + a*b^2*x*log(c)^4 + a^2*b*x^2*log(
c)^2 + 1/3*a^3*x^3 + (5*b^3*n^4*log(c)^2 + a*b^2*n^4*x)*log(x)^4 + 4/3*(5*b^3*n^3*log(c)^3 + 3*a*b^2*n^3*x*log
(c))*log(x)^3 + (5*b^3*n^2*log(c)^4 + 6*a*b^2*n^2*x*log(c)^2 + a^2*b*n^2*x^2)*log(x)^2 + 2*(2*a*b^2*n*x*log(c)
^3 + a^2*b*n*x^2*log(c))*log(x)