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

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

Optimal result

Integrand size = 11, antiderivative size = 21 \[ \int \frac {1}{c+(a+b x)^2} \, dx=\frac {\arctan \left (\frac {a+b x}{\sqrt {c}}\right )}{b \sqrt {c}} \]

[Out]

arctan((b*x+a)/c^(1/2))/b/c^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {253, 209} \[ \int \frac {1}{c+(a+b x)^2} \, dx=\frac {\arctan \left (\frac {a+b x}{\sqrt {c}}\right )}{b \sqrt {c}} \]

[In]

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

[Out]

ArcTan[(a + b*x)/Sqrt[c]]/(b*Sqrt[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])

Rule 253

Int[((a_.) + (b_.)*(v_)^(n_))^(p_), x_Symbol] :> Dist[1/Coefficient[v, x, 1], Subst[Int[(a + b*x^n)^p, x], x,
v], x] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && NeQ[v, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{c+x^2} \, dx,x,a+b x\right )}{b} \\ & = \frac {\tan ^{-1}\left (\frac {a+b x}{\sqrt {c}}\right )}{b \sqrt {c}} \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

ArcTan[(a + b*x)/Sqrt[c]]/(b*Sqrt[c])

Maple [A] (verified)

Time = 0.83 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.33

method result size
default \(\frac {\arctan \left (\frac {2 b^{2} x +2 a b}{2 \sqrt {c}\, b}\right )}{\sqrt {c}\, b}\) \(28\)
risch \(-\frac {\ln \left (b x +\sqrt {-c}+a \right )}{2 \sqrt {-c}\, b}+\frac {\ln \left (-b x +\sqrt {-c}-a \right )}{2 \sqrt {-c}\, b}\) \(47\)

[In]

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

[Out]

1/c^(1/2)/b*arctan(1/2*(2*b^2*x+2*a*b)/c^(1/2)/b)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 83, normalized size of antiderivative = 3.95 \[ \int \frac {1}{c+(a+b x)^2} \, dx=\left [-\frac {\sqrt {-c} \log \left (\frac {b^{2} x^{2} + 2 \, a b x + a^{2} - 2 \, {\left (b x + a\right )} \sqrt {-c} - c}{b^{2} x^{2} + 2 \, a b x + a^{2} + c}\right )}{2 \, b c}, \frac {\arctan \left (\frac {b x + a}{\sqrt {c}}\right )}{b \sqrt {c}}\right ] \]

[In]

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

[Out]

[-1/2*sqrt(-c)*log((b^2*x^2 + 2*a*b*x + a^2 - 2*(b*x + a)*sqrt(-c) - c)/(b^2*x^2 + 2*a*b*x + a^2 + c))/(b*c),
arctan((b*x + a)/sqrt(c))/(b*sqrt(c))]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (17) = 34\).

Time = 0.09 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.57 \[ \int \frac {1}{c+(a+b x)^2} \, dx=\frac {- \frac {\sqrt {- \frac {1}{c}} \log {\left (x + \frac {a - c \sqrt {- \frac {1}{c}}}{b} \right )}}{2} + \frac {\sqrt {- \frac {1}{c}} \log {\left (x + \frac {a + c \sqrt {- \frac {1}{c}}}{b} \right )}}{2}}{b} \]

[In]

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

[Out]

(-sqrt(-1/c)*log(x + (a - c*sqrt(-1/c))/b)/2 + sqrt(-1/c)*log(x + (a + c*sqrt(-1/c))/b)/2)/b

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.14 \[ \int \frac {1}{c+(a+b x)^2} \, dx=\frac {\arctan \left (\frac {b^{2} x + a b}{b \sqrt {c}}\right )}{b \sqrt {c}} \]

[In]

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

[Out]

arctan((b^2*x + a*b)/(b*sqrt(c)))/(b*sqrt(c))

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {1}{c+(a+b x)^2} \, dx=\frac {\arctan \left (\frac {b x + a}{\sqrt {c}}\right )}{b \sqrt {c}} \]

[In]

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

[Out]

arctan((b*x + a)/sqrt(c))/(b*sqrt(c))

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {1}{c+(a+b x)^2} \, dx=\frac {\mathrm {atan}\left (\frac {a+b\,x}{\sqrt {c}}\right )}{b\,\sqrt {c}} \]

[In]

int(1/(c + (a + b*x)^2),x)

[Out]

atan((a + b*x)/c^(1/2))/(b*c^(1/2))