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

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

Optimal result

Integrand size = 40, antiderivative size = 415 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} (e+f x)^2 \left (A+B x+C x^2\right ) \, dx=\frac {\left (a^4 C f^2+2 a^2 b^2 e (C e+2 B f)+2 A \left (4 b^4 e^2+a^2 b^2 f^2\right )\right ) x \sqrt {a+b x} \sqrt {a c-b c x}}{16 b^4}-\frac {\left (25 a^3 C f^2+40 b^3 e (B e+2 A f)+16 a^2 b f (2 C e+B f)-30 a b^2 \left (C e^2+f (2 B e+A f)\right )\right ) (a+b x)^{3/2} (a c-b c x)^{3/2}}{120 b^5 c}-\frac {f (4 b C e+2 b B f-5 a C f) x^2 (a+b x)^{3/2} (a c-b c x)^{3/2}}{10 b^3 c}+\frac {\left (3 a^2 C f^2-2 b^2 \left (C e^2+f (2 B e+A f)\right )\right ) (a+b x)^{5/2} (a c-b c x)^{3/2}}{8 b^5 c}-\frac {C f^2 (a+b x)^{9/2} (a c-b c x)^{3/2}}{6 b^5 c}+\frac {a^2 \sqrt {c} \left (a^4 C f^2+2 a^2 b^2 e (C e+2 B f)+2 A \left (4 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 )}{8 b^5} \] Output:

1/16*(a^4*C*f^2+2*a^2*b^2*e*(2*B*f+C*e)+2*A*(a^2*b^2*f^2+4*b^4*e^2))*x*(b* 
x+a)^(1/2)*(-b*c*x+a*c)^(1/2)/b^4-1/120*(25*a^3*C*f^2+40*b^3*e*(2*A*f+B*e) 
+16*a^2*b*f*(B*f+2*C*e)-30*a*b^2*(C*e^2+f*(A*f+2*B*e)))*(b*x+a)^(3/2)*(-b* 
c*x+a*c)^(3/2)/b^5/c-1/10*f*(2*B*b*f-5*C*a*f+4*C*b*e)*x^2*(b*x+a)^(3/2)*(- 
b*c*x+a*c)^(3/2)/b^3/c+1/8*(3*a^2*C*f^2-2*b^2*(C*e^2+f*(A*f+2*B*e)))*(b*x+ 
a)^(5/2)*(-b*c*x+a*c)^(3/2)/b^5/c-1/6*C*f^2*(b*x+a)^(9/2)*(-b*c*x+a*c)^(3/ 
2)/b^5/c+1/8*a^2*c^(1/2)*(a^4*C*f^2+2*a^2*b^2*e*(2*B*f+C*e)+2*A*(a^2*b^2*f 
^2+4*b^4*e^2))*arctan(c^(1/2)*(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2))/b^5
 

Mathematica [A] (verified)

Time = 0.67 (sec) , antiderivative size = 286, normalized size of antiderivative = 0.69 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} (e+f x)^2 \left (A+B x+C x^2\right ) \, dx=\frac {\sqrt {c (a-b x)} \left (b \sqrt {a-b x} \sqrt {a+b x} \left (-a^4 f (64 C e+32 B f+15 C f x)-2 a^2 b^2 \left (5 A f (16 e+3 f x)+C x \left (15 e^2+16 e f x+5 f^2 x^2\right )+B \left (40 e^2+30 e f x+8 f^2 x^2\right )\right )+4 b^4 x \left (5 A \left (6 e^2+8 e f x+3 f^2 x^2\right )+x \left (2 B \left (10 e^2+15 e f x+6 f^2 x^2\right )+C x \left (15 e^2+24 e f x+10 f^2 x^2\right )\right )\right )\right )+30 a^2 \left (a^4 C f^2+2 a^2 b^2 e (C e+2 B f)+2 A \left (4 b^4 e^2+a^2 b^2 f^2\right )\right ) \arctan \left (\frac {\sqrt {a+b x}}{\sqrt {a-b x}}\right )\right )}{240 b^5 \sqrt {a-b x}} \] Input:

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

Output:

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

Rubi [A] (verified)

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

\(\Big \downarrow \) 2113

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

