\(\int \frac {(e+f x)^2 (A+B x+C x^2)}{\sqrt {a+b x} \sqrt {a c-b c x}} \, dx\) [53]

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

Optimal result

Integrand size = 40, antiderivative size = 335 \[ \int \frac {(e+f x)^2 \left (A+B x+C x^2\right )}{\sqrt {a+b x} \sqrt {a c-b c x}} \, dx=-\frac {\left (3 a^3 C f^2+24 b^3 e (B e+2 A f)+16 a^2 b f (2 C e+B f)-12 a b^2 \left (C e^2+f (2 B e+A f)\right )\right ) \sqrt {a+b x} \sqrt {a c-b c x}}{24 b^5 c}-\frac {f (8 b C e+4 b B f-9 a C f) x^2 \sqrt {a+b x} \sqrt {a c-b c x}}{12 b^3 c}+\frac {\left (3 a^2 C f^2-4 b^2 \left (C e^2+f (2 B e+A f)\right )\right ) (a+b x)^{3/2} \sqrt {a c-b c x}}{8 b^5 c}-\frac {C f^2 (a+b x)^{7/2} \sqrt {a c-b c x}}{4 b^5 c}+\frac {\left (3 a^4 C f^2+4 a^2 b^2 e (C e+2 B f)+4 A \left (2 b^4 e^2+a^2 b^2 f^2\right )\right ) \arctan \left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {a c-b c x}}\right )}{4 b^5 \sqrt {c}} \] Output:

-1/24*(3*a^3*C*f^2+24*b^3*e*(2*A*f+B*e)+16*a^2*b*f*(B*f+2*C*e)-12*a*b^2*(C 
*e^2+f*(A*f+2*B*e)))*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2)/b^5/c-1/12*f*(4*B*b* 
f-9*C*a*f+8*C*b*e)*x^2*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2)/b^3/c+1/8*(3*a^2*C 
*f^2-4*b^2*(C*e^2+f*(A*f+2*B*e)))*(b*x+a)^(3/2)*(-b*c*x+a*c)^(1/2)/b^5/c-1 
/4*C*f^2*(b*x+a)^(7/2)*(-b*c*x+a*c)^(1/2)/b^5/c+1/4*(3*a^4*C*f^2+4*a^2*b^2 
*e*(2*B*f+C*e)+4*A*(a^2*b^2*f^2+2*b^4*e^2))*arctan(c^(1/2)*(b*x+a)^(1/2)/( 
-b*c*x+a*c)^(1/2))/b^5/c^(1/2)
 

Mathematica [A] (verified)

Time = 0.42 (sec) , antiderivative size = 200, normalized size of antiderivative = 0.60 \[ \int \frac {(e+f x)^2 \left (A+B x+C x^2\right )}{\sqrt {a+b x} \sqrt {a c-b c x}} \, dx=\frac {-b (a-b x) \sqrt {a+b x} \left (a^2 f (32 C e+16 B f+9 C f x)+2 b^2 \left (6 A f (4 e+f x)+4 B \left (3 e^2+3 e f x+f^2 x^2\right )+C x \left (6 e^2+8 e f x+3 f^2 x^2\right )\right )\right )+6 \left (3 a^4 C f^2+4 a^2 b^2 e (C e+2 B f)+4 A \left (2 b^4 e^2+a^2 b^2 f^2\right )\right ) \sqrt {a-b x} \arctan \left (\frac {\sqrt {a+b x}}{\sqrt {a-b x}}\right )}{24 b^5 \sqrt {c (a-b x)}} \] Input:

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

Output:

(-(b*(a - b*x)*Sqrt[a + b*x]*(a^2*f*(32*C*e + 16*B*f + 9*C*f*x) + 2*b^2*(6 
*A*f*(4*e + f*x) + 4*B*(3*e^2 + 3*e*f*x + f^2*x^2) + C*x*(6*e^2 + 8*e*f*x 
+ 3*f^2*x^2)))) + 6*(3*a^4*C*f^2 + 4*a^2*b^2*e*(C*e + 2*B*f) + 4*A*(2*b^4* 
e^2 + a^2*b^2*f^2))*Sqrt[a - b*x]*ArcTan[Sqrt[a + b*x]/Sqrt[a - b*x]])/(24 
*b^5*Sqrt[c*(a - b*x)])
 

