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

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

Optimal result

Integrand size = 28, antiderivative size = 80 \[ \int \frac {e+\frac {f}{x^2}}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )} \, dx=\frac {e \sqrt {a+\frac {b}{x^2}} x}{a c}+\frac {(d e-c f) \text {arctanh}\left (\frac {\sqrt {b c-a d}}{\sqrt {c} \sqrt {a+\frac {b}{x^2}} x}\right )}{c^{3/2} \sqrt {b c-a d}} \] Output:

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

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.42 \[ \int \frac {e+\frac {f}{x^2}}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )} \, dx=\frac {\sqrt {c} \sqrt {-b c+a d} e \left (b+a x^2\right )-a (d e-c f) \sqrt {b+a x^2} \arctan \left (\frac {\sqrt {c} \sqrt {b+a x^2}}{\sqrt {-b c+a d}}\right )}{a c^{3/2} \sqrt {-b c+a d} \sqrt {a+\frac {b}{x^2}} x} \] Input:

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

Output:

(Sqrt[c]*Sqrt[-(b*c) + a*d]*e*(b + a*x^2) - a*(d*e - c*f)*Sqrt[b + a*x^2]* 
ArcTan[(Sqrt[c]*Sqrt[b + a*x^2])/Sqrt[-(b*c) + a*d]])/(a*c^(3/2)*Sqrt[-(b* 
c) + a*d]*Sqrt[a + b/x^2]*x)
 

Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.35, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {1021, 746, 899, 382, 25, 27, 291, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {e+\frac {f}{x^2}}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )} \, dx\)

\(\Big \downarrow \) 1021

\(\displaystyle \frac {(d e-c f) \int \frac {1}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )}dx}{d}+\frac {f \int \frac {1}{\sqrt {a+\frac {b}{x^2}}}dx}{d}\)

\(\Big \downarrow \) 746

\(\displaystyle \frac {(d e-c f) \int \frac {1}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )}dx}{d}+\frac {f x \sqrt {a+\frac {b}{x^2}}}{a d}\)

\(\Big \downarrow \) 899

\(\displaystyle \frac {f x \sqrt {a+\frac {b}{x^2}}}{a d}-\frac {(d e-c f) \int \frac {x^2}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )}d\frac {1}{x}}{d}\)

\(\Big \downarrow \) 382

\(\displaystyle \frac {f x \sqrt {a+\frac {b}{x^2}}}{a d}-\frac {(d e-c f) \left (\frac {\int -\frac {a d}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )}d\frac {1}{x}}{a c}-\frac {x \sqrt {a+\frac {b}{x^2}}}{a c}\right )}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {f x \sqrt {a+\frac {b}{x^2}}}{a d}-\frac {(d e-c f) \left (-\frac {\int \frac {a d}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )}d\frac {1}{x}}{a c}-\frac {x \sqrt {a+\frac {b}{x^2}}}{a c}\right )}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {f x \sqrt {a+\frac {b}{x^2}}}{a d}-\frac {(d e-c f) \left (-\frac {d \int \frac {1}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )}d\frac {1}{x}}{c}-\frac {x \sqrt {a+\frac {b}{x^2}}}{a c}\right )}{d}\)

\(\Big \downarrow \) 291

\(\displaystyle \frac {f x \sqrt {a+\frac {b}{x^2}}}{a d}-\frac {(d e-c f) \left (-\frac {d \int \frac {1}{c-\frac {b c-a d}{x^2}}d\frac {1}{\sqrt {a+\frac {b}{x^2}} x}}{c}-\frac {x \sqrt {a+\frac {b}{x^2}}}{a c}\right )}{d}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {f x \sqrt {a+\frac {b}{x^2}}}{a d}-\frac {(d e-c f) \left (-\frac {d \text {arctanh}\left (\frac {\sqrt {b c-a d}}{\sqrt {c} x \sqrt {a+\frac {b}{x^2}}}\right )}{c^{3/2} \sqrt {b c-a d}}-\frac {x \sqrt {a+\frac {b}{x^2}}}{a c}\right )}{d}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 221
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 291
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst 
[Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, 
d}, x] && NeQ[b*c - a*d, 0]
 