\(\Big \downarrow \) 2185

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 687

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 676

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

\(\Big \downarrow \) 211

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

\(\Big \downarrow \) 224

\(\displaystyle \frac {\sqrt {a+b x} \sqrt {a c-b c x} \left (\frac {\frac {1}{5} \left (\frac {5 f \left (a^4 C f^2+2 A \left (a^2 b^2 f^2+4 b^4 e^2\right )+2 a^2 b^2 e (2 B f+C e)\right ) \left (\frac {1}{2} a^2 c \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}}+\frac {1}{2} x \sqrt {a^2 c-b^2 c x^2}\right )}{4 b^2}-\frac {2 \left (a^2 c-b^2 c x^2\right )^{3/2} \left (2 a^2 f^2 (B f+2 C e)-b^2 \left (C e^3-2 e f (5 A f+B e)\right )\right )}{3 b^2 c}-\frac {f x \left (a^2 c-b^2 c x^2\right )^{3/2} \left (5 a^2 C f^2-b^2 \left (2 C e^2-2 f (5 A f+2 B e)\right )\right )}{4 b^2 c}\right )+\frac {(e+f x)^2 \left (a^2 c-b^2 c x^2\right )^{3/2} (C e-2 B f)}{5 c}}{2 b^2 f}-\frac {C (e+f x)^3 \left (a^2 c-b^2 c x^2\right )^{3/2}}{6 b^2 c f}\right )}{\sqrt {a^2 c-b^2 c x^2}}\)

\(\Big \downarrow \) 216

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

Input:

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

Output:

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

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 211
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[x*((a + b*x^2)^p/(2*p + 1 
)), x] + Simp[2*a*(p/(2*p + 1))   Int[(a + b*x^2)^(p - 1), x], x] /; FreeQ[ 
{a, b}, x] && GtQ[p, 0] && (IntegerQ[4*p] || IntegerQ[6*p])
 

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.65 (sec) , antiderivative size = 401, normalized size of antiderivative = 0.97

method result size
risch \(-\frac {\left (-40 C \,f^{2} x^{5} b^{4}-48 B \,b^{4} f^{2} x^{4}-96 C \,b^{4} e f \,x^{4}-60 A \,b^{4} f^{2} x^{3}-120 B \,b^{4} e f \,x^{3}+10 C \,a^{2} b^{2} f^{2} x^{3}-60 C \,b^{4} e^{2} x^{3}-160 A \,b^{4} e f \,x^{2}+16 B \,a^{2} b^{2} f^{2} x^{2}-80 B \,b^{4} e^{2} x^{2}+32 C \,a^{2} b^{2} e f \,x^{2}+30 A \,a^{2} b^{2} f^{2} x -120 A \,b^{4} e^{2} x +60 B \,a^{2} b^{2} e f x +15 C \,a^{4} f^{2} x +30 C \,a^{2} b^{2} e^{2} x +160 A \,a^{2} b^{2} e f +32 B \,a^{4} f^{2}+80 B \,a^{2} b^{2} e^{2}+64 C \,a^{4} e f \right ) \left (-b x +a \right ) \sqrt {b x +a}\, c}{240 b^{4} \sqrt {-c \left (b x -a \right )}}+\frac {a^{2} \left (2 A \,a^{2} b^{2} f^{2}+8 A \,b^{4} e^{2}+4 B \,a^{2} e f \,b^{2}+a^{4} C \,f^{2}+2 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 )}\, c}{16 b^{4} \sqrt {b^{2} c}\, \sqrt {b x +a}\, \sqrt {-c \left (b x -a \right )}}\) \(401\)
default \(\frac {\sqrt {b x +a}\, \sqrt {c \left (-b x +a \right )}\, \left (60 A \,b^{4} f^{2} x^{3} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}+60 C \,b^{4} e^{2} x^{3} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}-32 B \,a^{4} f^{2} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}+15 C \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{6} c \,f^{2}-32 C \,a^{2} b^{2} e f \,x^{2} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}-60 B \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}\, a^{2} b^{2} e f x +80 B \,b^{4} e^{2} x^{2} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}-80 B \,a^{2} b^{2} e^{2} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}-64 C \,a^{4} e f \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}+30 A \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{4} b^{2} c \,f^{2}+120 A \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{2} b^{4} c \,e^{2}+30 C \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{4} b^{2} c \,e^{2}+120 A \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}\, b^{4} e^{2} x -15 C \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}\, a^{4} f^{2} x +40 C \,b^{4} f^{2} x^{5} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}+48 B \,b^{4} f^{2} x^{4} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}+96 C \,b^{4} e f \,x^{4} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}+120 B \,b^{4} e f \,x^{3} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}-10 C \,a^{2} b^{2} f^{2} x^{3} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}+160 A \,b^{4} e f \,x^{2} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}-30 C \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}\, a^{2} b^{2} e^{2} x -30 A \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}\, a^{2} b^{2} f^{2} x -16 B \,a^{2} b^{2} f^{2} x^{2} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}-160 A \,a^{2} b^{2} e f \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}+60 B \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{4} b^{2} c e f \right )}{240 \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, b^{4} \sqrt {b^{2} c}}\) \(933\)