Rubi [A] (verified)

Time = 0.97 (sec) , antiderivative size = 362, normalized size of antiderivative = 1.08, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2113, 2185, 25, 27, 687, 25, 27, 676, 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 {(e+f x)^2 \left (A+B x+C x^2\right )}{\sqrt {a+b x} \sqrt {a c-b c x}} \, dx\)

\(\Big \downarrow \) 2113

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

\(\Big \downarrow \) 2185

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 687

\(\displaystyle \frac {\sqrt {a^2 c-b^2 c x^2} \left (\frac {\frac {(e+f x)^2 \sqrt {a^2 c-b^2 c x^2} (C e-4 B f)}{3 c}-\frac {\int -\frac {b^2 c (e+f x) \left (f \left ((7 C e+8 B f) a^2+12 A b^2 e\right )+\left (9 a^2 C f^2-b^2 \left (2 C e^2-4 f (2 B e+3 A f)\right )\right ) x\right )}{\sqrt {a^2 c-b^2 c x^2}}dx}{3 b^2 c}}{4 b^2 f}-\frac {C (e+f x)^3 \sqrt {a^2 c-b^2 c x^2}}{4 b^2 c f}\right )}{\sqrt {a+b x} \sqrt {a c-b c x}}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\sqrt {a^2 c-b^2 c x^2} \left (\frac {\frac {\int \frac {b^2 c (e+f x) \left (f \left ((7 C e+8 B f) a^2+12 A b^2 e\right )+\left (9 a^2 C f^2-b^2 \left (2 C e^2-4 f (2 B e+3 A f)\right )\right ) x\right )}{\sqrt {a^2 c-b^2 c x^2}}dx}{3 b^2 c}+\frac {(e+f x)^2 \sqrt {a^2 c-b^2 c x^2} (C e-4 B f)}{3 c}}{4 b^2 f}-\frac {C (e+f x)^3 \sqrt {a^2 c-b^2 c x^2}}{4 b^2 c f}\right )}{\sqrt {a+b x} \sqrt {a c-b c x}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\sqrt {a^2 c-b^2 c x^2} \left (\frac {\frac {1}{3} \int \frac {(e+f x) \left (f \left ((7 C e+8 B f) a^2+12 A b^2 e\right )+\left (9 a^2 C f^2-b^2 \left (2 C e^2-4 f (2 B e+3 A f)\right )\right ) x\right )}{\sqrt {a^2 c-b^2 c x^2}}dx+\frac {(e+f x)^2 \sqrt {a^2 c-b^2 c x^2} (C e-4 B f)}{3 c}}{4 b^2 f}-\frac {C (e+f x)^3 \sqrt {a^2 c-b^2 c x^2}}{4 b^2 c f}\right )}{\sqrt {a+b x} \sqrt {a c-b c x}}\)

\(\Big \downarrow \) 676

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

\(\Big \downarrow \) 224

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

\(\Big \downarrow \) 216

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

Input:

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

Output:

