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

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

Optimal result

Integrand size = 9, antiderivative size = 10 \[ \int \frac {1}{c^2+x^2} \, dx=\frac {\arctan \left (\frac {x}{c}\right )}{c} \]

[Out]

arctan(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.111, Rules used = {209} \[ \int \frac {1}{c^2+x^2} \, dx=\frac {\arctan \left (\frac {x}{c}\right )}{c} \]

[In]

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

[Out]

ArcTan[x/c]/c

Rule 209

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

Rubi steps \begin{align*} \text {integral}& = \frac {\arctan \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 {\arctan \left (\frac {x}{c}\right )}{c} \]

[In]

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

[Out]

ArcTan[x/c]/c

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.10

method result size
default \(\frac {\arctan \left (\frac {x}{c}\right )}{c}\) \(11\)
risch \(\frac {\arctan \left (\frac {x}{c}\right )}{c}\) \(11\)
parallelrisch \(-\frac {i \ln \left (-i c +x \right )-i \ln \left (i c +x \right )}{2 c}\) \(27\)

[In]

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

[Out]

arctan(x/c)/c

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \frac {1}{c^2+x^2} \, dx=\frac {\arctan \left (\frac {x}{c}\right )}{c} \]

[In]

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

[Out]

arctan(x/c)/c

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \frac {1}{c^2+x^2} \, dx=\frac {\arctan \left (\frac {x}{c}\right )}{c} \]

[In]

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

[Out]

arctan(x/c)/c

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \frac {1}{c^2+x^2} \, dx=\frac {\arctan \left (\frac {x}{c}\right )}{c} \]

[In]

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

[Out]

arctan(x/c)/c

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

atan(x/c)/c