Input:

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

Output:

-1/240/b^4*(-40*C*b^4*f^2*x^5-48*B*b^4*f^2*x^4-96*C*b^4*e*f*x^4-60*A*b^4*f 
^2*x^3-120*B*b^4*e*f*x^3+10*C*a^2*b^2*f^2*x^3-60*C*b^4*e^2*x^3-160*A*b^4*e 
*f*x^2+16*B*a^2*b^2*f^2*x^2-80*B*b^4*e^2*x^2+32*C*a^2*b^2*e*f*x^2+30*A*a^2 
*b^2*f^2*x-120*A*b^4*e^2*x+60*B*a^2*b^2*e*f*x+15*C*a^4*f^2*x+30*C*a^2*b^2* 
e^2*x+160*A*a^2*b^2*e*f+32*B*a^4*f^2+80*B*a^2*b^2*e^2+64*C*a^4*e*f)*(-b*x+ 
a)*(b*x+a)^(1/2)/(-c*(b*x-a))^(1/2)*c+1/16*a^2*(2*A*a^2*b^2*f^2+8*A*b^4*e^ 
2+4*B*a^2*b^2*e*f+C*a^4*f^2+2*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)*c
 

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 703, normalized size of antiderivative = 1.69 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} (e+f x)^2 \left (A+B x+C x^2\right ) \, dx=\left [\frac {15 \, {\left (4 \, B a^{4} b^{2} e f + 2 \, {\left (C a^{4} b^{2} + 4 \, A a^{2} b^{4}\right )} e^{2} + {\left (C a^{6} + 2 \, A a^{4} 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 (40 \, C b^{5} f^{2} x^{5} - 80 \, B a^{2} b^{3} e^{2} - 32 \, B a^{4} b f^{2} + 48 \, {\left (2 \, C b^{5} e f + B b^{5} f^{2}\right )} x^{4} + 10 \, {\left (6 \, C b^{5} e^{2} + 12 \, B b^{5} e f - {\left (C a^{2} b^{3} - 6 \, A b^{5}\right )} f^{2}\right )} x^{3} - 32 \, {\left (2 \, C a^{4} b + 5 \, A a^{2} b^{3}\right )} e f + 16 \, {\left (5 \, B b^{5} e^{2} - B a^{2} b^{3} f^{2} - 2 \, {\left (C a^{2} b^{3} - 5 \, A b^{5}\right )} e f\right )} x^{2} - 15 \, {\left (4 \, B a^{2} b^{3} e f + 2 \, {\left (C a^{2} b^{3} - 4 \, A b^{5}\right )} e^{2} + {\left (C a^{4} b + 2 \, A a^{2} b^{3}\right )} f^{2}\right )} x\right )} \sqrt {-b c x + a c} \sqrt {b x + a}}{480 \, b^{5}}, -\frac {15 \, {\left (4 \, B a^{4} b^{2} e f + 2 \, {\left (C a^{4} b^{2} + 4 \, A a^{2} b^{4}\right )} e^{2} + {\left (C a^{6} + 2 \, A a^{4} 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 (40 \, C b^{5} f^{2} x^{5} - 80 \, B a^{2} b^{3} e^{2} - 32 \, B a^{4} b f^{2} + 48 \, {\left (2 \, C b^{5} e f + B b^{5} f^{2}\right )} x^{4} + 10 \, {\left (6 \, C b^{5} e^{2} + 12 \, B b^{5} e f - {\left (C a^{2} b^{3} - 6 \, A b^{5}\right )} f^{2}\right )} x^{3} - 32 \, {\left (2 \, C a^{4} b + 5 \, A a^{2} b^{3}\right )} e f + 16 \, {\left (5 \, B b^{5} e^{2} - B a^{2} b^{3} f^{2} - 2 \, {\left (C a^{2} b^{3} - 5 \, A b^{5}\right )} e f\right )} x^{2} - 15 \, {\left (4 \, B a^{2} b^{3} e f + 2 \, {\left (C a^{2} b^{3} - 4 \, A b^{5}\right )} e^{2} + {\left (C a^{4} b + 2 \, A a^{2} b^{3}\right )} f^{2}\right )} x\right )} \sqrt {-b c x + a c} \sqrt {b x + a}}{240 \, b^{5}}\right ] \] Input:

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

Output:

[1/480*(15*(4*B*a^4*b^2*e*f + 2*(C*a^4*b^2 + 4*A*a^2*b^4)*e^2 + (C*a^6 + 2 
*A*a^4*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*(40*C*b^5*f^2*x^5 - 80*B*a^2*b^3*e^2 - 32*B 
*a^4*b*f^2 + 48*(2*C*b^5*e*f + B*b^5*f^2)*x^4 + 10*(6*C*b^5*e^2 + 12*B*b^5 
*e*f - (C*a^2*b^3 - 6*A*b^5)*f^2)*x^3 - 32*(2*C*a^4*b + 5*A*a^2*b^3)*e*f + 
 16*(5*B*b^5*e^2 - B*a^2*b^3*f^2 - 2*(C*a^2*b^3 - 5*A*b^5)*e*f)*x^2 - 15*( 
4*B*a^2*b^3*e*f + 2*(C*a^2*b^3 - 4*A*b^5)*e^2 + (C*a^4*b + 2*A*a^2*b^3)*f^ 
2)*x)*sqrt(-b*c*x + a*c)*sqrt(b*x + a))/b^5, -1/240*(15*(4*B*a^4*b^2*e*f + 
 2*(C*a^4*b^2 + 4*A*a^2*b^4)*e^2 + (C*a^6 + 2*A*a^4*b^2)*f^2)*sqrt(c)*arct 
an(sqrt(-b*c*x + a*c)*sqrt(b*x + a)*b*sqrt(c)*x/(b^2*c*x^2 - a^2*c)) - (40 
*C*b^5*f^2*x^5 - 80*B*a^2*b^3*e^2 - 32*B*a^4*b*f^2 + 48*(2*C*b^5*e*f + B*b 
^5*f^2)*x^4 + 10*(6*C*b^5*e^2 + 12*B*b^5*e*f - (C*a^2*b^3 - 6*A*b^5)*f^2)* 
x^3 - 32*(2*C*a^4*b + 5*A*a^2*b^3)*e*f + 16*(5*B*b^5*e^2 - B*a^2*b^3*f^2 - 
 2*(C*a^2*b^3 - 5*A*b^5)*e*f)*x^2 - 15*(4*B*a^2*b^3*e*f + 2*(C*a^2*b^3 - 4 
*A*b^5)*e^2 + (C*a^4*b + 2*A*a^2*b^3)*f^2)*x)*sqrt(-b*c*x + a*c)*sqrt(b*x 
+ a))/b^5]
 

Sympy [F]

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

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

Output:

Integral(sqrt(-c*(-a + b*x))*sqrt(a + b*x)*(e + f*x)**2*(A + B*x + C*x**2) 
, x)
 

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1868 vs. \(2 (375) = 750\).

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

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

Output:

-1/240*(240*(2*a*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2 
*a*c)))/sqrt(-c) - sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a))*A*a*b^4*e^2 - 
 120*(2*a^2*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c) 
))/sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a)*(b*x - 2*a))*B*a*b^ 
3*e^2 - 120*(2*a^2*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 
 2*a*c)))/sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a)*(b*x - 2*a)) 
