3.1.49 \(\int \frac {\sqrt {a+b x^2}}{c+d x^2} \, dx\) [49]

Optimal. Leaf size=82 \[ \frac {\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{d}-\frac {\sqrt {b c-a d} \tanh ^{-1}\left (\frac {\sqrt {b c-a d} x}{\sqrt {c} \sqrt {a+b x^2}}\right )}{\sqrt {c} d} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {399, 223, 212, 385, 214} \begin {gather*} \frac {\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{d}-\frac {\sqrt {b c-a d} \tanh ^{-1}\left (\frac {x \sqrt {b c-a d}}{\sqrt {c} \sqrt {a+b x^2}}\right )}{\sqrt {c} d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b*x^2]/(c + d*x^2),x]

[Out]

(Sqrt[b]*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/d - (Sqrt[b*c - a*d]*ArcTanh[(Sqrt[b*c - a*d]*x)/(Sqrt[c]*Sqrt[
a + b*x^2])])/(Sqrt[c]*d)

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])

Rule 214

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

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 399

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Dist[b/d, Int[(a + b*x^n)^(p - 1), x]
, x] - Dist[(b*c - a*d)/d, Int[(a + b*x^n)^(p - 1)/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c
 - a*d, 0] && EqQ[n*(p - 1) + 1, 0] && IntegerQ[n]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.20, size = 99, normalized size = 1.21 \begin {gather*} -\frac {\frac {\sqrt {-b c+a d} \tan ^{-1}\left (\frac {-d x \sqrt {a+b x^2}+\sqrt {b} \left (c+d x^2\right )}{\sqrt {c} \sqrt {-b c+a d}}\right )}{\sqrt {c}}+\sqrt {b} \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + b*x^2]/(c + d*x^2),x]

[Out]

-(((Sqrt[-(b*c) + a*d]*ArcTan[(-(d*x*Sqrt[a + b*x^2]) + Sqrt[b]*(c + d*x^2))/(Sqrt[c]*Sqrt[-(b*c) + a*d])])/Sq
rt[c] + Sqrt[b]*Log[-(Sqrt[b]*x) + Sqrt[a + b*x^2]])/d)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(644\) vs. \(2(66)=132\).
time = 0.13, size = 645, normalized size = 7.87

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 1.15, size = 596, normalized size = 7.27 \begin {gather*} \left [\frac {2 \, \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + \sqrt {\frac {b c - a d}{c}} \log \left (\frac {{\left (8 \, b^{2} c^{2} - 8 \, a b c d + a^{2} d^{2}\right )} x^{4} + a^{2} c^{2} + 2 \, {\left (4 \, a b c^{2} - 3 \, a^{2} c d\right )} x^{2} - 4 \, {\left (a c^{2} x + {\left (2 \, b c^{2} - a c d\right )} x^{3}\right )} \sqrt {b x^{2} + a} \sqrt {\frac {b c - a d}{c}}}{d^{2} x^{4} + 2 \, c d x^{2} + c^{2}}\right )}{4 \, d}, -\frac {4 \, \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - \sqrt {\frac {b c - a d}{c}} \log \left (\frac {{\left (8 \, b^{2} c^{2} - 8 \, a b c d + a^{2} d^{2}\right )} x^{4} + a^{2} c^{2} + 2 \, {\left (4 \, a b c^{2} - 3 \, a^{2} c d\right )} x^{2} - 4 \, {\left (a c^{2} x + {\left (2 \, b c^{2} - a c d\right )} x^{3}\right )} \sqrt {b x^{2} + a} \sqrt {\frac {b c - a d}{c}}}{d^{2} x^{4} + 2 \, c d x^{2} + c^{2}}\right )}{4 \, d}, \frac {\sqrt {-\frac {b c - a d}{c}} \arctan \left (\frac {{\left ({\left (2 \, b c - a d\right )} x^{2} + a c\right )} \sqrt {b x^{2} + a} \sqrt {-\frac {b c - a d}{c}}}{2 \, {\left ({\left (b^{2} c - a b d\right )} x^{3} + {\left (a b c - a^{2} d\right )} x\right )}}\right ) + \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right )}{2 \, d}, -\frac {2 \, \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - \sqrt {-\frac {b c - a d}{c}} \arctan \left (\frac {{\left ({\left (2 \, b c - a d\right )} x^{2} + a c\right )} \sqrt {b x^{2} + a} \sqrt {-\frac {b c - a d}{c}}}{2 \, {\left ({\left (b^{2} c - a b d\right )} x^{3} + {\left (a b c - a^{2} d\right )} x\right )}}\right )}{2 \, d}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[1/4*(2*sqrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + sqrt((b*c - a*d)/c)*log(((8*b^2*c^2 - 8*a*b*
c*d + a^2*d^2)*x^4 + a^2*c^2 + 2*(4*a*b*c^2 - 3*a^2*c*d)*x^2 - 4*(a*c^2*x + (2*b*c^2 - a*c*d)*x^3)*sqrt(b*x^2
+ a)*sqrt((b*c - a*d)/c))/(d^2*x^4 + 2*c*d*x^2 + c^2)))/d, -1/4*(4*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a))
 - sqrt((b*c - a*d)/c)*log(((8*b^2*c^2 - 8*a*b*c*d + a^2*d^2)*x^4 + a^2*c^2 + 2*(4*a*b*c^2 - 3*a^2*c*d)*x^2 -
4*(a*c^2*x + (2*b*c^2 - a*c*d)*x^3)*sqrt(b*x^2 + a)*sqrt((b*c - a*d)/c))/(d^2*x^4 + 2*c*d*x^2 + c^2)))/d, 1/2*
(sqrt(-(b*c - a*d)/c)*arctan(1/2*((2*b*c - a*d)*x^2 + a*c)*sqrt(b*x^2 + a)*sqrt(-(b*c - a*d)/c)/((b^2*c - a*b*
d)*x^3 + (a*b*c - a^2*d)*x)) + sqrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a))/d, -1/2*(2*sqrt(-b)*ar
ctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - sqrt(-(b*c - a*d)/c)*arctan(1/2*((2*b*c - a*d)*x^2 + a*c)*sqrt(b*x^2 + a)*s
qrt(-(b*c - a*d)/c)/((b^2*c - a*b*d)*x^3 + (a*b*c - a^2*d)*x)))/d]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a + b x^{2}}}{c + d x^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(a + b*x**2)/(c + d*x**2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sage0*x

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \left \{\begin {array}{cl} \frac {\sqrt {-b}\,\mathrm {asin}\left (x\,\sqrt {-\frac {b}{a}}\right )}{c} & \text {\ if\ \ }\left (\left (a+b\,c=0\wedge d=-1\right )\vee a\,d=b\,c\right )\wedge b<0\\ \frac {\sqrt {b}\,\ln \left (2\,\sqrt {b}\,x+2\,\sqrt {b\,x^2+a}\right )}{d}+\frac {\mathrm {atan}\left (\frac {x\,\sqrt {a\,d-b\,c}}{\sqrt {c}\,\sqrt {b\,x^2+a}}\right )\,\sqrt {a\,d-b\,c}}{\sqrt {c}\,d} & \text {\ if\ \ }a\neq 0\wedge \left (\left (\left (a+b\,c\neq 0\vee d\neq -1\right )\wedge a\,d\neq b\,c\right )\vee \neg b<0\right )\\ \int \frac {\sqrt {b\,x^2+a}}{d\,x^2+c} \,d x & \text {\ if\ \ }\left (\left (\left (\left (a+b\,c=0\wedge d=-1\right )\vee a\,d=b\,c\right )\wedge b<0\right )\vee a=0\right )\wedge \left (\left (\left (a+b\,c\neq 0\vee d\neq -1\right )\wedge a\,d\neq b\,c\right )\vee \neg b<0\right ) \end {array}\right . \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

piecewise((a + b*c == 0 & d == -1 | a*d == b*c) & b < 0, ((-b)^(1/2)*asin(x*(-b/a)^(1/2)))/c, a ~= 0 & ((a + b
*c ~= 0 | d ~= -1) & a*d ~= b*c | ~b < 0), (b^(1/2)*log(2*b^(1/2)*x + 2*(a + b*x^2)^(1/2)))/d + (atan((x*(a*d
- b*c)^(1/2))/(c^(1/2)*(a + b*x^2)^(1/2)))*(a*d - b*c)^(1/2))/(c^(1/2)*d), ((a + b*c == 0 & d == -1 | a*d == b
*c) & b < 0 | a == 0) & ((a + b*c ~= 0 | d ~= -1) & a*d ~= b*c | ~b < 0), int((a + b*x^2)^(1/2)/(c + d*x^2), x
))

________________________________________________________________________________________