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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {2454, 2389, 2295} \[ \frac {1}{2} \left (a^2+x^2\right ) \log \left (a^2+x^2\right )-\frac {x^2}{2} \]

Antiderivative was successfully verified.

[In]

Int[x*Log[a^2 + x^2],x]

[Out]

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

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2454

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 26, normalized size = 0.96 \[ \frac {1}{2} \left (\left (a^2+x^2\right ) \log \left (a^2+x^2\right )-x^2\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x*Log[a^2 + x^2],x]

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 1.07, size = 28, normalized size = 1.04 \[ -\frac {1}{2} \, a^{2} - \frac {1}{2} \, x^{2} + \frac {1}{2} \, {\left (a^{2} + x^{2}\right )} \log \left (a^{2} + x^{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 29, normalized size = 1.07 \[ -\frac {a^{2}}{2}-\frac {x^{2}}{2}+\frac {\left (a^{2}+x^{2}\right ) \ln \left (a^{2}+x^{2}\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 28, normalized size = 1.04 \[ -\frac {1}{2} \, a^{2} - \frac {1}{2} \, x^{2} + \frac {1}{2} \, {\left (a^{2} + x^{2}\right )} \log \left (a^{2} + x^{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 51, normalized size = 1.89 \[ \frac {a^2\,\ln \left (x-\sqrt {-a^2}\right )}{2}+\frac {x^2\,\ln \left (a^2+x^2\right )}{2}-\frac {x^2}{2}+\frac {a^2\,\ln \left (x+\sqrt {-a^2}\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*log(a^2 + x^2),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 31, normalized size = 1.15 \[ \frac {a^{2} \log {\left (a^{2} + x^{2} \right )}}{2} + \frac {x^{2} \log {\left (a^{2} + x^{2} \right )}}{2} - \frac {x^{2}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a**2*log(a**2 + x**2)/2 + x**2*log(a**2 + x**2)/2 - x**2/2

________________________________________________________________________________________