3.68 \(\int x \log (b+a x) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0231036, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {2395, 43} \[ -\frac{b^2 \log (a x+b)}{2 a^2}+\frac{1}{2} x^2 \log (a x+b)+\frac{b x}{2 a}-\frac{x^2}{4} \]

Antiderivative was successfully verified.

[In]

Int[x*Log[b + a*x],x]

[Out]

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

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

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 x \log (b+a x) \, dx &=\frac{1}{2} x^2 \log (b+a x)-\frac{1}{2} a \int \frac{x^2}{b+a x} \, dx\\ &=\frac{1}{2} x^2 \log (b+a x)-\frac{1}{2} a \int \left (-\frac{b}{a^2}+\frac{x}{a}+\frac{b^2}{a^2 (b+a x)}\right ) \, dx\\ &=\frac{b x}{2 a}-\frac{x^2}{4}-\frac{b^2 \log (b+a x)}{2 a^2}+\frac{1}{2} x^2 \log (b+a x)\\ \end{align*}

Mathematica [A]  time = 0.0146575, size = 46, normalized size = 1. \[ -\frac{b^2 \log (a x+b)}{2 a^2}+\frac{1}{2} x^2 \log (a x+b)+\frac{b x}{2 a}-\frac{x^2}{4} \]

Antiderivative was successfully verified.

[In]

Integrate[x*Log[b + a*x],x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 47, normalized size = 1. \begin{align*} -{\frac{{b}^{2}\ln \left ( ax+b \right ) }{2\,{a}^{2}}}+{\frac{bx}{2\,a}}+{\frac{3\,{b}^{2}}{4\,{a}^{2}}}+{\frac{{x}^{2}\ln \left ( ax+b \right ) }{2}}-{\frac{{x}^{2}}{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.955528, size = 59, normalized size = 1.28 \begin{align*} \frac{1}{2} \, x^{2} \log \left (a x + b\right ) - \frac{1}{4} \, a{\left (\frac{2 \, b^{2} \log \left (a x + b\right )}{a^{3}} + \frac{a x^{2} - 2 \, b x}{a^{2}}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.97919, size = 85, normalized size = 1.85 \begin{align*} -\frac{a^{2} x^{2} - 2 \, a b x - 2 \,{\left (a^{2} x^{2} - b^{2}\right )} \log \left (a x + b\right )}{4 \, a^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.320611, size = 42, normalized size = 0.91 \begin{align*} - a \left (\frac{x^{2}}{4 a} - \frac{b x}{2 a^{2}} + \frac{b^{2} \log{\left (a x + b \right )}}{2 a^{3}}\right ) + \frac{x^{2} \log{\left (a x + b \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.07616, size = 78, normalized size = 1.7 \begin{align*} \frac{{\left (a x + b\right )}^{2} \log \left (a x + b\right )}{2 \, a^{2}} - \frac{{\left (a x + b\right )} b \log \left (a x + b\right )}{a^{2}} - \frac{{\left (a x + b\right )}^{2}}{4 \, a^{2}} + \frac{{\left (a x + b\right )} b}{a^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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