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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0929345, antiderivative size = 20, normalized size of antiderivative = 1., 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 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}+\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.0040864, size = 38, normalized size = 1.9 \[ \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

________________________________________________________________________________________

Maple [B]  time = 0.018, size = 63, normalized size = 3.2 \begin{align*}{\frac{{a}^{2}{x}^{2}}{2}}+abx \left ( \ln \left ( c{{\rm e}^{n\ln \left ( x \right ) }} \right ) \right ) ^{2}-2\,bnax\ln \left ( c{{\rm e}^{n\ln \left ( x \right ) }} \right ) +{\frac{{b}^{2} \left ( \ln \left ( c{x}^{n} \right ) \right ) ^{4}}{2}}+2\,\ln \left ( c{x}^{n} \right ) abnx \end{align*}

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*b*n*a*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 = 1.04964, size = 100, normalized size = 5. \begin{align*} \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 \end{align*}

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

________________________________________________________________________________________

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

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)

________________________________________________________________________________________

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

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))

________________________________________________________________________________________

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

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