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

   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 = 13, antiderivative size = 31 \[ \int \frac {1}{a+b (c+d x)^2} \, dx=\frac {\arctan \left (\frac {\sqrt {b} (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b} d} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 31, 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.154, Rules used = {253, 211} \[ \int \frac {1}{a+b (c+d x)^2} \, dx=\frac {\arctan \left (\frac {\sqrt {b} (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b} d} \]

[In]

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

[Out]

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

Rule 211

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

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}{a+b x^2} \, dx,x,c+d x\right )}{d} \\ & = \frac {\tan ^{-1}\left (\frac {\sqrt {b} (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b} d} \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.11 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.10

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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