\(\int \frac {\sqrt {e x} (A+B x^2)}{\sqrt {a+b x^2}} \, dx\) [312]

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

Optimal result

Integrand size = 26, antiderivative size = 299 \[ \int \frac {\sqrt {e x} \left (A+B x^2\right )}{\sqrt {a+b x^2}} \, dx=\frac {2 B (e x)^{3/2} \sqrt {a+b x^2}}{5 b e}+\frac {2 (5 A b-3 a B) \sqrt {e x} \sqrt {a+b x^2}}{5 b^{3/2} \left (\sqrt {a}+\sqrt {b} x\right )}-\frac {2 \sqrt [4]{a} (5 A b-3 a B) \sqrt {e} \left (\sqrt {a}+\sqrt {b} x\right ) \sqrt {\frac {a+b x^2}{\left (\sqrt {a}+\sqrt {b} x\right )^2}} E\left (2 \arctan \left (\frac {\sqrt [4]{b} \sqrt {e x}}{\sqrt [4]{a} \sqrt {e}}\right )|\frac {1}{2}\right )}{5 b^{7/4} \sqrt {a+b x^2}}+\frac {\sqrt [4]{a} (5 A b-3 a B) \sqrt {e} \left (\sqrt {a}+\sqrt {b} x\right ) \sqrt {\frac {a+b x^2}{\left (\sqrt {a}+\sqrt {b} x\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{b} \sqrt {e x}}{\sqrt [4]{a} \sqrt {e}}\right ),\frac {1}{2}\right )}{5 b^{7/4} \sqrt {a+b x^2}} \] Output:

2/5*B*(e*x)^(3/2)*(b*x^2+a)^(1/2)/b/e+2/5*(5*A*b-3*B*a)*(e*x)^(1/2)*(b*x^2 
+a)^(1/2)/b^(3/2)/(a^(1/2)+b^(1/2)*x)-2/5*a^(1/4)*(5*A*b-3*B*a)*e^(1/2)*(a 
^(1/2)+b^(1/2)*x)*((b*x^2+a)/(a^(1/2)+b^(1/2)*x)^2)^(1/2)*EllipticE(sin(2* 
arctan(b^(1/4)*(e*x)^(1/2)/a^(1/4)/e^(1/2))),1/2*2^(1/2))/b^(7/4)/(b*x^2+a 
)^(1/2)+1/5*a^(1/4)*(5*A*b-3*B*a)*e^(1/2)*(a^(1/2)+b^(1/2)*x)*((b*x^2+a)/( 
a^(1/2)+b^(1/2)*x)^2)^(1/2)*InverseJacobiAM(2*arctan(b^(1/4)*(e*x)^(1/2)/a 
^(1/4)/e^(1/2)),1/2*2^(1/2))/b^(7/4)/(b*x^2+a)^(1/2)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 10.05 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.27 \[ \int \frac {\sqrt {e x} \left (A+B x^2\right )}{\sqrt {a+b x^2}} \, dx=\frac {2 x \sqrt {e x} \left (3 B \left (a+b x^2\right )+(5 A b-3 a B) \sqrt {1+\frac {b x^2}{a}} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{4},\frac {7}{4},-\frac {b x^2}{a}\right )\right )}{15 b \sqrt {a+b x^2}} \] Input:

Integrate[(Sqrt[e*x]*(A + B*x^2))/Sqrt[a + b*x^2],x]
 

Output:

(2*x*Sqrt[e*x]*(3*B*(a + b*x^2) + (5*A*b - 3*a*B)*Sqrt[1 + (b*x^2)/a]*Hype 
rgeometric2F1[1/2, 3/4, 7/4, -((b*x^2)/a)]))/(15*b*Sqrt[a + b*x^2])
 

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 322, normalized size of antiderivative = 1.08, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {363, 266, 834, 27, 761, 1510}

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 {\sqrt {e x} \left (A+B x^2\right )}{\sqrt {a+b x^2}} \, dx\)

\(\Big \downarrow \) 363

\(\displaystyle \frac {(5 A b-3 a B) \int \frac {\sqrt {e x}}{\sqrt {b x^2+a}}dx}{5 b}+\frac {2 B (e x)^{3/2} \sqrt {a+b x^2}}{5 b e}\)

\(\Big \downarrow \) 266

\(\displaystyle \frac {2 (5 A b-3 a B) \int \frac {e x}{\sqrt {b x^2+a}}d\sqrt {e x}}{5 b e}+\frac {2 B (e x)^{3/2} \sqrt {a+b x^2}}{5 b e}\)

