\(\int \frac {A C+(B C+A D) x^2+B D x^4}{\sqrt {a-b x} \sqrt {a+b x}} \, dx\) [15]

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

Optimal result

Integrand size = 41, antiderivative size = 137 \[ \int \frac {A C+(B C+A D) x^2+B D x^4}{\sqrt {a-b x} \sqrt {a+b x}} \, dx=-\frac {\left (3 a^2 B D+4 b^2 (B C+A D)\right ) x \sqrt {a-b x} \sqrt {a+b x}}{8 b^4}-\frac {B D x^3 \sqrt {a-b x} \sqrt {a+b x}}{4 b^2}+\frac {\left (8 A b^4 C+3 a^4 B D+4 a^2 b^2 (B C+A D)\right ) \arctan \left (\frac {\sqrt {a+b x}}{\sqrt {a-b x}}\right )}{4 b^5} \] Output:

-1/8*(3*a^2*B*D+4*b^2*(A*D+B*C))*x*(-b*x+a)^(1/2)*(b*x+a)^(1/2)/b^4-1/4*B* 
D*x^3*(-b*x+a)^(1/2)*(b*x+a)^(1/2)/b^2+1/4*(8*A*b^4*C+3*a^4*B*D+4*a^2*b^2* 
(A*D+B*C))*arctan((b*x+a)^(1/2)/(-b*x+a)^(1/2))/b^5
 

Mathematica [A] (verified)

Time = 0.25 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.85 \[ \int \frac {A C+(B C+A D) x^2+B D x^4}{\sqrt {a-b x} \sqrt {a+b x}} \, dx=\frac {-b x \sqrt {a-b x} \sqrt {a+b x} \left (3 a^2 B D+2 b^2 \left (2 B C+2 A D+B D x^2\right )\right )+2 \left (8 A b^4 C+4 a^2 b^2 B C+4 a^2 A b^2 D+3 a^4 B D\right ) \arctan \left (\frac {\sqrt {a+b x}}{\sqrt {a-b x}}\right )}{8 b^5} \] Input:

Integrate[(A*C + (B*C + A*D)*x^2 + B*D*x^4)/(Sqrt[a - b*x]*Sqrt[a + b*x]), 
x]
 

Output:

(-(b*x*Sqrt[a - b*x]*Sqrt[a + b*x]*(3*a^2*B*D + 2*b^2*(2*B*C + 2*A*D + B*D 
*x^2))) + 2*(8*A*b^4*C + 4*a^2*b^2*B*C + 4*a^2*A*b^2*D + 3*a^4*B*D)*ArcTan 
[Sqrt[a + b*x]/Sqrt[a - b*x]])/(8*b^5)
 

Rubi [A] (verified)

Time = 0.62 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.24, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {1789, 1473, 25, 299, 224, 216}

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

\(\Big \downarrow \) 1789

\(\displaystyle \frac {\sqrt {a^2-b^2 x^2} \int \frac {B D x^4+(B C+A D) x^2+A C}{\sqrt {a^2-b^2 x^2}}dx}{\sqrt {a-b x} \sqrt {a+b x}}\)

\(\Big \downarrow \) 1473

\(\displaystyle \frac {\sqrt {a^2-b^2 x^2} \left (-\frac {\int -\frac {4 A C b^2+\left (3 B D a^2+4 b^2 (B C+A D)\right ) x^2}{\sqrt {a^2-b^2 x^2}}dx}{4 b^2}-\frac {B D x^3 \sqrt {a^2-b^2 x^2}}{4 b^2}\right )}{\sqrt {a-b x} \sqrt {a+b x}}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\sqrt {a^2-b^2 x^2} \left (\frac {\int \frac {4 A C b^2+\left (3 B D a^2+4 b^2 (B C+A D)\right ) x^2}{\sqrt {a^2-b^2 x^2}}dx}{4 b^2}-\frac {B D x^3 \sqrt {a^2-b^2 x^2}}{4 b^2}\right )}{\sqrt {a-b x} \sqrt {a+b x}}\)

\(\Big \downarrow \) 299

\(\displaystyle \frac {\sqrt {a^2-b^2 x^2} \left (\frac {\frac {\left (3 a^4 B D+4 a^2 b^2 (A D+B C)+8 A b^4 C\right ) \int \frac {1}{\sqrt {a^2-b^2 x^2}}dx}{2 b^2}-\frac {1}{2} x \sqrt {a^2-b^2 x^2} \left (\frac {3 a^2 B D}{b^2}+4 A D+4 B C\right )}{4 b^2}-\frac {B D x^3 \sqrt {a^2-b^2 x^2}}{4 b^2}\right )}{\sqrt {a-b x} \sqrt {a+b x}}\)