(Sqrt[a^2*c - b^2*c*x^2]*(-1/4*(C*(e + f*x)^3*Sqrt[a^2*c - b^2*c*x^2])/(b^ 
2*c*f) + (((C*e - 4*B*f)*(e + f*x)^2*Sqrt[a^2*c - b^2*c*x^2])/(3*c) + ((-2 
*(4*a^2*f^2*(2*C*e + B*f) - b^2*(C*e^3 - 4*e*f*(B*e + 3*A*f)))*Sqrt[a^2*c 
- b^2*c*x^2])/(b^2*c) - (f*(9*a^2*C*f^2 - b^2*(2*C*e^2 - 4*f*(2*B*e + 3*A* 
f)))*x*Sqrt[a^2*c - b^2*c*x^2])/(2*b^2*c) + (3*f*(3*a^4*C*f^2 + 4*a^2*b^2* 
e*(C*e + 2*B*f) + 4*A*(2*b^4*e^2 + a^2*b^2*f^2))*ArcTan[(b*Sqrt[c]*x)/Sqrt 
[a^2*c - b^2*c*x^2]])/(2*b^3*Sqrt[c]))/3)/(4*b^2*f)))/(Sqrt[a + b*x]*Sqrt[ 
a*c - b*c*x])
 

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 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 676
Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x 
_Symbol] :> Simp[(e*f + d*g)*((a + c*x^2)^(p + 1)/(2*c*(p + 1))), x] + (Sim 
p[e*g*x*((a + c*x^2)^(p + 1)/(c*(2*p + 3))), x] - Simp[(a*e*g - c*d*f*(2*p 
+ 3))/(c*(2*p + 3))   Int[(a + c*x^2)^p, x], x]) /; FreeQ[{a, c, d, e, f, g 
, p}, x] &&  !LeQ[p, -1]
 

rule 687
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p 
_.), x_Symbol] :> Simp[g*(d + e*x)^m*((a + c*x^2)^(p + 1)/(c*(m + 2*p + 2)) 
), x] + Simp[1/(c*(m + 2*p + 2))   Int[(d + e*x)^(m - 1)*(a + c*x^2)^p*Simp 
[c*d*f*(m + 2*p + 2) - a*e*g*m + c*(e*f*(m + 2*p + 2) + d*g*m)*x, x], x], x 
] /; FreeQ[{a, c, d, e, f, g, p}, x] && GtQ[m, 0] && NeQ[m + 2*p + 2, 0] && 
 (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p]) &&  !(IGtQ[m, 0] && Eq 
Q[f, 0])
 

rule 2113
Int[(Px_)*((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_. 
)*(x_))^(p_.), x_Symbol] :> Simp[(a + b*x)^FracPart[m]*((c + d*x)^FracPart[ 
m]/(a*c + b*d*x^2)^FracPart[m])   Int[Px*(a*c + b*d*x^2)^m*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[Px, x] && EqQ[b*c + a 
*d, 0] && EqQ[m, n] &&  !IntegerQ[m]
 

rule 2185
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] : 
> With[{q = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[f*(d + e*x) 
^(m + q - 1)*((a + b*x^2)^(p + 1)/(b*e^(q - 1)*(m + q + 2*p + 1))), x] + Si 
mp[1/(b*e^q*(m + q + 2*p + 1))   Int[(d + e*x)^m*(a + b*x^2)^p*ExpandToSum[ 
b*e^q*(m + q + 2*p + 1)*Pq - b*f*(m + q + 2*p + 1)*(d + e*x)^q - f*(d + e*x 
)^(q - 2)*(a*e^2*(m + q - 1) - b*d^2*(m + q + 2*p + 1) - 2*b*d*e*(m + q + p 
)*x), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, d 
, e, m, p}, x] && PolyQ[Pq, x] && NeQ[b*d^2 + a*e^2, 0] &&  !(EqQ[d, 0] && 
True) &&  !(IGtQ[m, 0] && RationalQ[a, b, d, e] && (IntegerQ[p] || ILtQ[p + 
 1/2, 0]))
 
Maple [A] (verified)

Time = 0.75 (sec) , antiderivative size = 270, normalized size of antiderivative = 0.81

method result size
risch \(-\frac {\left (6 C \,f^{2} x^{3} b^{2}+8 B \,b^{2} f^{2} x^{2}+16 C \,b^{2} e f \,x^{2}+12 A \,b^{2} f^{2} x +24 B \,b^{2} e f x +9 C \,a^{2} f^{2} x +12 C \,b^{2} e^{2} x +48 A \,b^{2} e f +16 B \,a^{2} f^{2}+24 B \,b^{2} e^{2}+32 C \,a^{2} e f \right ) \left (-b x +a \right ) \sqrt {b x +a}}{24 b^{4} \sqrt {-c \left (b x -a \right )}}+\frac {\left (4 A \,a^{2} b^{2} f^{2}+8 A \,b^{4} e^{2}+8 B \,a^{2} e f \,b^{2}+3 a^{4} C \,f^{2}+4 C \,a^{2} e^{2} b^{2}\right ) \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {-b^{2} c \,x^{2}+a^{2} c}}\right ) \sqrt {-\left (b x +a \right ) c \left (b x -a \right )}}{8 b^{4} \sqrt {b^{2} c}\, \sqrt {b x +a}\, \sqrt {-c \left (b x -a \right )}}\) \(270\)
default \(\frac {\sqrt {b x +a}\, \sqrt {c \left (-b x +a \right )}\, \left (-6 C \,b^{2} f^{2} x^{3} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}+12 A \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{2} b^{2} c \,f^{2}+24 A \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) b^{4} c \,e^{2}+24 B \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{2} b^{2} c e f -8 B \,b^{2} f^{2} x^{2} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}+9 C \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{4} c \,f^{2}+12 C \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{2} b^{2} c \,e^{2}-16 C \,b^{2} e f \,x^{2} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}-12 A \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, b^{2} f^{2} x -24 B \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, b^{2} e f x -9 C \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, a^{2} f^{2} x -12 C \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, b^{2} e^{2} x -48 A \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, b^{2} e f -16 B \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, a^{2} f^{2}-24 B \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, b^{2} e^{2}-32 C \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, a^{2} e f \right )}{24 c \,b^{4} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}}\) \(599\)

