3.24 \(\int (\frac {a}{x}+\frac {2 b n \log (c x^n)}{x^2}) (a x^2+b x \log ^2(c x^n)) \, dx\)

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

[Out]

1/2*(a*x+b*ln(c*x^n)^2)^2

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

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]

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]

Rubi steps

\begin {align*} \int \left (\frac {a}{x}+\frac {2 b n \log \left (c x^n\right )}{x^2}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right ) \, 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 )}{x^2} \, 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 )}{x} \, dx\\ &=\frac {1}{2} \left (a x+b \log ^2\left (c x^n\right )\right )^2\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 38, normalized size = 1.90 \[ \frac {a^2 x^2}{2}+a b x \log ^2\left (c x^n\right )+\frac {1}{2} b^2 \log ^4\left (c x^n\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 89, normalized size = 4.45 \[ \frac {1}{2} \, b^{2} n^{4} \log \relax (x)^{4} + 2 \, b^{2} n^{3} \log \relax (c) \log \relax (x)^{3} + a b x \log \relax (c)^{2} + \frac {1}{2} \, a^{2} x^{2} + {\left (3 \, b^{2} n^{2} \log \relax (c)^{2} + a b n^{2} x\right )} \log \relax (x)^{2} + 2 \, {\left (b^{2} n \log \relax (c)^{3} + a b n x \log \relax (c)\right )} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.18, size = 90, normalized size = 4.50 \[ \frac {1}{2} \, b^{2} n^{4} \log \relax (x)^{4} + 2 \, b^{2} n^{3} \log \relax (c) \log \relax (x)^{3} + 2 \, b^{2} n \log \relax (c)^{3} \log \relax (x) + 2 \, a b n x \log \relax (c) \log \relax (x) + a b x \log \relax (c)^{2} + \frac {1}{2} \, a^{2} x^{2} + {\left (3 \, b^{2} n^{2} \log \relax (c)^{2} + a b n^{2} x\right )} \log \relax (x)^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.09, size = 63, normalized size = 3.15 \[ \frac {b^{2} \ln \left (c \,x^{n}\right )^{4}}{2}+2 a b n x \ln \left (c \,x^{n}\right )-2 a b n x \ln \left (c \,{\mathrm e}^{n \ln \relax (x )}\right )+a b x \ln \left (c \,{\mathrm e}^{n \ln \relax (x )}\right )^{2}+\frac {a^{2} x^{2}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*a^2*x^2+a*b*x*ln(c*exp(n*ln(x)))^2-2*a*b*n*x*ln(c*exp(n*ln(x)))+1/2*b^2*ln(c*x^n)^4+2*ln(c*x^n)*a*b*n*x

________________________________________________________________________________________

maxima [B]  time = 0.46, size = 74, normalized size = 3.70 \[ \frac {1}{2} \, b^{2} \log \left (c x^{n}\right )^{4} - 2 \, a b n^{2} x + 2 \, a b n x \log \left (c x^{n}\right ) + a b x \log \left (c x^{n}\right )^{2} + \frac {1}{2} \, a^{2} x^{2} + 2 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} a b \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.29, size = 18, normalized size = 0.90 \[ \frac {{\left (b\,{\ln \left (c\,x^n\right )}^2+a\,x\right )}^2}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(a*x + b*log(c*x^n)^2)^2/2

________________________________________________________________________________________

sympy [A]  time = 8.07, size = 117, normalized size = 5.85 \[ \frac {a^{2} x^{2}}{2} + a b n^{2} x \log {\relax (x )}^{2} - 2 a b n^{2} x \log {\relax (x )} + 2 a b n x \log {\relax (c )} \log {\relax (x )} - 2 a b n x \log {\relax (c )} + 2 a b n x \log {\left (c x^{n} \right )} + a b x \log {\relax (c )}^{2} - 2 b^{2} n \left (\begin {cases} - \log {\relax (c )}^{3} \log {\relax (x )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{4}}{4 n} & \text {otherwise} \end {cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________