\(\Big \downarrow \) 834

\(\displaystyle \frac {2 (5 A b-3 a B) \left (\frac {\sqrt {a} e \int \frac {1}{\sqrt {b x^2+a}}d\sqrt {e x}}{\sqrt {b}}-\frac {\sqrt {a} e \int \frac {\sqrt {a} e-\sqrt {b} e x}{\sqrt {a} e \sqrt {b x^2+a}}d\sqrt {e x}}{\sqrt {b}}\right )}{5 b e}+\frac {2 B (e x)^{3/2} \sqrt {a+b x^2}}{5 b e}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {2 (5 A b-3 a B) \left (\frac {\sqrt {a} e \int \frac {1}{\sqrt {b x^2+a}}d\sqrt {e x}}{\sqrt {b}}-\frac {\int \frac {\sqrt {a} e-\sqrt {b} e x}{\sqrt {b x^2+a}}d\sqrt {e x}}{\sqrt {b}}\right )}{5 b e}+\frac {2 B (e x)^{3/2} \sqrt {a+b x^2}}{5 b e}\)

\(\Big \downarrow \) 761

\(\displaystyle \frac {2 (5 A b-3 a B) \left (\frac {\sqrt [4]{a} \sqrt {e} \left (\sqrt {a} e+\sqrt {b} e x\right ) \sqrt {\frac {a e^2+b e^2 x^2}{\left (\sqrt {a} e+\sqrt {b} e x\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{b} \sqrt {e x}}{\sqrt [4]{a} \sqrt {e}}\right ),\frac {1}{2}\right )}{2 b^{3/4} \sqrt {a+b x^2}}-\frac {\int \frac {\sqrt {a} e-\sqrt {b} e x}{\sqrt {b x^2+a}}d\sqrt {e x}}{\sqrt {b}}\right )}{5 b e}+\frac {2 B (e x)^{3/2} \sqrt {a+b x^2}}{5 b e}\)

\(\Big \downarrow \) 1510

\(\displaystyle \frac {2 (5 A b-3 a B) \left (\frac {\sqrt [4]{a} \sqrt {e} \left (\sqrt {a} e+\sqrt {b} e x\right ) \sqrt {\frac {a e^2+b e^2 x^2}{\left (\sqrt {a} e+\sqrt {b} e x\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{b} \sqrt {e x}}{\sqrt [4]{a} \sqrt {e}}\right ),\frac {1}{2}\right )}{2 b^{3/4} \sqrt {a+b x^2}}-\frac {\frac {\sqrt [4]{a} \sqrt {e} \left (\sqrt {a} e+\sqrt {b} e x\right ) \sqrt {\frac {a e^2+b e^2 x^2}{\left (\sqrt {a} e+\sqrt {b} e x\right )^2}} E\left (2 \arctan \left (\frac {\sqrt [4]{b} \sqrt {e x}}{\sqrt [4]{a} \sqrt {e}}\right )|\frac {1}{2}\right )}{\sqrt [4]{b} \sqrt {a+b x^2}}-\frac {e^2 \sqrt {e x} \sqrt {a+b x^2}}{\sqrt {a} e+\sqrt {b} e x}}{\sqrt {b}}\right )}{5 b e}+\frac {2 B (e x)^{3/2} \sqrt {a+b x^2}}{5 b e}\)

Input:

Int[(Sqrt[e*x]*(A + B*x^2))/Sqrt[a + b*x^2],x]
 

Output:

(2*B*(e*x)^(3/2)*Sqrt[a + b*x^2])/(5*b*e) + (2*(5*A*b - 3*a*B)*(-((-((e^2* 
Sqrt[e*x]*Sqrt[a + b*x^2])/(Sqrt[a]*e + Sqrt[b]*e*x)) + (a^(1/4)*Sqrt[e]*( 
Sqrt[a]*e + Sqrt[b]*e*x)*Sqrt[(a*e^2 + b*e^2*x^2)/(Sqrt[a]*e + Sqrt[b]*e*x 
)^2]*EllipticE[2*ArcTan[(b^(1/4)*Sqrt[e*x])/(a^(1/4)*Sqrt[e])], 1/2])/(b^( 
1/4)*Sqrt[a + b*x^2]))/Sqrt[b]) + (a^(1/4)*Sqrt[e]*(Sqrt[a]*e + Sqrt[b]*e* 
x)*Sqrt[(a*e^2 + b*e^2*x^2)/(Sqrt[a]*e + Sqrt[b]*e*x)^2]*EllipticF[2*ArcTa 
n[(b^(1/4)*Sqrt[e*x])/(a^(1/4)*Sqrt[e])], 1/2])/(2*b^(3/4)*Sqrt[a + b*x^2] 
)))/(5*b*e)
 