Input:

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

Output:

-1/24*(6*C*b^2*f^2*x^3+8*B*b^2*f^2*x^2+16*C*b^2*e*f*x^2+12*A*b^2*f^2*x+24* 
B*b^2*e*f*x+9*C*a^2*f^2*x+12*C*b^2*e^2*x+48*A*b^2*e*f+16*B*a^2*f^2+24*B*b^ 
2*e^2+32*C*a^2*e*f)/b^4*(-b*x+a)*(b*x+a)^(1/2)/(-c*(b*x-a))^(1/2)+1/8*(4*A 
*a^2*b^2*f^2+8*A*b^4*e^2+8*B*a^2*b^2*e*f+3*C*a^4*f^2+4*C*a^2*b^2*e^2)/b^4/ 
(b^2*c)^(1/2)*arctan((b^2*c)^(1/2)*x/(-b^2*c*x^2+a^2*c)^(1/2))*(-(b*x+a)*c 
*(b*x-a))^(1/2)/(b*x+a)^(1/2)/(-c*(b*x-a))^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 482, normalized size of antiderivative = 1.44 \[ \int \frac {(e+f x)^2 \left (A+B x+C x^2\right )}{\sqrt {a+b x} \sqrt {a c-b c x}} \, dx=\left [-\frac {3 \, {\left (8 \, B a^{2} b^{2} e f + 4 \, {\left (C a^{2} b^{2} + 2 \, A b^{4}\right )} e^{2} + {\left (3 \, C a^{4} + 4 \, A a^{2} b^{2}\right )} f^{2}\right )} \sqrt {-c} \log \left (2 \, b^{2} c x^{2} - 2 \, \sqrt {-b c x + a c} \sqrt {b x + a} b \sqrt {-c} x - a^{2} c\right ) + 2 \, {\left (6 \, C b^{3} f^{2} x^{3} + 24 \, B b^{3} e^{2} + 16 \, B a^{2} b f^{2} + 16 \, {\left (2 \, C a^{2} b + 3 \, A b^{3}\right )} e f + 8 \, {\left (2 \, C b^{3} e f + B b^{3} f^{2}\right )} x^{2} + 3 \, {\left (4 \, C b^{3} e^{2} + 8 \, B b^{3} e f + {\left (3 \, C a^{2} b + 4 \, A b^{3}\right )} f^{2}\right )} x\right )} \sqrt {-b c x + a c} \sqrt {b x + a}}{48 \, b^{5} c}, -\frac {3 \, {\left (8 \, B a^{2} b^{2} e f + 4 \, {\left (C a^{2} b^{2} + 2 \, A b^{4}\right )} e^{2} + {\left (3 \, C a^{4} + 4 \, A a^{2} b^{2}\right )} f^{2}\right )} \sqrt {c} \arctan \left (\frac {\sqrt {-b c x + a c} \sqrt {b x + a} b \sqrt {c} x}{b^{2} c x^{2} - a^{2} c}\right ) + {\left (6 \, C b^{3} f^{2} x^{3} + 24 \, B b^{3} e^{2} + 16 \, B a^{2} b f^{2} + 16 \, {\left (2 \, C a^{2} b + 3 \, A b^{3}\right )} e f + 8 \, {\left (2 \, C b^{3} e f + B b^{3} f^{2}\right )} x^{2} + 3 \, {\left (4 \, C b^{3} e^{2} + 8 \, B b^{3} e f + {\left (3 \, C a^{2} b + 4 \, A b^{3}\right )} f^{2}\right )} x\right )} \sqrt {-b c x + a c} \sqrt {b x + a}}{24 \, b^{5} c}\right ] \] Input:

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