*A*b^4*e^2 - 240*(2*a^2*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a 
)*c + 2*a*c)))/sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a)*(b*x - 
2*a))*A*a*b^3*e*f + 40*(6*a^3*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b 
*x + a)*c + 2*a*c)))/sqrt(-c) - ((2*b*x - 5*a)*(b*x + a) + 9*a^2)*sqrt(-(b 
*x + a)*c + 2*a*c)*sqrt(b*x + a))*C*a*b^2*e^2 + 40*(6*a^3*c*log(abs(-sqrt( 
b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)))/sqrt(-c) - ((2*b*x - 5*a) 
*(b*x + a) + 9*a^2)*sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a))*B*b^3*e^2 + 
80*(6*a^3*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c))) 
/sqrt(-c) - ((2*b*x - 5*a)*(b*x + a) + 9*a^2)*sqrt(-(b*x + a)*c + 2*a*c)*s 
qrt(b*x + a))*B*a*b^2*e*f + 80*(6*a^3*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + 
sqrt(-(b*x + a)*c + 2*a*c)))/sqrt(-c) - ((2*b*x - 5*a)*(b*x + a) + 9*a^2)* 
sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a))*A*b^3*e*f + 40*(6*a^3*c*log(abs( 
-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)))/sqrt(-c) - ((2*b*x 
- 5*a)*(b*x + a) + 9*a^2)*sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a))*A*a...
 