rule 382
Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_) 
, x_Symbol] :> Simp[(e*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/ 
(a*c*e*(m + 1))), x] - Simp[1/(a*c*e^2*(m + 1))   Int[(e*x)^(m + 2)*(a + b* 
x^2)^p*(c + d*x^2)^q*Simp[(b*c + a*d)*(m + 3) + 2*(b*c*p + a*d*q) + b*d*(m 
+ 2*p + 2*q + 5)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, p, q}, x] && NeQ[ 
b*c - a*d, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, d, e, m, 2, p, q, x]
 

rule 746
Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^(p + 1) 
/a), x] /; FreeQ[{a, b, n, p}, x] && EqQ[1/n + p + 1, 0]
 

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

rule 1021
Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*Sqrt[(c_) + (d_.)*(x 
_)^(n_)]), x_Symbol] :> Simp[f/b   Int[1/Sqrt[c + d*x^n], x], x] + Simp[(b* 
e - a*f)/b   Int[1/((a + b*x^n)*Sqrt[c + d*x^n]), x], x] /; FreeQ[{a, b, c, 
 d, e, f, n}, x]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(315\) vs. \(2(68)=136\).

Time = 0.18 (sec) , antiderivative size = 316, normalized size of antiderivative = 3.95

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

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 154 vs. \(2 (68) = 136\).

Time = 0.26 (sec) , antiderivative size = 349, normalized size of antiderivative = 4.36 \[ \int \frac {e+\frac {f}{x^2}}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )} \, dx=\left [\frac {4 \, {\left (b c^{2} - a c d\right )} e x \sqrt {\frac {a x^{2} + b}{x^{2}}} - \sqrt {b c^{2} - a c d} {\left (a d e - a c f\right )} \log \left (\frac {a^{2} c^{2} x^{4} + 8 \, b^{2} c^{2} - 8 \, a b c d + a^{2} d^{2} + 2 \, {\left (4 \, a b c^{2} - 3 \, a^{2} c d\right )} x^{2} - 4 \, {\left (a c x^{3} + {\left (2 \, b c - a d\right )} x\right )} \sqrt {b c^{2} - a c d} \sqrt {\frac {a x^{2} + b}{x^{2}}}}{c^{2} x^{4} + 2 \, c d x^{2} + d^{2}}\right )}{4 \, {\left (a b c^{3} - a^{2} c^{2} d\right )}}, \frac {2 \, {\left (b c^{2} - a c d\right )} e x \sqrt {\frac {a x^{2} + b}{x^{2}}} + \sqrt {-b c^{2} + a c d} {\left (a d e - a c f\right )} \arctan \left (-\frac {{\left (a c x^{3} + {\left (2 \, b c - a d\right )} x\right )} \sqrt {-b c^{2} + a c d} \sqrt {\frac {a x^{2} + b}{x^{2}}}}{2 \, {\left (b^{2} c^{2} - a b c d + {\left (a b c^{2} - a^{2} c d\right )} x^{2}\right )}}\right )}{2 \, {\left (a b c^{3} - a^{2} c^{2} d\right )}}\right ] \] Input:

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

Output:

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

Sympy [F]

\[ \int \frac {e+\frac {f}{x^2}}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )} \, dx=\int \frac {e x^{2} + f}{\sqrt {a + \frac {b}{x^{2}}} \left (c x^{2} + d\right )}\, dx \] Input:

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

Output:

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

Maxima [F]

\[ \int \frac {e+\frac {f}{x^2}}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )} \, dx=\int { \frac {e + \frac {f}{x^{2}}}{\sqrt {a + \frac {b}{x^{2}}} {\left (c + \frac {d}{x^{2}}\right )}} \,d x } \] Input:

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 166 vs. \(2 (68) = 136\).

