3.1.32 \(\int \frac {1}{c^2-x^2} \, dx\) [32]

Optimal. Leaf size=10 \[ \frac {\tanh ^{-1}\left (\frac {x}{c}\right )}{c} \]

[Out]

arctanh(x/c)/c

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {212} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {x}{c}\right )}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c^2 - x^2)^(-1),x]

[Out]

ArcTanh[x/c]/c

Rule 212

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 10, normalized size = 1.00 \begin {gather*} \frac {\tanh ^{-1}\left (\frac {x}{c}\right )}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c^2 - x^2)^(-1),x]

[Out]

ArcTanh[x/c]/c

________________________________________________________________________________________

Mathics [A]
time = 1.73, size = 18, normalized size = 1.80 \begin {gather*} \frac {\text {Log}\left [c+x\right ]-\text {Log}\left [-c+x\right ]}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[1/(c^2-x^2),x]')

[Out]

(Log[c + x] - Log[-c + x]) / (2 c)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(21\) vs. \(2(10)=20\).
time = 0.02, size = 22, normalized size = 2.20

method result size
default \(\frac {\ln \left (c +x \right )}{2 c}-\frac {\ln \left (c -x \right )}{2 c}\) \(22\)
norman \(\frac {\ln \left (c +x \right )}{2 c}-\frac {\ln \left (c -x \right )}{2 c}\) \(22\)
risch \(-\frac {\ln \left (-c +x \right )}{2 c}+\frac {\ln \left (c +x \right )}{2 c}\) \(22\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(c^2-x^2),x,method=_RETURNVERBOSE)

[Out]

1/2/c*ln(c+x)-1/2/c*ln(c-x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 21 vs. \(2 (10) = 20\).
time = 0.34, size = 21, normalized size = 2.10 \begin {gather*} \frac {\log \left (c + x\right )}{2 \, c} - \frac {\log \left (-c + x\right )}{2 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(c^2-x^2),x, algorithm="maxima")

[Out]

1/2*log(c + x)/c - 1/2*log(-c + x)/c

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 18, normalized size = 1.80 \begin {gather*} \frac {\log \left (c + x\right ) - \log \left (-c + x\right )}{2 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(c^2-x^2),x, algorithm="fricas")

[Out]

1/2*(log(c + x) - log(-c + x))/c

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 14 vs. \(2 (5) = 10\)
time = 0.06, size = 15, normalized size = 1.50 \begin {gather*} - \frac {\frac {\log {\left (- c + x \right )}}{2} - \frac {\log {\left (c + x \right )}}{2}}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(c**2-x**2),x)

[Out]

-(log(-c + x)/2 - log(c + x)/2)/c

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 23 vs. \(2 (10) = 20\).
time = 0.00, size = 23, normalized size = 2.30 \begin {gather*} -\frac {\ln \left |x-c\right |}{2 c}+\frac {\ln \left |x+c\right |}{2 c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(c^2-x^2),x)

[Out]

1/2*log(abs(c + x))/c - 1/2*log(abs(-c + x))/c

________________________________________________________________________________________

Mupad [B]
time = 0.16, size = 10, normalized size = 1.00 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {x}{c}\right )}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(c^2 - x^2),x)

[Out]

atanh(x/c)/c

________________________________________________________________________________________