3.8 \(\int \frac {1}{2} \log ((-a^2+x^2)^2) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {12, 2448, 321, 207} \[ \frac {1}{2} x \log \left (\left (x^2-a^2\right )^2\right )+2 a \tanh ^{-1}\left (\frac {x}{a}\right )-2 x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

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

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2448

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 38, normalized size = 1.27 \[ \frac {1}{2} \, x \log \left (a^{4} - 2 \, a^{2} x^{2} + x^{4}\right ) + a \log \left (a + x\right ) - a \log \left (-a + x\right ) - 2 \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.86, size = 36, normalized size = 1.20 \[ \frac {1}{2} \, x \log \left ({\left (a^{2} - x^{2}\right )}^{2}\right ) + a \log \left ({\left | a + x \right |}\right ) - a \log \left ({\left | -a + x \right |}\right ) - 2 \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.40, size = 28, normalized size = 0.93 \[ 2\,a\,\mathrm {atanh}\left (\frac {x}{a}\right )-2\,x+\frac {x\,\ln \left ({\left (a^2-x^2\right )}^2\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log((a^2 - x^2)^2)/2,x)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*ln((-a**2+x**2)**2),x)

[Out]

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

________________________________________________________________________________________