Time = 0.16 (sec) , antiderivative size = 166, normalized size of antiderivative = 2.08 \[ \int \frac {e+\frac {f}{x^2}}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )} \, dx=-\frac {{\left (d e - c f\right )} \arctan \left (\frac {\sqrt {a x^{2} + b} c}{\sqrt {-b c^{2} + a c d}}\right )}{\sqrt {-b c^{2} + a c d} c \mathrm {sgn}\left (x\right )} + \frac {{\left (a d e \arctan \left (\frac {\sqrt {b} c}{\sqrt {-b c^{2} + a c d}}\right ) - a c f \arctan \left (\frac {\sqrt {b} c}{\sqrt {-b c^{2} + a c d}}\right ) - \sqrt {-b c^{2} + a c d} \sqrt {b} e\right )} \mathrm {sgn}\left (x\right )}{\sqrt {-b c^{2} + a c d} a c} + \frac {\sqrt {a x^{2} + b} e}{a c \mathrm {sgn}\left (x\right )} \] Input:

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

Output:

-(d*e - c*f)*arctan(sqrt(a*x^2 + b)*c/sqrt(-b*c^2 + a*c*d))/(sqrt(-b*c^2 + 
 a*c*d)*c*sgn(x)) + (a*d*e*arctan(sqrt(b)*c/sqrt(-b*c^2 + a*c*d)) - a*c*f* 
arctan(sqrt(b)*c/sqrt(-b*c^2 + a*c*d)) - sqrt(-b*c^2 + a*c*d)*sqrt(b)*e)*s 
gn(x)/(sqrt(-b*c^2 + a*c*d)*a*c) + sqrt(a*x^2 + b)*e/(a*c*sgn(x))
 

Mupad [F(-1)]

Timed out. \[ \int \frac {e+\frac {f}{x^2}}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )} \, dx=\int \frac {e+\frac {f}{x^2}}{\sqrt {a+\frac {b}{x^2}}\,\left (c+\frac {d}{x^2}\right )} \,d x \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 203, normalized size of antiderivative = 2.54 \[ \int \frac {e+\frac {f}{x^2}}{\sqrt {a+\frac {b}{x^2}} \left (c+\frac {d}{x^2}\right )} \, dx=\frac {\sqrt {c}\, \sqrt {a d -b c}\, \mathit {atan} \left (\frac {\sqrt {a}\, \sqrt {a \,x^{2}+b}\, c x +a c \,x^{2}+b c}{\sqrt {c}\, \sqrt {a d -b c}\, \sqrt {a \,x^{2}+b}+\sqrt {c}\, \sqrt {a}\, \sqrt {a d -b c}\, x}\right ) a c f -\sqrt {c}\, \sqrt {a d -b c}\, \mathit {atan} \left (\frac {\sqrt {a}\, \sqrt {a \,x^{2}+b}\, c x +a c \,x^{2}+b c}{\sqrt {c}\, \sqrt {a d -b c}\, \sqrt {a \,x^{2}+b}+\sqrt {c}\, \sqrt {a}\, \sqrt {a d -b c}\, x}\right ) a d e +\sqrt {a \,x^{2}+b}\, a c d e -\sqrt {a \,x^{2}+b}\, b \,c^{2} e}{a \,c^{2} \left (a d -b c \right )} \] Input:

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

Output:

(sqrt(c)*sqrt(a*d - b*c)*atan((sqrt(a)*sqrt(a*x**2 + b)*c*x + a*c*x**2 + b 
*c)/(sqrt(c)*sqrt(a*d - b*c)*sqrt(a*x**2 + b) + sqrt(c)*sqrt(a)*sqrt(a*d - 
 b*c)*x))*a*c*f - sqrt(c)*sqrt(a*d - b*c)*atan((sqrt(a)*sqrt(a*x**2 + b)*c 
*x + a*c*x**2 + b*c)/(sqrt(c)*sqrt(a*d - b*c)*sqrt(a*x**2 + b) + sqrt(c)*s 
qrt(a)*sqrt(a*d - b*c)*x))*a*d*e + sqrt(a*x**2 + b)*a*c*d*e - sqrt(a*x**2 
+ b)*b*c**2*e)/(a*c**2*(a*d - b*c))