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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2539, 2304, 2302, 30} \[ \frac {a x^m \log \left (c x^n\right )}{m}-\frac {a n x^m}{m^2}+\frac {b \log ^4\left (c x^n\right )}{4 n} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2539

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 41, normalized size = 1.00 \[ \frac {a x^m \log \left (c x^n\right )}{m}-\frac {a n x^m}{m^2}+\frac {b \log ^4\left (c x^n\right )}{4 n} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 81, normalized size = 1.98 \[ \frac {b m^{2} n^{3} \log \relax (x)^{4} + 4 \, b m^{2} n^{2} \log \relax (c) \log \relax (x)^{3} + 6 \, b m^{2} n \log \relax (c)^{2} \log \relax (x)^{2} + 4 \, b m^{2} \log \relax (c)^{3} \log \relax (x) + 4 \, {\left (a m n \log \relax (x) + a m \log \relax (c) - a n\right )} x^{m}}{4 \, m^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.20, size = 73, normalized size = 1.78 \[ \frac {1}{4} \, b n^{3} \log \relax (x)^{4} + b n^{2} \log \relax (c) \log \relax (x)^{3} + \frac {3}{2} \, b n \log \relax (c)^{2} \log \relax (x)^{2} + b \log \relax (c)^{3} \log \relax (x) + \frac {a n x^{m} \log \relax (x)}{m} + \frac {a x^{m} \log \relax (c)}{m} - \frac {a n x^{m}}{m^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 1.05, size = 2146, normalized size = 52.34 \[ \text {Expression too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(-3*Pi^2*b*csgn(I*x^n)^2*csgn(I*c*x^n)^4*ln(x)*m+6*Pi^2*b*csgn(I*x^n)^2*csgn(I*c*x^n)^3*csgn(I*c)*ln(x)*m-
3*Pi^2*b*csgn(I*x^n)^2*csgn(I*c*x^n)^2*csgn(I*c)^2*ln(x)*m+6*Pi^2*b*csgn(I*x^n)*csgn(I*c*x^n)^5*ln(x)*m-12*Pi^
2*b*csgn(I*x^n)*csgn(I*c*x^n)^4*csgn(I*c)*ln(x)*m+6*Pi^2*b*csgn(I*x^n)*csgn(I*c*x^n)^3*csgn(I*c)^2*ln(x)*m-3*P
i^2*b*csg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+3/2*I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2*ln(x)-3/2*I*Pi*b*csgn(I*x^n)
*csgn(I*c*x^n)*csgn(I*c)*ln(x)-3/2*I*Pi*b*csgn(I*c*x^n)^3*ln(x)+3/2*I*Pi*b*csgn(I*c*x^n)^2*csgn(I*c)*ln(x)+3*b
*ln(c)*ln(x))*ln(x^n)^2-3/2*I*ln(x)^2*ln(c)*Pi*b*n*csgn(I*x^n)*csgn(I*c*x^n)^2-3/2*I*ln(c)^2*Pi*b*csgn(I*x^n)*
csgn(I*c*x^n)*csgn(I*c)*ln(x)-1/2*I*ln(x)^3*Pi*b*n^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/2*I/m*Pi*a*csgn(I*x
^n)*csgn(I*c*x^n)*csgn(I*c)*x^m

________________________________________________________________________________________

maxima [B]  time = 0.64, size = 186, normalized size = 4.54 \[ \frac {1}{3} \, {\left (\frac {b \log \left (c x^{n}\right )^{3}}{n} + \frac {3 \, a x^{m}}{m}\right )} \log \left (c x^{n}\right ) + \frac {b m^{2} n^{3} \log \relax (x)^{4} - 4 \, b m^{2} n^{2} \log \relax (c) \log \relax (x)^{3} + 6 \, b m^{2} n \log \relax (c)^{2} \log \relax (x)^{2} - 4 \, b m^{2} \log \relax (c)^{3} \log \relax (x) - 4 \, b m^{2} \log \relax (x) \log \left (x^{n}\right )^{3} - 12 \, a n x^{m} + 6 \, {\left (b m^{2} n \log \relax (x)^{2} - 2 \, b m^{2} \log \relax (c) \log \relax (x)\right )} \log \left (x^{n}\right )^{2} - 4 \, {\left (b m^{2} n^{2} \log \relax (x)^{3} - 3 \, b m^{2} n \log \relax (c) \log \relax (x)^{2} + 3 \, b m^{2} \log \relax (c)^{2} \log \relax (x)\right )} \log \left (x^{n}\right )}{12 \, m^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {\ln \left (c\,x^n\right )\,\left (a\,x^m+b\,{\ln \left (c\,x^n\right )}^2\right )}{x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 12.42, size = 68, normalized size = 1.66 \[ - a n \left (\begin {cases} \frac {\begin {cases} \frac {x^{m}}{m} & \text {for}\: m \neq 0 \\\log {\relax (x )} & \text {otherwise} \end {cases}}{m} & \text {for}\: m > -\infty \wedge m < \infty \wedge m \neq 0 \\\frac {\log {\relax (x )}^{2}}{2} & \text {otherwise} \end {cases}\right ) + a \left (\begin {cases} \frac {x^{m}}{m} & \text {for}\: m - 1 \neq -1 \\\log {\relax (x )} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} - b \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(ln(c*x**n)*(a*x**m+b*ln(c*x**n)**2)/x,x)

[Out]

-a*n*Piecewise((Piecewise((x**m/m, Ne(m, 0)), (log(x), True))/m, (m > -oo) & (m < oo) & Ne(m, 0)), (log(x)**2/
2, True)) + a*Piecewise((x**m/m, Ne(m - 1, -1)), (log(x), True))*log(c*x**n) - b*Piecewise((-log(c)**3*log(x),
 Eq(n, 0)), (-log(c*x**n)**4/(4*n), True))

________________________________________________________________________________________