Mupad [B] (verification not implemented)

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

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

Output:

- ((((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^3*((35*A*a^4*c^7*f^2)/2 - 6*A*a^2* 
b^2*c^7*e^2))/(b^3*((a + b*x)^(1/2) - a^(1/2))^3) - (((a*c - b*c*x)^(1/2) 
- (a*c)^(1/2))*((A*a^4*c^8*f^2)/2 - 2*A*a^2*b^2*c^8*e^2))/(b^3*((a + b*x)^ 
(1/2) - a^(1/2))) - (((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^13*((35*A*a^4*c^2 
*f^2)/2 - 6*A*a^2*b^2*c^2*e^2))/(b^3*((a + b*x)^(1/2) - a^(1/2))^13) - ((( 
a*c - b*c*x)^(1/2) - (a*c)^(1/2))^5*((273*A*a^4*c^6*f^2)/2 + 30*A*a^2*b^2* 
c^6*e^2))/(b^3*((a + b*x)^(1/2) - a^(1/2))^5) + (((a*c - b*c*x)^(1/2) - (a 
*c)^(1/2))^11*((273*A*a^4*c^3*f^2)/2 + 30*A*a^2*b^2*c^3*e^2))/(b^3*((a + b 
*x)^(1/2) - a^(1/2))^11) + (((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^7*((715*A* 
a^4*c^5*f^2)/2 - 22*A*a^2*b^2*c^5*e^2))/(b^3*((a + b*x)^(1/2) - a^(1/2))^7 
) - (((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^9*((715*A*a^4*c^4*f^2)/2 - 22*A*a 
^2*b^2*c^4*e^2))/(b^3*((a + b*x)^(1/2) - a^(1/2))^9) + (((A*a^4*c*f^2)/2 - 
 2*A*a^2*b^2*c*e^2)*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^15)/(b^3*((a + b*x 
)^(1/2) - a^(1/2))^15) + (16*A*a^(5/2)*c*e*f*(a*c)^(1/2)*((a*c - b*c*x)^(1 
/2) - (a*c)^(1/2))^14)/(b^2*((a + b*x)^(1/2) - a^(1/2))^14) + (16*A*a^(5/2 
)*c^7*e*f*(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) - (32*A*a^(5/2)*c^6*e*f*(a*c)^(1/2)*((a*c - b*c*x)^ 
(1/2) - (a*c)^(1/2))^4)/(b^2*((a + b*x)^(1/2) - a^(1/2))^4) + (208*A*a^(5/ 
2)*c^5*e*f*(a*c)^(1/2)*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^6)/(3*b^2*((a + 
 b*x)^(1/2) - a^(1/2))^6) + (704*A*a^(5/2)*c^4*e*f*(a*c)^(1/2)*((a*c - ...
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 637, normalized size of antiderivative = 1.53 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} (e+f x)^2 \left (A+B x+C x^2\right ) \, dx=\frac {\sqrt {c}\, \left (-32 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b^{3} c e f \,x^{2}-160 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{3} b^{3} e f -30 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{3} b^{3} f^{2} x -16 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b^{4} f^{2} x^{2}+120 \sqrt {b x +a}\, \sqrt {-b x +a}\, a \,b^{5} e^{2} x +60 \sqrt {b x +a}\, \sqrt {-b x +a}\, a \,b^{5} f^{2} x^{3}+120 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{6} e f \,x^{3}+60 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{5} c \,e^{2} x^{3}+40 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{5} c \,f^{2} x^{5}-120 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{4} b^{3} e f -60 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{4} b^{2} c \,e^{2}-32 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{4} b^{2} f^{2}-80 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b^{4} e^{2}+80 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{6} e^{2} x^{2}+48 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{6} f^{2} x^{4}-30 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{6} c \,f^{2}-60 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{5} b^{2} f^{2}-240 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{3} b^{4} e^{2}-64 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{4} b c e f -15 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{4} b c \,f^{2} x -60 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b^{4} e f x -30 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b^{3} c \,e^{2} x -10 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b^{3} c \,f^{2} x^{3}+160 \sqrt {b x +a}\, \sqrt {-b x +a}\, a \,b^{5} e f \,x^{2}+96 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{5} c e f \,x^{4}\right )}{240 b^{5}} \] Input:

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

Output:

(sqrt(c)*( - 30*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**6*c*f**2 - 60*asi 
n(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**5*b**2*f**2 - 120*asin(sqrt(a - b*x) 
/(sqrt(a)*sqrt(2)))*a**4*b**3*e*f - 60*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2) 
))*a**4*b**2*c*e**2 - 240*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**3*b**4* 
e**2 - 32*sqrt(a + b*x)*sqrt(a - b*x)*a**4*b**2*f**2 - 64*sqrt(a + b*x)*sq 
rt(a - b*x)*a**4*b*c*e*f - 15*sqrt(a + b*x)*sqrt(a - b*x)*a**4*b*c*f**2*x 
- 160*sqrt(a + b*x)*sqrt(a - b*x)*a**3*b**3*e*f - 30*sqrt(a + b*x)*sqrt(a 
- b*x)*a**3*b**3*f**2*x - 80*sqrt(a + b*x)*sqrt(a - b*x)*a**2*b**4*e**2 - 
60*sqrt(a + b*x)*sqrt(a - b*x)*a**2*b**4*e*f*x - 16*sqrt(a + b*x)*sqrt(a - 
 b*x)*a**2*b**4*f**2*x**2 - 30*sqrt(a + b*x)*sqrt(a - b*x)*a**2*b**3*c*e** 
2*x - 32*sqrt(a + b*x)*sqrt(a - b*x)*a**2*b**3*c*e*f*x**2 - 10*sqrt(a + b* 
x)*sqrt(a - b*x)*a**2*b**3*c*f**2*x**3 + 120*sqrt(a + b*x)*sqrt(a - b*x)*a 
*b**5*e**2*x + 160*sqrt(a + b*x)*sqrt(a - b*x)*a*b**5*e*f*x**2 + 60*sqrt(a 
 + b*x)*sqrt(a - b*x)*a*b**5*f**2*x**3 + 80*sqrt(a + b*x)*sqrt(a - b*x)*b* 
*6*e**2*x**2 + 120*sqrt(a + b*x)*sqrt(a - b*x)*b**6*e*f*x**3 + 48*sqrt(a + 
 b*x)*sqrt(a - b*x)*b**6*f**2*x**4 + 60*sqrt(a + b*x)*sqrt(a - b*x)*b**5*c 
*e**2*x**3 + 96*sqrt(a + b*x)*sqrt(a - b*x)*b**5*c*e*f*x**4 + 40*sqrt(a + 
b*x)*sqrt(a - b*x)*b**5*c*f**2*x**5))/(240*b**5)