Defintions of rubi rules used

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 266
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{k = De 
nominator[m]}, Simp[k/c   Subst[Int[x^(k*(m + 1) - 1)*(a + b*(x^(2*k)/c^2)) 
^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && FractionQ[m] && I 
ntBinomialQ[a, b, c, 2, m, p, x]
 

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

rule 761
Int[1/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b/a, 4]}, Simp[( 
1 + q^2*x^2)*(Sqrt[(a + b*x^4)/(a*(1 + q^2*x^2)^2)]/(2*q*Sqrt[a + b*x^4]))* 
EllipticF[2*ArcTan[q*x], 1/2], x]] /; FreeQ[{a, b}, x] && PosQ[b/a]
 

rule 834
Int[(x_)^2/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b/a, 2]}, S 
imp[1/q   Int[1/Sqrt[a + b*x^4], x], x] - Simp[1/q   Int[(1 - q*x^2)/Sqrt[a 
 + b*x^4], x], x]] /; FreeQ[{a, b}, x] && PosQ[b/a]
 

rule 1510
Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (c_.)*(x_)^4], x_Symbol] :> With[{q = 
 Rt[c/a, 4]}, Simp[(-d)*x*(Sqrt[a + c*x^4]/(a*(1 + q^2*x^2))), x] + Simp[d* 
(1 + q^2*x^2)*(Sqrt[(a + c*x^4)/(a*(1 + q^2*x^2)^2)]/(q*Sqrt[a + c*x^4]))*E 
llipticE[2*ArcTan[q*x], 1/2], x] /; EqQ[e + d*q^2, 0]] /; FreeQ[{a, c, d, e 
}, x] && PosQ[c/a]
 
Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 222, normalized size of antiderivative = 0.74

