3.66 \(\int (b+a x)^2 \log (x) \, dx\)

Optimal. Leaf size=54 \[ -\frac{a^2 x^3}{9}-\frac{b^3 \log (x)}{3 a}-\frac{1}{2} a b x^2+\frac{\log (x) (a x+b)^3}{3 a}-b^2 x \]

[Out]

-(b^2*x) - (a*b*x^2)/2 - (a^2*x^3)/9 - (b^3*Log[x])/(3*a) + ((b + a*x)^3*Log[x])/(3*a)

________________________________________________________________________________________

Rubi [A]  time = 0.0278243, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {32, 2313, 12, 43} \[ -\frac{a^2 x^3}{9}-\frac{b^3 \log (x)}{3 a}-\frac{1}{2} a b x^2+\frac{\log (x) (a x+b)^3}{3 a}-b^2 x \]

Antiderivative was successfully verified.

[In]

Int[(b + a*x)^2*Log[x],x]

[Out]

-(b^2*x) - (a*b*x^2)/2 - (a^2*x^3)/9 - (b^3*Log[x])/(3*a) + ((b + a*x)^3*Log[x])/(3*a)

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2313

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = IntHide[(d +
 e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ[{a,
b, c, d, e, n, r}, x] && IGtQ[q, 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int (b+a x)^2 \log (x) \, dx &=\frac{(b+a x)^3 \log (x)}{3 a}-\int \frac{(b+a x)^3}{3 a x} \, dx\\ &=\frac{(b+a x)^3 \log (x)}{3 a}-\frac{\int \frac{(b+a x)^3}{x} \, dx}{3 a}\\ &=\frac{(b+a x)^3 \log (x)}{3 a}-\frac{\int \left (3 a b^2+\frac{b^3}{x}+3 a^2 b x+a^3 x^2\right ) \, dx}{3 a}\\ &=-b^2 x-\frac{1}{2} a b x^2-\frac{a^2 x^3}{9}-\frac{b^3 \log (x)}{3 a}+\frac{(b+a x)^3 \log (x)}{3 a}\\ \end{align*}

Mathematica [A]  time = 0.0103252, size = 53, normalized size = 0.98 \[ -\frac{1}{9} a^2 x^3+\frac{1}{3} a^2 x^3 \log (x)-\frac{1}{2} a b x^2+a b x^2 \log (x)-b^2 x+b^2 x \log (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(b + a*x)^2*Log[x],x]

[Out]

-(b^2*x) - (a*b*x^2)/2 - (a^2*x^3)/9 + b^2*x*Log[x] + a*b*x^2*Log[x] + (a^2*x^3*Log[x])/3

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 48, normalized size = 0.9 \begin{align*}{\frac{{a}^{2}{x}^{3}\ln \left ( x \right ) }{3}}-{\frac{{a}^{2}{x}^{3}}{9}}+ab{x}^{2}\ln \left ( x \right ) -{\frac{ab{x}^{2}}{2}}+\ln \left ( x \right ) x{b}^{2}-{b}^{2}x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x+b)^2*ln(x),x)

[Out]

1/3*a^2*x^3*ln(x)-1/9*a^2*x^3+a*b*x^2*ln(x)-1/2*a*b*x^2+ln(x)*x*b^2-b^2*x

________________________________________________________________________________________

Maxima [A]  time = 0.958832, size = 63, normalized size = 1.17 \begin{align*} -\frac{1}{9} \, a^{2} x^{3} - \frac{1}{2} \, a b x^{2} - b^{2} x + \frac{1}{3} \,{\left (a^{2} x^{3} + 3 \, a b x^{2} + 3 \, b^{2} x\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/9*a^2*x^3 - 1/2*a*b*x^2 - b^2*x + 1/3*(a^2*x^3 + 3*a*b*x^2 + 3*b^2*x)*log(x)

________________________________________________________________________________________

Fricas [A]  time = 1.98242, size = 109, normalized size = 2.02 \begin{align*} -\frac{1}{9} \, a^{2} x^{3} - \frac{1}{2} \, a b x^{2} - b^{2} x + \frac{1}{3} \,{\left (a^{2} x^{3} + 3 \, a b x^{2} + 3 \, b^{2} x\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/9*a^2*x^3 - 1/2*a*b*x^2 - b^2*x + 1/3*(a^2*x^3 + 3*a*b*x^2 + 3*b^2*x)*log(x)

________________________________________________________________________________________

Sympy [A]  time = 0.120427, size = 44, normalized size = 0.81 \begin{align*} - \frac{a^{2} x^{3}}{9} - \frac{a b x^{2}}{2} - b^{2} x + \left (\frac{a^{2} x^{3}}{3} + a b x^{2} + b^{2} x\right ) \log{\left (x \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+b)**2*ln(x),x)

[Out]

-a**2*x**3/9 - a*b*x**2/2 - b**2*x + (a**2*x**3/3 + a*b*x**2 + b**2*x)*log(x)

________________________________________________________________________________________

Giac [A]  time = 1.08132, size = 63, normalized size = 1.17 \begin{align*} \frac{1}{3} \, a^{2} x^{3} \log \left (x\right ) - \frac{1}{9} \, a^{2} x^{3} + a b x^{2} \log \left (x\right ) - \frac{1}{2} \, a b x^{2} + b^{2} x \log \left (x\right ) - b^{2} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*a^2*x^3*log(x) - 1/9*a^2*x^3 + a*b*x^2*log(x) - 1/2*a*b*x^2 + b^2*x*log(x) - b^2*x