Output:

[-1/48*(3*(8*B*a^2*b^2*e*f + 4*(C*a^2*b^2 + 2*A*b^4)*e^2 + (3*C*a^4 + 4*A* 
a^2*b^2)*f^2)*sqrt(-c)*log(2*b^2*c*x^2 - 2*sqrt(-b*c*x + a*c)*sqrt(b*x + a 
)*b*sqrt(-c)*x - a^2*c) + 2*(6*C*b^3*f^2*x^3 + 24*B*b^3*e^2 + 16*B*a^2*b*f 
^2 + 16*(2*C*a^2*b + 3*A*b^3)*e*f + 8*(2*C*b^3*e*f + B*b^3*f^2)*x^2 + 3*(4 
*C*b^3*e^2 + 8*B*b^3*e*f + (3*C*a^2*b + 4*A*b^3)*f^2)*x)*sqrt(-b*c*x + a*c 
)*sqrt(b*x + a))/(b^5*c), -1/24*(3*(8*B*a^2*b^2*e*f + 4*(C*a^2*b^2 + 2*A*b 
^4)*e^2 + (3*C*a^4 + 4*A*a^2*b^2)*f^2)*sqrt(c)*arctan(sqrt(-b*c*x + a*c)*s 
qrt(b*x + a)*b*sqrt(c)*x/(b^2*c*x^2 - a^2*c)) + (6*C*b^3*f^2*x^3 + 24*B*b^ 
3*e^2 + 16*B*a^2*b*f^2 + 16*(2*C*a^2*b + 3*A*b^3)*e*f + 8*(2*C*b^3*e*f + B 
*b^3*f^2)*x^2 + 3*(4*C*b^3*e^2 + 8*B*b^3*e*f + (3*C*a^2*b + 4*A*b^3)*f^2)* 
x)*sqrt(-b*c*x + a*c)*sqrt(b*x + a))/(b^5*c)]
 

Sympy [F(-1)]

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

