3.1.62 \(\int x^n \log (a x) \, dx\) [62]

Optimal. Leaf size=28 \[ -\frac {x^{1+n}}{(1+n)^2}+\frac {x^{1+n} \log (a x)}{1+n} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2341} \begin {gather*} \frac {x^{n+1} \log (a x)}{n+1}-\frac {x^{n+1}}{(n+1)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^n*Log[a*x],x]

[Out]

-(x^(1 + n)/(1 + n)^2) + (x^(1 + n)*Log[a*x])/(1 + n)

Rule 2341

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
]

Rubi steps

\begin {align*} \int x^n \log (a x) \, dx &=-\frac {x^{1+n}}{(1+n)^2}+\frac {x^{1+n} \log (a x)}{1+n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 21, normalized size = 0.75 \begin {gather*} \frac {x^{1+n} (-1+(1+n) \log (a x))}{(1+n)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^n*Log[a*x],x]

[Out]

(x^(1 + n)*(-1 + (1 + n)*Log[a*x]))/(1 + n)^2

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 36, normalized size = 1.29

method result size
norman \(\frac {x \ln \left (a x \right ) {\mathrm e}^{n \ln \left (x \right )}}{1+n}-\frac {x \,{\mathrm e}^{n \ln \left (x \right )}}{n^{2}+2 n +1}\) \(36\)
risch \(\frac {x \left (-i \pi \,\mathrm {csgn}\left (i a \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i a x \right ) n +i \pi \,\mathrm {csgn}\left (i a \right ) \mathrm {csgn}\left (i a x \right )^{2} n +i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i a x \right )^{2} n -i \pi \mathrm {csgn}\left (i a x \right )^{3} n -i \pi \,\mathrm {csgn}\left (i a \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i a x \right )+i \pi \,\mathrm {csgn}\left (i a \right ) \mathrm {csgn}\left (i a x \right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i a x \right )^{2}-i \pi \mathrm {csgn}\left (i a x \right )^{3}+2 \ln \left (a \right ) n +2 n \ln \left (x \right )+2 \ln \left (a \right )+2 \ln \left (x \right )-2\right ) x^{n}}{2 \left (1+n \right )^{2}}\) \(168\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 28, normalized size = 1.00 \begin {gather*} \frac {x^{n + 1} \log \left (a x\right )}{n + 1} - \frac {x^{n + 1}}{{\left (n + 1\right )}^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.94, size = 32, normalized size = 1.14 \begin {gather*} \frac {{\left ({\left (n + 1\right )} x \log \left (a\right ) + {\left (n + 1\right )} x \log \left (x\right ) - x\right )} x^{n}}{n^{2} + 2 \, n + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 61 vs. \(2 (22) = 44\).
time = 0.20, size = 61, normalized size = 2.18 \begin {gather*} \begin {cases} \frac {n x x^{n} \log {\left (a x \right )}}{n^{2} + 2 n + 1} + \frac {x x^{n} \log {\left (a x \right )}}{n^{2} + 2 n + 1} - \frac {x x^{n}}{n^{2} + 2 n + 1} & \text {for}\: n \neq -1 \\\frac {\log {\left (a x \right )}^{2}}{2} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**n*ln(a*x),x)

[Out]

Piecewise((n*x*x**n*log(a*x)/(n**2 + 2*n + 1) + x*x**n*log(a*x)/(n**2 + 2*n + 1) - x*x**n/(n**2 + 2*n + 1), Ne
(n, -1)), (log(a*x)**2/2, True))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(x^n*log(a*x), x)

________________________________________________________________________________________

Mupad [B]
time = 0.21, size = 38, normalized size = 1.36 \begin {gather*} \left \{\begin {array}{cl} \frac {{\ln \left (a\,x\right )}^2}{2} & \text {\ if\ \ }n=-1\\ \frac {x^{n+1}\,\left (\ln \left (a\,x\right )-\frac {1}{n+1}\right )}{n+1} & \text {\ if\ \ }n\neq -1 \end {array}\right . \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^n*log(a*x),x)

[Out]

piecewise(n == -1, log(a*x)^2/2, n ~= -1, (x^(n + 1)*(log(a*x) - 1/(n + 1)))/(n + 1))

________________________________________________________________________________________