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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 10 \[ \int \frac {1}{c^2-x^2} \, dx=\frac {\text {arctanh}\left (\frac {x}{c}\right )}{c} \]

[Out]

arctanh(x/c)/c

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {212} \[ \int \frac {1}{c^2-x^2} \, dx=\frac {\text {arctanh}\left (\frac {x}{c}\right )}{c} \]

[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*} \text {integral}& = \frac {\text {arctanh}\left (\frac {x}{c}\right )}{c} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \frac {1}{c^2-x^2} \, dx=\frac {\text {arctanh}\left (\frac {x}{c}\right )}{c} \]

[In]

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

[Out]

ArcTanh[x/c]/c

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.90

method result size
parallelrisch \(-\frac {\ln \left (-c +x \right )-\ln \left (c +x \right )}{2 c}\) \(19\)
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\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.80 \[ \int \frac {1}{c^2-x^2} \, dx=\frac {\log \left (c + x\right ) - \log \left (-c + x\right )}{2 \, c} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 15 vs. \(2 (5) = 10\).

Time = 0.05 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.50 \[ \int \frac {1}{c^2-x^2} \, dx=- \frac {\frac {\log {\left (- c + x \right )}}{2} - \frac {\log {\left (c + x \right )}}{2}}{c} \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 21 vs. \(2 (10) = 20\).

Time = 0.18 (sec) , antiderivative size = 21, normalized size of antiderivative = 2.10 \[ \int \frac {1}{c^2-x^2} \, dx=\frac {\log \left (c + x\right )}{2 \, c} - \frac {\log \left (-c + x\right )}{2 \, c} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 23 vs. \(2 (10) = 20\).

Time = 0.29 (sec) , antiderivative size = 23, normalized size of antiderivative = 2.30 \[ \int \frac {1}{c^2-x^2} \, dx=\frac {\log \left ({\left | c + x \right |}\right )}{2 \, c} - \frac {\log \left ({\left | -c + x \right |}\right )}{2 \, c} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \frac {1}{c^2-x^2} \, dx=\frac {\mathrm {atanh}\left (\frac {x}{c}\right )}{c} \]

[In]

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

[Out]

atanh(x/c)/c