integrate((f*x+e)**2*(C*x**2+B*x+A)/(b*x+a)**(1/2)/(-b*c*x+a*c)**(1/2),x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 363, normalized size of antiderivative = 1.08 \[ \int \frac {(e+f x)^2 \left (A+B x+C x^2\right )}{\sqrt {a+b x} \sqrt {a c-b c x}} \, dx=-\frac {{\left ({\left (2 \, {\left (\frac {3 \, {\left (b x + a\right )} C f^{2}}{c} + \frac {8 \, C b c^{3} e f - 9 \, C a c^{3} f^{2} + 4 \, B b c^{3} f^{2}}{c^{4}}\right )} {\left (b x + a\right )} + \frac {12 \, C b^{2} c^{3} e^{2} - 32 \, C a b c^{3} e f + 24 \, B b^{2} c^{3} e f + 27 \, C a^{2} c^{3} f^{2} - 16 \, B a b c^{3} f^{2} + 12 \, A b^{2} c^{3} f^{2}}{c^{4}}\right )} {\left (b x + a\right )} - \frac {3 \, {\left (4 \, C a b^{2} c^{3} e^{2} - 8 \, B b^{3} c^{3} e^{2} - 16 \, C a^{2} b c^{3} e f + 8 \, B a b^{2} c^{3} e f - 16 \, A b^{3} c^{3} e f + 5 \, C a^{3} c^{3} f^{2} - 8 \, B a^{2} b c^{3} f^{2} + 4 \, A a b^{2} c^{3} f^{2}\right )}}{c^{4}}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a} + \frac {6 \, {\left (4 \, C a^{2} b^{2} e^{2} + 8 \, A b^{4} e^{2} + 8 \, B a^{2} b^{2} e f + 3 \, C a^{4} f^{2} + 4 \, A a^{2} b^{2} f^{2}\right )} \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}}}{24 \, b^{5}} \] Input:

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

Output:

-1/24*(((2*(3*(b*x + a)*C*f^2/c + (8*C*b*c^3*e*f - 9*C*a*c^3*f^2 + 4*B*b*c 
^3*f^2)/c^4)*(b*x + a) + (12*C*b^2*c^3*e^2 - 32*C*a*b*c^3*e*f + 24*B*b^2*c 
^3*e*f + 27*C*a^2*c^3*f^2 - 16*B*a*b*c^3*f^2 + 12*A*b^2*c^3*f^2)/c^4)*(b*x 
 + a) - 3*(4*C*a*b^2*c^3*e^2 - 8*B*b^3*c^3*e^2 - 16*C*a^2*b*c^3*e*f + 8*B* 
a*b^2*c^3*e*f - 16*A*b^3*c^3*e*f + 5*C*a^3*c^3*f^2 - 8*B*a^2*b*c^3*f^2 + 4 
*A*a*b^2*c^3*f^2)/c^4)*sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a) + 6*(4*C*a 
^2*b^2*e^2 + 8*A*b^4*e^2 + 8*B*a^2*b^2*e*f + 3*C*a^4*f^2 + 4*A*a^2*b^2*f^2 
)*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)))/sqrt(-c)) 
/b^5
 

Mupad [B] (verification not implemented)

Time = 49.72 (sec) , antiderivative size = 2799, normalized size of antiderivative = 8.36 \[ \int \frac {(e+f x)^2 \left (A+B x+C x^2\right )}{\sqrt {a+b x} \sqrt {a c-b c x}} \, dx=\text {Too large to display} \] Input:

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

Output:

