\(\int \frac {\log (c x^n)}{x} \, dx\) [12]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 15 \[ \int \frac {\log \left (c x^n\right )}{x} \, dx=\frac {\log ^2\left (c x^n\right )}{2 n} \]

[Out]

1/2*ln(c*x^n)^2/n

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2338} \[ \int \frac {\log \left (c x^n\right )}{x} \, dx=\frac {\log ^2\left (c x^n\right )}{2 n} \]

[In]

Int[Log[c*x^n]/x,x]

[Out]

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

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\log ^2\left (c x^n\right )}{2 n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00 \[ \int \frac {\log \left (c x^n\right )}{x} \, dx=\frac {\log ^2\left (c x^n\right )}{2 n} \]

[In]

Integrate[Log[c*x^n]/x,x]

[Out]

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

Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.93

method result size
derivativedivides \(\frac {\ln \left (c \,x^{n}\right )^{2}}{2 n}\) \(14\)
default \(\frac {\ln \left (c \,x^{n}\right )^{2}}{2 n}\) \(14\)
norman \(\frac {\ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )^{2}}{2 n}\) \(16\)
parts \(\ln \left (c \,x^{n}\right ) \ln \left (x \right )-\frac {n \ln \left (x \right )^{2}}{2}\) \(18\)
risch \(\ln \left (x \right ) \ln \left (x^{n}\right )-\frac {n \ln \left (x \right )^{2}}{2}-\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )}{2}+\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}+\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}+\ln \left (c \right ) \ln \left (x \right )\) \(107\)

[In]

int(ln(c*x^n)/x,x,method=_RETURNVERBOSE)

[Out]

1/2*ln(c*x^n)^2/n

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int \frac {\log \left (c x^n\right )}{x} \, dx=\frac {1}{2} \, n \log \left (x\right )^{2} + \log \left (c\right ) \log \left (x\right ) \]

[In]

integrate(log(c*x^n)/x,x, algorithm="fricas")

[Out]

1/2*n*log(x)^2 + log(c)*log(x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 65 vs. \(2 (10) = 20\).

Time = 1.17 (sec) , antiderivative size = 65, normalized size of antiderivative = 4.33 \[ \int \frac {\log \left (c x^n\right )}{x} \, dx=\begin {cases} 0 & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \wedge \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (c x^{n} \right )}^{2}}{2 n} & \text {for}\: \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (\frac {x^{- n}}{c} \right )}^{2}}{2 n} & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \\\frac {{G_{3, 3}^{3, 0}\left (\begin {matrix} & 1, 1, 1 \\0, 0, 0 & \end {matrix} \middle | {c x^{n}} \right )}}{n} + \frac {{G_{3, 3}^{0, 3}\left (\begin {matrix} 1, 1, 1 & \\ & 0, 0, 0 \end {matrix} \middle | {c x^{n}} \right )}}{n} & \text {otherwise} \end {cases} \]

[In]

integrate(ln(c*x**n)/x,x)

[Out]

Piecewise((0, (Abs(c*x**n) < 1) & (1/Abs(c*x**n) < 1)), (log(c*x**n)**2/(2*n), Abs(c*x**n) < 1), (log(1/(c*x**
n))**2/(2*n), 1/Abs(c*x**n) < 1), (meijerg(((), (1, 1, 1)), ((0, 0, 0), ()), c*x**n)/n + meijerg(((1, 1, 1), (
)), ((), (0, 0, 0)), c*x**n)/n, True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int \frac {\log \left (c x^n\right )}{x} \, dx=\frac {\log \left (c x^{n}\right )^{2}}{2 \, n} \]

[In]

integrate(log(c*x^n)/x,x, algorithm="maxima")

[Out]

1/2*log(c*x^n)^2/n

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int \frac {\log \left (c x^n\right )}{x} \, dx=\frac {1}{2} \, n \log \left (x\right )^{2} + \log \left (c\right ) \log \left (x\right ) \]

[In]

integrate(log(c*x^n)/x,x, algorithm="giac")

[Out]

1/2*n*log(x)^2 + log(c)*log(x)

Mupad [B] (verification not implemented)

Time = 1.43 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int \frac {\log \left (c x^n\right )}{x} \, dx=\frac {{\ln \left (c\,x^n\right )}^2}{2\,n} \]

[In]

int(log(c*x^n)/x,x)

[Out]

log(c*x^n)^2/(2*n)