3.62 \(\int x^n \log (a x) \, dx\)

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

[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 = {2304} \[ \frac {x^{n+1} \log (a x)}{n+1}-\frac {x^{n+1}}{(n+1)^2} \]

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

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 \[ \frac {x^{n+1} ((n+1) \log (a x)-1)}{(n+1)^2} \]

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

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 32, normalized size = 1.14 \[ \frac {{\left ({\left (n + 1\right )} x \log \relax (a) + {\left (n + 1\right )} x \log \relax (x) - x\right )} x^{n}}{n^{2} + 2 \, n + 1} \]

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)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: x^(n+1)/(n+1)*ln(a*x)+integrate(-x^(n+1)
/(n*x+x),x)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 36, normalized size = 1.29 \[ \frac {x \,{\mathrm e}^{n \ln \relax (x )} \ln \left (a x \right )}{n +1}-\frac {x \,{\mathrm e}^{n \ln \relax (x )}}{n^{2}+2 n +1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[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.58, size = 28, normalized size = 1.00 \[ \frac {x^{n + 1} \log \left (a x\right )}{n + 1} - \frac {x^{n + 1}}{{\left (n + 1\right )}^{2}} \]

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

________________________________________________________________________________________

mupad [B]  time = 0.21, size = 38, normalized size = 1.36 \[ \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 . \]

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

________________________________________________________________________________________

sympy [A]  time = 0.77, size = 94, normalized size = 3.36 \[ \begin {cases} \frac {n x x^{n} \log {\relax (a )}}{n^{2} + 2 n + 1} + \frac {n x x^{n} \log {\relax (x )}}{n^{2} + 2 n + 1} + \frac {x x^{n} \log {\relax (a )}}{n^{2} + 2 n + 1} + \frac {x x^{n} \log {\relax (x )}}{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} \]

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)/(n**2 + 2*n + 1) + n*x*x**n*log(x)/(n**2 + 2*n + 1) + x*x**n*log(a)/(n**2 + 2*n + 1
) + x*x**n*log(x)/(n**2 + 2*n + 1) - x*x**n/(n**2 + 2*n + 1), Ne(n, -1)), (log(a*x)**2/2, True))

________________________________________________________________________________________