method result size
risch \(\frac {2 B \,x^{2} \sqrt {b \,x^{2}+a}\, e}{5 b \sqrt {e x}}+\frac {\left (5 A b -3 B a \right ) \sqrt {-a b}\, \sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}\, \sqrt {-\frac {2 \left (x -\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}\, \sqrt {-\frac {b x}{\sqrt {-a b}}}\, \left (-\frac {2 \sqrt {-a b}\, \operatorname {EllipticE}\left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right )}{b}+\frac {\sqrt {-a b}\, \operatorname {EllipticF}\left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right )}{b}\right ) e \sqrt {\left (b \,x^{2}+a \right ) e x}}{5 b^{2} \sqrt {b e \,x^{3}+a e x}\, \sqrt {e x}\, \sqrt {b \,x^{2}+a}}\) \(222\)
elliptic \(\frac {\sqrt {e x}\, \sqrt {\left (b \,x^{2}+a \right ) e x}\, \left (\frac {2 B x \sqrt {b e \,x^{3}+a e x}}{5 b}+\frac {\left (A e -\frac {3 B a e}{5 b}\right ) \sqrt {-a b}\, \sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}\, \sqrt {-\frac {2 \left (x -\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}\, \sqrt {-\frac {b x}{\sqrt {-a b}}}\, \left (-\frac {2 \sqrt {-a b}\, \operatorname {EllipticE}\left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right )}{b}+\frac {\sqrt {-a b}\, \operatorname {EllipticF}\left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right )}{b}\right )}{b \sqrt {b e \,x^{3}+a e x}}\right )}{e x \sqrt {b \,x^{2}+a}}\) \(226\)
default \(\frac {\sqrt {e x}\, \left (10 A \sqrt {2}\, \sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {\frac {-b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {-\frac {b x}{\sqrt {-a b}}}\, \operatorname {EllipticE}\left (\sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right ) a b -5 A \sqrt {2}\, \sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {\frac {-b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {-\frac {b x}{\sqrt {-a b}}}\, \operatorname {EllipticF}\left (\sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right ) a b -6 B \sqrt {2}\, \sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {\frac {-b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {-\frac {b x}{\sqrt {-a b}}}\, \operatorname {EllipticE}\left (\sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right ) a^{2}+3 B \sqrt {2}\, \sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {\frac {-b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {-\frac {b x}{\sqrt {-a b}}}\, \operatorname {EllipticF}\left (\sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right ) a^{2}+2 b^{2} B \,x^{4}+2 B a b \,x^{2}\right )}{5 \sqrt {b \,x^{2}+a}\, b^{2} x}\) \(379\)

Input:

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

Output:

2/5*B*x^2/b*(b*x^2+a)^(1/2)*e/(e*x)^(1/2)+1/5*(5*A*b-3*B*a)/b^2*(-a*b)^(1/ 
2)*((x+1/b*(-a*b)^(1/2))*b/(-a*b)^(1/2))^(1/2)*(-2*(x-1/b*(-a*b)^(1/2))*b/ 
(-a*b)^(1/2))^(1/2)*(-b/(-a*b)^(1/2)*x)^(1/2)/(b*e*x^3+a*e*x)^(1/2)*(-2/b* 
(-a*b)^(1/2)*EllipticE(((x+1/b*(-a*b)^(1/2))*b/(-a*b)^(1/2))^(1/2),1/2*2^( 
1/2))+1/b*(-a*b)^(1/2)*EllipticF(((x+1/b*(-a*b)^(1/2))*b/(-a*b)^(1/2))^(1/ 
2),1/2*2^(1/2)))*e*((b*x^2+a)*e*x)^(1/2)/(e*x)^(1/2)/(b*x^2+a)^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.19 \[ \int \frac {\sqrt {e x} \left (A+B x^2\right )}{\sqrt {a+b x^2}} \, dx=\frac {2 \, {\left (\sqrt {b x^{2} + a} \sqrt {e x} B b x + {\left (3 \, B a - 5 \, A b\right )} \sqrt {b e} {\rm weierstrassZeta}\left (-\frac {4 \, a}{b}, 0, {\rm weierstrassPInverse}\left (-\frac {4 \, a}{b}, 0, x\right )\right )\right )}}{5 \, b^{2}} \] Input:

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

Output:

2/5*(sqrt(b*x^2 + a)*sqrt(e*x)*B*b*x + (3*B*a - 5*A*b)*sqrt(b*e)*weierstra 
ssZeta(-4*a/b, 0, weierstrassPInverse(-4*a/b, 0, x)))/b^2
 

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 2.76 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.31 \[ \int \frac {\sqrt {e x} \left (A+B x^2\right )}{\sqrt {a+b x^2}} \, dx=\frac {A \sqrt {e} x^{\frac {3}{2}} \Gamma \left (\frac {3}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4} \\ \frac {7}{4} \end {matrix}\middle | {\frac {b x^{2} e^{i \pi }}{a}} \right )}}{2 \sqrt {a} \Gamma \left (\frac {7}{4}\right )} + \frac {B \sqrt {e} x^{\frac {7}{2}} \Gamma \left (\frac {7}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, \frac {7}{4} \\ \frac {11}{4} \end {matrix}\middle | {\frac {b x^{2} e^{i \pi }}{a}} \right )}}{2 \sqrt {a} \Gamma \left (\frac {11}{4}\right )} \] Input:

integrate((e*x)**(1/2)*(B*x**2+A)/(b*x**2+a)**(1/2),x)
 

Output:

A*sqrt(e)*x**(3/2)*gamma(3/4)*hyper((1/2, 3/4), (7/4,), b*x**2*exp_polar(I 
*pi)/a)/(2*sqrt(a)*gamma(7/4)) + B*sqrt(e)*x**(7/2)*gamma(7/4)*hyper((1/2, 
 7/4), (11/4,), b*x**2*exp_polar(I*pi)/a)/(2*sqrt(a)*gamma(11/4))
 

Maxima [F]

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

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

Output:

integrate((B*x^2 + A)*sqrt(e*x)/sqrt(b*x^2 + a), x)
 

Giac [F]

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

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

Output:

integrate((B*x^2 + A)*sqrt(e*x)/sqrt(b*x^2 + a), x)
 

Mupad [F(-1)]

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

int(((A + B*x^2)*(e*x)^(1/2))/(a + b*x^2)^(1/2),x)
 

Output:

int(((A + B*x^2)*(e*x)^(1/2))/(a + b*x^2)^(1/2), x)
                                                                                    
                                                                                    
 

Reduce [F]

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

int((e*x)^(1/2)*(B*x^2+A)/(b*x^2+a)^(1/2),x)
 

Output:

(2*sqrt(e)*(sqrt(x)*sqrt(a + b*x**2)*x + int((sqrt(x)*sqrt(a + b*x**2))/(a 
 + b*x**2),x)*a))/5