\(\Big \downarrow \) 224

\(\displaystyle \frac {\sqrt {a^2-b^2 x^2} \left (\frac {\frac {\left (3 a^4 B D+4 a^2 b^2 (A D+B C)+8 A b^4 C\right ) \int \frac {1}{\frac {b^2 x^2}{a^2-b^2 x^2}+1}d\frac {x}{\sqrt {a^2-b^2 x^2}}}{2 b^2}-\frac {1}{2} x \sqrt {a^2-b^2 x^2} \left (\frac {3 a^2 B D}{b^2}+4 A D+4 B C\right )}{4 b^2}-\frac {B D x^3 \sqrt {a^2-b^2 x^2}}{4 b^2}\right )}{\sqrt {a-b x} \sqrt {a+b x}}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\sqrt {a^2-b^2 x^2} \left (\frac {\frac {\arctan \left (\frac {b x}{\sqrt {a^2-b^2 x^2}}\right ) \left (3 a^4 B D+4 a^2 b^2 (A D+B C)+8 A b^4 C\right )}{2 b^3}-\frac {1}{2} x \sqrt {a^2-b^2 x^2} \left (\frac {3 a^2 B D}{b^2}+4 A D+4 B C\right )}{4 b^2}-\frac {B D x^3 \sqrt {a^2-b^2 x^2}}{4 b^2}\right )}{\sqrt {a-b x} \sqrt {a+b x}}\)

Input:

Int[(A*C + (B*C + A*D)*x^2 + B*D*x^4)/(Sqrt[a - b*x]*Sqrt[a + b*x]),x]
 

Output:

(Sqrt[a^2 - b^2*x^2]*(-1/4*(B*D*x^3*Sqrt[a^2 - b^2*x^2])/b^2 + (-1/2*((4*B 
*C + 4*A*D + (3*a^2*B*D)/b^2)*x*Sqrt[a^2 - b^2*x^2]) + ((8*A*b^4*C + 3*a^4 
*B*D + 4*a^2*b^2*(B*C + A*D))*ArcTan[(b*x)/Sqrt[a^2 - b^2*x^2]])/(2*b^3))/ 
(4*b^2)))/(Sqrt[a - b*x]*Sqrt[a + b*x])
 

Defintions of rubi rules used

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

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

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