- ((a^(1/2)*(a*c)^(1/2)*(64*B*a^2*c*f^2 + 32*B*b^2*c*e^2)*((a*c - b*c*x)^( 
1/2) - (a*c)^(1/2))^8)/(b^4*((a + b*x)^(1/2) - a^(1/2))^8) + (a^(1/2)*(a*c 
)^(1/2)*(64*B*a^2*c^3*f^2 + 32*B*b^2*c^3*e^2)*((a*c - b*c*x)^(1/2) - (a*c) 
^(1/2))^4)/(b^4*((a + b*x)^(1/2) - a^(1/2))^4) - (a^(1/2)*(a*c)^(1/2)*((12 
8*B*a^2*c^2*f^2)/3 - 48*B*b^2*c^2*e^2)*((a*c - b*c*x)^(1/2) - (a*c)^(1/2)) 
^6)/(b^4*((a + b*x)^(1/2) - a^(1/2))^6) + (4*B*a^2*e*f*((a*c - b*c*x)^(1/2 
) - (a*c)^(1/2))^11)/(b^3*((a + b*x)^(1/2) - a^(1/2))^11) + (8*B*a^(1/2)*e 
^2*(a*c)^(1/2)*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^10)/(b^2*((a + b*x)^(1/ 
2) - a^(1/2))^10) + (20*B*a^2*c^4*e*f*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^ 
3)/(b^3*((a + b*x)^(1/2) - a^(1/2))^3) + (24*B*a^2*c^3*e*f*((a*c - b*c*x)^ 
(1/2) - (a*c)^(1/2))^5)/(b^3*((a + b*x)^(1/2) - a^(1/2))^5) - (24*B*a^2*c^ 
2*e*f*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^7)/(b^3*((a + b*x)^(1/2) - a^(1/ 
2))^7) + (8*B*a^(1/2)*c^4*e^2*(a*c)^(1/2)*((a*c - b*c*x)^(1/2) - (a*c)^(1/ 
2))^2)/(b^2*((a + b*x)^(1/2) - a^(1/2))^2) - (4*B*a^2*c^5*e*f*((a*c - b*c* 
x)^(1/2) - (a*c)^(1/2)))/(b^3*((a + b*x)^(1/2) - a^(1/2))) - (20*B*a^2*c*e 
*f*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^9)/(b^3*((a + b*x)^(1/2) - a^(1/2)) 
^9))/(((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^12/((a + b*x)^(1/2) - a^(1/2))^1 
2 + c^6 + (6*c*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^10)/((a + b*x)^(1/2) - 
a^(1/2))^10 + (6*c^5*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^2)/((a + b*x)^(1/ 
2) - a^(1/2))^2 + (15*c^4*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^4)/((a + ...
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 399, normalized size of antiderivative = 1.19 \[ \int \frac {(e+f x)^2 \left (A+B x+C x^2\right )}{\sqrt {a+b x} \sqrt {a c-b c x}} \, dx=\frac {\sqrt {c}\, \left (-18 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{4} c \,f^{2}-24 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{3} b^{2} f^{2}-48 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{2} b^{3} e f -24 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{2} b^{2} c \,e^{2}-48 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a \,b^{4} e^{2}-16 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b^{2} f^{2}-32 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b c e f -9 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b c \,f^{2} x -48 \sqrt {b x +a}\, \sqrt {-b x +a}\, a \,b^{3} e f -12 \sqrt {b x +a}\, \sqrt {-b x +a}\, a \,b^{3} f^{2} x -24 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{4} e^{2}-24 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{4} e f x -8 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{4} f^{2} x^{2}-12 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{3} c \,e^{2} x -16 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{3} c e f \,x^{2}-6 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{3} c \,f^{2} x^{3}\right )}{24 b^{5} c} \] Input:

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

Output:

(sqrt(c)*( - 18*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**4*c*f**2 - 24*asi 
n(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**3*b**2*f**2 - 48*asin(sqrt(a - b*x)/ 
(sqrt(a)*sqrt(2)))*a**2*b**3*e*f - 24*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)) 
)*a**2*b**2*c*e**2 - 48*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a*b**4*e**2 
- 16*sqrt(a + b*x)*sqrt(a - b*x)*a**2*b**2*f**2 - 32*sqrt(a + b*x)*sqrt(a 
- b*x)*a**2*b*c*e*f - 9*sqrt(a + b*x)*sqrt(a - b*x)*a**2*b*c*f**2*x - 48*s 
qrt(a + b*x)*sqrt(a - b*x)*a*b**3*e*f - 12*sqrt(a + b*x)*sqrt(a - b*x)*a*b 
**3*f**2*x - 24*sqrt(a + b*x)*sqrt(a - b*x)*b**4*e**2 - 24*sqrt(a + b*x)*s 
qrt(a - b*x)*b**4*e*f*x - 8*sqrt(a + b*x)*sqrt(a - b*x)*b**4*f**2*x**2 - 1 
2*sqrt(a + b*x)*sqrt(a - b*x)*b**3*c*e**2*x - 16*sqrt(a + b*x)*sqrt(a - b* 
x)*b**3*c*e*f*x**2 - 6*sqrt(a + b*x)*sqrt(a - b*x)*b**3*c*f**2*x**3))/(24* 
b**5*c)