rule 1473
Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), 
x_Symbol] :> Simp[c^p*x^(4*p - 1)*((d + e*x^2)^(q + 1)/(e*(4*p + 2*q + 1))) 
, x] + Simp[1/(e*(4*p + 2*q + 1))   Int[(d + e*x^2)^q*ExpandToSum[e*(4*p + 
2*q + 1)*(a + b*x^2 + c*x^4)^p - d*c^p*(4*p - 1)*x^(4*p - 2) - e*c^p*(4*p + 
 2*q + 1)*x^(4*p), x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b^2 - 
4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] &&  !LtQ[q, -1]
 

rule 1789
Int[((d1_) + (e1_.)*(x_)^(non2_.))^(q_.)*((d2_) + (e2_.)*(x_)^(non2_.))^(q_ 
.)*((a_.) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_))^(p_.), x_Symbol] :> Simp[(d 
1 + e1*x^(n/2))^FracPart[q]*((d2 + e2*x^(n/2))^FracPart[q]/(d1*d2 + e1*e2*x 
^n)^FracPart[q])   Int[(d1*d2 + e1*e2*x^n)^q*(a + b*x^n + c*x^(2*n))^p, x], 
 x] /; FreeQ[{a, b, c, d1, e1, d2, e2, n, p, q}, x] && EqQ[n2, 2*n] && EqQ[ 
non2, n/2] && EqQ[d2*e1 + d1*e2, 0]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.27 (sec) , antiderivative size = 251, normalized size of antiderivative = 1.83

method result size
default \(\frac {\sqrt {-b x +a}\, \sqrt {b x +a}\, \left (-2 B D \,\operatorname {csgn}\left (b \right ) b^{3} x^{3} \sqrt {-b^{2} x^{2}+a^{2}}-4 A D \,\operatorname {csgn}\left (b \right ) b^{3} \sqrt {-b^{2} x^{2}+a^{2}}\, x -4 B C \,\operatorname {csgn}\left (b \right ) b^{3} \sqrt {-b^{2} x^{2}+a^{2}}\, x -3 B D \,\operatorname {csgn}\left (b \right ) b \sqrt {-b^{2} x^{2}+a^{2}}\, a^{2} x +8 A C \arctan \left (\frac {\operatorname {csgn}\left (b \right ) b x}{\sqrt {-b^{2} x^{2}+a^{2}}}\right ) b^{4}+4 A D \arctan \left (\frac {\operatorname {csgn}\left (b \right ) b x}{\sqrt {-b^{2} x^{2}+a^{2}}}\right ) a^{2} b^{2}+4 B C \arctan \left (\frac {\operatorname {csgn}\left (b \right ) b x}{\sqrt {-b^{2} x^{2}+a^{2}}}\right ) a^{2} b^{2}+3 B D \arctan \left (\frac {\operatorname {csgn}\left (b \right ) b x}{\sqrt {-b^{2} x^{2}+a^{2}}}\right ) a^{4}\right ) \operatorname {csgn}\left (b \right )}{8 b^{5} \sqrt {-b^{2} x^{2}+a^{2}}}\) \(251\)

Input:

int((A*C+(A*D+B*C)*x^2+B*D*x^4)/(-b*x+a)^(1/2)/(b*x+a)^(1/2),x,method=_RET 
URNVERBOSE)
 

Output:

1/8*(-b*x+a)^(1/2)*(b*x+a)^(1/2)*(-2*B*D*csgn(b)*b^3*x^3*(-b^2*x^2+a^2)^(1 
/2)-4*A*D*csgn(b)*b^3*(-b^2*x^2+a^2)^(1/2)*x-4*B*C*csgn(b)*b^3*(-b^2*x^2+a 
^2)^(1/2)*x-3*B*D*csgn(b)*b*(-b^2*x^2+a^2)^(1/2)*a^2*x+8*A*C*arctan(csgn(b 
)*b*x/(-b^2*x^2+a^2)^(1/2))*b^4+4*A*D*arctan(csgn(b)*b*x/(-b^2*x^2+a^2)^(1 
/2))*a^2*b^2+4*B*C*arctan(csgn(b)*b*x/(-b^2*x^2+a^2)^(1/2))*a^2*b^2+3*B*D* 
arctan(csgn(b)*b*x/(-b^2*x^2+a^2)^(1/2))*a^4)*csgn(b)/b^5/(-b^2*x^2+a^2)^( 
1/2)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.85 \[ \int \frac {A C+(B C+A D) x^2+B D x^4}{\sqrt {a-b x} \sqrt {a+b x}} \, dx=-\frac {{\left (2 \, B D b^{3} x^{3} + {\left (3 \, B D a^{2} b + 4 \, {\left (B C + A D\right )} b^{3}\right )} x\right )} \sqrt {b x + a} \sqrt {-b x + a} + 2 \, {\left (3 \, B D a^{4} + 8 \, A C b^{4} + 4 \, {\left (B C + A D\right )} a^{2} b^{2}\right )} \arctan \left (\frac {\sqrt {b x + a} \sqrt {-b x + a} - a}{b x}\right )}{8 \, b^{5}} \] Input:

integrate((A*C+(A*D+B*C)*x^2+B*D*x^4)/(-b*x+a)^(1/2)/(b*x+a)^(1/2),x, algo 
rithm="fricas")
 

Output:

-1/8*((2*B*D*b^3*x^3 + (3*B*D*a^2*b + 4*(B*C + A*D)*b^3)*x)*sqrt(b*x + a)* 
sqrt(-b*x + a) + 2*(3*B*D*a^4 + 8*A*C*b^4 + 4*(B*C + A*D)*a^2*b^2)*arctan( 
(sqrt(b*x + a)*sqrt(-b*x + a) - a)/(b*x)))/b^5
 

Sympy [F(-1)]

Timed out. \[ \int \frac {A C+(B C+A D) x^2+B D x^4}{\sqrt {a-b x} \sqrt {a+b x}} \, dx=\text {Timed out} \] Input:

integrate((A*C+(A*D+B*C)*x**2+B*D*x**4)/(-b*x+a)**(1/2)/(b*x+a)**(1/2),x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.94 \[ \int \frac {A C+(B C+A D) x^2+B D x^4}{\sqrt {a-b x} \sqrt {a+b x}} \, dx=-\frac {\sqrt {-b^{2} x^{2} + a^{2}} B D x^{3}}{4 \, b^{2}} + \frac {3 \, B D a^{4} \arcsin \left (\frac {b x}{a}\right )}{8 \, b^{5}} + \frac {A C \arcsin \left (\frac {b x}{a}\right )}{b} - \frac {3 \, \sqrt {-b^{2} x^{2} + a^{2}} B D a^{2} x}{8 \, b^{4}} + \frac {{\left (B C + A D\right )} a^{2} \arcsin \left (\frac {b x}{a}\right )}{2 \, b^{3}} - \frac {\sqrt {-b^{2} x^{2} + a^{2}} {\left (B C + A D\right )} x}{2 \, b^{2}} \] Input:

integrate((A*C+(A*D+B*C)*x^2+B*D*x^4)/(-b*x+a)^(1/2)/(b*x+a)^(1/2),x, algo 
rithm="maxima")
 

Output:

-1/4*sqrt(-b^2*x^2 + a^2)*B*D*x^3/b^2 + 3/8*B*D*a^4*arcsin(b*x/a)/b^5 + A* 
C*arcsin(b*x/a)/b - 3/8*sqrt(-b^2*x^2 + a^2)*B*D*a^2*x/b^4 + 1/2*(B*C + A* 
D)*a^2*arcsin(b*x/a)/b^3 - 1/2*sqrt(-b^2*x^2 + a^2)*(B*C + A*D)*x/b^2
 

Giac [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.09 \[ \int \frac {A C+(B C+A D) x^2+B D x^4}{\sqrt {a-b x} \sqrt {a+b x}} \, dx=\frac {{\left (5 \, B D a^{3} + 4 \, B C a b^{2} + 4 \, A D a b^{2} - {\left (9 \, B D a^{2} + 4 \, B C b^{2} + 4 \, A D b^{2} + 2 \, {\left ({\left (b x + a\right )} B D - 3 \, B D a\right )} {\left (b x + a\right )}\right )} {\left (b x + a\right )}\right )} \sqrt {b x + a} \sqrt {-b x + a} + 2 \, {\left (3 \, B D a^{4} + 4 \, B C a^{2} b^{2} + 4 \, A D a^{2} b^{2} + 8 \, A C b^{4}\right )} \arcsin \left (\frac {\sqrt {2} \sqrt {b x + a}}{2 \, \sqrt {a}}\right )}{8 \, b^{5}} \] Input:

integrate((A*C+(A*D+B*C)*x^2+B*D*x^4)/(-b*x+a)^(1/2)/(b*x+a)^(1/2),x, algo 
rithm="giac")
 

Output:

1/8*((5*B*D*a^3 + 4*B*C*a*b^2 + 4*A*D*a*b^2 - (9*B*D*a^2 + 4*B*C*b^2 + 4*A 
*D*b^2 + 2*((b*x + a)*B*D - 3*B*D*a)*(b*x + a))*(b*x + a))*sqrt(b*x + a)*s 
qrt(-b*x + a) + 2*(3*B*D*a^4 + 4*B*C*a^2*b^2 + 4*A*D*a^2*b^2 + 8*A*C*b^4)* 
arcsin(1/2*sqrt(2)*sqrt(b*x + a)/sqrt(a)))/b^5
 

Mupad [F(-1)]

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

int((x^2*(A*D + B*C) + A*C + B*x^4*D)/((a + b*x)^(1/2)*(a - b*x)^(1/2)),x)
 

Output:

int((x^2*(A*D + B*C) + A*C + B*x^4*D)/((a + b*x)^(1/2)*(a - b*x)^(1/2)), x 
)
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.36 \[ \int \frac {A C+(B C+A D) x^2+B D x^4}{\sqrt {a-b x} \sqrt {a+b x}} \, dx=\frac {-6 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{4} d -8 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{3} b d -8 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{2} b^{2} c -16 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a \,b^{3} c -3 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b d x -4 \sqrt {b x +a}\, \sqrt {-b x +a}\, a \,b^{2} d x -4 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{3} c x -2 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{3} d \,x^{3}}{8 b^{4}} \] Input:

int((A*C+(A*D+B*C)*x^2+B*D*x^4)/(-b*x+a)^(1/2)/(b*x+a)^(1/2),x)
 

Output:

( - 6*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**4*d - 8*asin(sqrt(a - b*x)/ 
(sqrt(a)*sqrt(2)))*a**3*b*d - 8*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**2 
*b**2*c - 16*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a*b**3*c - 3*sqrt(a + b 
*x)*sqrt(a - b*x)*a**2*b*d*x - 4*sqrt(a + b*x)*sqrt(a - b*x)*a*b**2*d*x - 
4*sqrt(a + b*x)*sqrt(a - b*x)*b**3*c*x - 2*sqrt(a + b*x)*sqrt(a - b*x)*b** 
3*d*x**3)/(8*b**4)