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

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

Optimal result

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

1/2*(a^2*C*f^2+a*b*f*(-2*B*f+3*C*e)-2*b^2*(3*C*e^2-f*(-A*f+2*B*e)))*(b*x+a 
)^(1/2)*(-b*c*x+a*c)^(1/2)/b/f^3/(-a*f+b*e)-1/2*(a^2*C*f^2-b^2*(3*C*e^2-2* 
f*(-A*f+B*e)))*(b*x+a)^(3/2)*(-b*c*x+a*c)^(1/2)/b/f^2/(-a*f+b*e)/(a*f+b*e) 
+(A*f^2-B*e*f+C*e^2)*(b*x+a)^(3/2)*(-b*c*x+a*c)^(3/2)/c/f/(-a*f+b*e)/(a*f+ 
b*e)/(f*x+e)+c^(1/2)*(a^2*C*f^2-2*b^2*(3*C*e^2-f*(-A*f+2*B*e)))*arctan(c^( 
1/2)*(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2))/b/f^4-2*c^(1/2)*(a^2*f^2*(-B*f+2*C* 
e)-b^2*(3*C*e^3-e*f*(-A*f+2*B*e)))*arctan(c^(1/2)*(a*f+b*e)^(1/2)*(b*x+a)^ 
(1/2)/(-a*f+b*e)^(1/2)/(-b*c*x+a*c)^(1/2))/f^4/(-a*f+b*e)^(1/2)/(a*f+b*e)^ 
(1/2)
 

Mathematica [A] (verified)

Time = 0.80 (sec) , antiderivative size = 260, normalized size of antiderivative = 0.59 \[ \int \frac {\sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right )}{(e+f x)^2} \, dx=\frac {\sqrt {c (a-b x)} \left (\frac {f \sqrt {a+b x} \left (2 f (2 B e-A f+B f x)+C \left (-6 e^2-3 e f x+f^2 x^2\right )\right )}{2 (e+f x)}-\frac {\left (-a^2 C f^2+2 b^2 \left (3 C e^2+f (-2 B e+A f)\right )\right ) \arctan \left (\frac {\sqrt {a+b x}}{\sqrt {a-b x}}\right )}{b \sqrt {a-b x}}+\frac {2 \left (a^2 f^2 (-2 C e+B f)+b^2 \left (3 C e^3+e f (-2 B e+A f)\right )\right ) \arctan \left (\frac {\sqrt {b e+a f} \sqrt {a+b x}}{\sqrt {b e-a f} \sqrt {a-b x}}\right )}{\sqrt {b e-a f} \sqrt {b e+a f} \sqrt {a-b x}}\right )}{f^4} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 1.06 (sec) , antiderivative size = 462, normalized size of antiderivative = 1.04, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2113, 2182, 27, 682, 27, 719, 224, 216, 488, 217}

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

\(\Big \downarrow \) 2113

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

\(\Big \downarrow \) 2182

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

\(\Big \downarrow \) 682

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

\(\Big \downarrow \) 719

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

\(\Big \downarrow \) 488

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

\(\Big \downarrow \) 217

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

Input:

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

Output:

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

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 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 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( 
-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & 
& (LtQ[a, 0] || LtQ[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 488
Int[1/(((c_) + (d_.)*(x_))*Sqrt[(a_) + (b_.)*(x_)^2]), x_Symbol] :> -Subst[ 
Int[1/(b*c^2 + a*d^2 - x^2), x], x, (a*d - b*c*x)/Sqrt[a + b*x^2]] /; FreeQ 
[{a, b, c, d}, x]
 

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

rule 719
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p 
_.), x_Symbol] :> Simp[g/e   Int[(d + e*x)^(m + 1)*(a + c*x^2)^p, x], x] + 
Simp[(e*f - d*g)/e   Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, 
d, e, f, g, m, p}, x] &&  !IGtQ[m, 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 2182
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> 
 With[{Qx = PolynomialQuotient[Pq, d + e*x, x], R = PolynomialRemainder[Pq, 
 d + e*x, x]}, Simp[e*R*(d + e*x)^(m + 1)*((a + b*x^2)^(p + 1)/((m + 1)*(b* 
d^2 + a*e^2))), x] + Simp[1/((m + 1)*(b*d^2 + a*e^2))   Int[(d + e*x)^(m + 
1)*(a + b*x^2)^p*ExpandToSum[(m + 1)*(b*d^2 + a*e^2)*Qx + b*d*R*(m + 1) - b 
*e*R*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, d, e, p}, x] && PolyQ[Pq, 
 x] && NeQ[b*d^2 + a*e^2, 0] && LtQ[m, -1]
 
Maple [A] (verified)

Time = 1.05 (sec) , antiderivative size = 707, normalized size of antiderivative = 1.59

method result size
risch \(\frac {\left (C f x +2 B f -4 C e \right ) \left (-b x +a \right ) \sqrt {b x +a}\, c}{2 f^{3} \sqrt {-c \left (b x -a \right )}}-\frac {\left (\frac {\left (2 A \,b^{2} f^{2}-4 e B \,b^{2} f -a^{2} C \,f^{2}+6 e^{2} b^{2} C \right ) \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {-b^{2} c \,x^{2}+a^{2} c}}\right )}{f \sqrt {b^{2} c}}+\frac {2 \left (2 A \,b^{2} e \,f^{2}+a^{2} B \,f^{3}-3 e^{2} B \,b^{2} f -2 C \,a^{2} e \,f^{2}+4 e^{3} b^{2} C \right ) \ln \left (\frac {\frac {2 c \left (a^{2} f^{2}-b^{2} e^{2}\right )}{f^{2}}+\frac {2 b^{2} c e \left (x +\frac {e}{f}\right )}{f}+2 \sqrt {\frac {c \left (a^{2} f^{2}-b^{2} e^{2}\right )}{f^{2}}}\, \sqrt {-\left (x +\frac {e}{f}\right )^{2} b^{2} c +\frac {2 b^{2} c e \left (x +\frac {e}{f}\right )}{f}+\frac {c \left (a^{2} f^{2}-b^{2} e^{2}\right )}{f^{2}}}}{x +\frac {e}{f}}\right )}{f^{2} \sqrt {\frac {c \left (a^{2} f^{2}-b^{2} e^{2}\right )}{f^{2}}}}-\frac {2 \left (a^{2} A \,f^{4}-A \,b^{2} e^{2} f^{2}-B \,a^{2} e \,f^{3}+e^{3} B \,b^{2} f +C \,a^{2} e^{2} f^{2}-e^{4} b^{2} C \right ) \left (-\frac {f^{2} \sqrt {-\left (x +\frac {e}{f}\right )^{2} b^{2} c +\frac {2 b^{2} c e \left (x +\frac {e}{f}\right )}{f}+\frac {c \left (a^{2} f^{2}-b^{2} e^{2}\right )}{f^{2}}}}{c \left (a^{2} f^{2}-b^{2} e^{2}\right ) \left (x +\frac {e}{f}\right )}+\frac {b^{2} e f \ln \left (\frac {\frac {2 c \left (a^{2} f^{2}-b^{2} e^{2}\right )}{f^{2}}+\frac {2 b^{2} c e \left (x +\frac {e}{f}\right )}{f}+2 \sqrt {\frac {c \left (a^{2} f^{2}-b^{2} e^{2}\right )}{f^{2}}}\, \sqrt {-\left (x +\frac {e}{f}\right )^{2} b^{2} c +\frac {2 b^{2} c e \left (x +\frac {e}{f}\right )}{f}+\frac {c \left (a^{2} f^{2}-b^{2} e^{2}\right )}{f^{2}}}}{x +\frac {e}{f}}\right )}{\left (a^{2} f^{2}-b^{2} e^{2}\right ) \sqrt {\frac {c \left (a^{2} f^{2}-b^{2} e^{2}\right )}{f^{2}}}}\right )}{f^{3}}\right ) \sqrt {-\left (b x +a \right ) c \left (b x -a \right )}\, c}{2 f^{3} \sqrt {b x +a}\, \sqrt {-c \left (b x -a \right )}}\) \(707\)
default \(\text {Expression too large to display}\) \(1724\)

Input:

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

Output:

1/2*(C*f*x+2*B*f-4*C*e)*(-b*x+a)*(b*x+a)^(1/2)/f^3/(-c*(b*x-a))^(1/2)*c-1/ 
2/f^3*((2*A*b^2*f^2-4*B*b^2*e*f-C*a^2*f^2+6*C*b^2*e^2)/f/(b^2*c)^(1/2)*arc 
tan((b^2*c)^(1/2)*x/(-b^2*c*x^2+a^2*c)^(1/2))+2/f^2*(2*A*b^2*e*f^2+B*a^2*f 
^3-3*B*b^2*e^2*f-2*C*a^2*e*f^2+4*C*b^2*e^3)/(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2 
)*ln((2*c*(a^2*f^2-b^2*e^2)/f^2+2*b^2*c*e/f*(x+e/f)+2*(c*(a^2*f^2-b^2*e^2) 
/f^2)^(1/2)*(-(x+e/f)^2*b^2*c+2*b^2*c*e/f*(x+e/f)+c*(a^2*f^2-b^2*e^2)/f^2) 
^(1/2))/(x+e/f))-2*(A*a^2*f^4-A*b^2*e^2*f^2-B*a^2*e*f^3+B*b^2*e^3*f+C*a^2* 
e^2*f^2-C*b^2*e^4)/f^3*(-1/c/(a^2*f^2-b^2*e^2)*f^2/(x+e/f)*(-(x+e/f)^2*b^2 
*c+2*b^2*c*e/f*(x+e/f)+c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)+b^2*e*f/(a^2*f^2-b^2 
*e^2)/(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*ln((2*c*(a^2*f^2-b^2*e^2)/f^2+2*b^2* 
c*e/f*(x+e/f)+2*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*(-(x+e/f)^2*b^2*c+2*b^2*c* 
e/f*(x+e/f)+c*(a^2*f^2-b^2*e^2)/f^2)^(1/2))/(x+e/f))))*(-(b*x+a)*c*(b*x-a) 
)^(1/2)/(b*x+a)^(1/2)/(-c*(b*x-a))^(1/2)*c
 

Fricas [F(-1)]

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

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

Output:

Timed out
 

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

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

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(e>0)', see `assume?` for more de 
tails)Is e
 

Giac [A] (verification not implemented)

Time = 0.46 (sec) , antiderivative size = 631, normalized size of antiderivative = 1.42 \[ \int \frac {\sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right )}{(e+f x)^2} \, dx=\frac {\sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a} {\left (\frac {{\left (b x + a\right )} C}{f^{2}} - \frac {4 \, C b e f^{6} + C a f^{7} - 2 \, B b f^{7}}{f^{9}}\right )} - \frac {{\left (6 \, C b^{2} \sqrt {-c} e^{2} - 4 \, B b^{2} \sqrt {-c} e f - C a^{2} \sqrt {-c} f^{2} + 2 \, A b^{2} \sqrt {-c} f^{2}\right )} \log \left ({\left (\sqrt {b x + a} \sqrt {-c} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c}\right )}^{2}\right )}{f^{4}} - \frac {4 \, {\left (3 \, C b^{3} \sqrt {-c} c e^{3} - 2 \, B b^{3} \sqrt {-c} c e^{2} f - 2 \, C a^{2} b \sqrt {-c} c e f^{2} + A b^{3} \sqrt {-c} c e f^{2} + B a^{2} b \sqrt {-c} c f^{3}\right )} \arctan \left (-\frac {2 \, b c e - {\left (\sqrt {b x + a} \sqrt {-c} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c}\right )}^{2} f}{2 \, \sqrt {-b^{2} e^{2} + a^{2} f^{2}} c}\right )}{\sqrt {-b^{2} e^{2} + a^{2} f^{2}} c f^{4}} - \frac {8 \, {\left (C b^{3} {\left (\sqrt {b x + a} \sqrt {-c} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c}\right )}^{2} \sqrt {-c} c e^{3} - B b^{3} {\left (\sqrt {b x + a} \sqrt {-c} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c}\right )}^{2} \sqrt {-c} c e^{2} f - 2 \, C a^{2} b^{2} \sqrt {-c} c^{2} e^{2} f + A b^{3} {\left (\sqrt {b x + a} \sqrt {-c} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c}\right )}^{2} \sqrt {-c} c e f^{2} + 2 \, B a^{2} b^{2} \sqrt {-c} c^{2} e f^{2} - 2 \, A a^{2} b^{2} \sqrt {-c} c^{2} f^{3}\right )}}{{\left (4 \, b {\left (\sqrt {b x + a} \sqrt {-c} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c}\right )}^{2} c e - {\left (\sqrt {b x + a} \sqrt {-c} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c}\right )}^{4} f - 4 \, a^{2} c^{2} f\right )} f^{4}}}{2 \, b} \] Input:

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

Output:

1/2*(sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a)*((b*x + a)*C/f^2 - (4*C*b*e* 
f^6 + C*a*f^7 - 2*B*b*f^7)/f^9) - (6*C*b^2*sqrt(-c)*e^2 - 4*B*b^2*sqrt(-c) 
*e*f - C*a^2*sqrt(-c)*f^2 + 2*A*b^2*sqrt(-c)*f^2)*log((sqrt(b*x + a)*sqrt( 
-c) - sqrt(-(b*x + a)*c + 2*a*c))^2)/f^4 - 4*(3*C*b^3*sqrt(-c)*c*e^3 - 2*B 
*b^3*sqrt(-c)*c*e^2*f - 2*C*a^2*b*sqrt(-c)*c*e*f^2 + A*b^3*sqrt(-c)*c*e*f^ 
2 + B*a^2*b*sqrt(-c)*c*f^3)*arctan(-1/2*(2*b*c*e - (sqrt(b*x + a)*sqrt(-c) 
 - sqrt(-(b*x + a)*c + 2*a*c))^2*f)/(sqrt(-b^2*e^2 + a^2*f^2)*c))/(sqrt(-b 
^2*e^2 + a^2*f^2)*c*f^4) - 8*(C*b^3*(sqrt(b*x + a)*sqrt(-c) - sqrt(-(b*x + 
 a)*c + 2*a*c))^2*sqrt(-c)*c*e^3 - B*b^3*(sqrt(b*x + a)*sqrt(-c) - sqrt(-( 
b*x + a)*c + 2*a*c))^2*sqrt(-c)*c*e^2*f - 2*C*a^2*b^2*sqrt(-c)*c^2*e^2*f + 
 A*b^3*(sqrt(b*x + a)*sqrt(-c) - sqrt(-(b*x + a)*c + 2*a*c))^2*sqrt(-c)*c* 
e*f^2 + 2*B*a^2*b^2*sqrt(-c)*c^2*e*f^2 - 2*A*a^2*b^2*sqrt(-c)*c^2*f^3)/((4 
*b*(sqrt(b*x + a)*sqrt(-c) - sqrt(-(b*x + a)*c + 2*a*c))^2*c*e - (sqrt(b*x 
 + a)*sqrt(-c) - sqrt(-(b*x + a)*c + 2*a*c))^4*f - 4*a^2*c^2*f)*f^4))/b
 

Mupad [B] (verification not implemented)

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

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

Output:

((16*B*a^(1/2)*c*(a*c)^(1/2)*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^6)/(f^2*( 
(a + b*x)^(1/2) - a^(1/2))^6) + (16*B*a^(1/2)*c^3*(a*c)^(1/2)*((a*c - b*c* 
x)^(1/2) - (a*c)^(1/2))^2)/(f^2*((a + b*x)^(1/2) - a^(1/2))^2) + (32*B*a^( 
1/2)*c^2*(a*c)^(1/2)*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^4)/(f^2*((a + b*x 
)^(1/2) - a^(1/2))^4) + (4*B*a^2*c^4*((a*c - b*c*x)^(1/2) - (a*c)^(1/2)))/ 
(b*e*f*((a + b*x)^(1/2) - a^(1/2))) - (4*B*a^2*c*((a*c - b*c*x)^(1/2) - (a 
*c)^(1/2))^7)/(b*e*f*((a + b*x)^(1/2) - a^(1/2))^7) + (36*B*a^2*c^3*((a*c 
- b*c*x)^(1/2) - (a*c)^(1/2))^3)/(b*e*f*((a + b*x)^(1/2) - a^(1/2))^3) - ( 
36*B*a^2*c^2*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^5)/(b*e*f*((a + b*x)^(1/2 
) - a^(1/2))^5))/(((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^8/((a + b*x)^(1/2) - 
 a^(1/2))^8 + c^4 + (4*c*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^6)/((a + b*x) 
^(1/2) - a^(1/2))^6 + (4*c^3*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^2)/((a + 
b*x)^(1/2) - a^(1/2))^2 + (6*c^2*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^4)/(( 
a + b*x)^(1/2) - a^(1/2))^4 - (4*a^(1/2)*f*(a*c)^(1/2)*((a*c - b*c*x)^(1/2 
) - (a*c)^(1/2))^7)/(b*e*((a + b*x)^(1/2) - a^(1/2))^7) + (4*a^(1/2)*c^3*f 
*(a*c)^(1/2)*((a*c - b*c*x)^(1/2) - (a*c)^(1/2)))/(b*e*((a + b*x)^(1/2) - 
a^(1/2))) - (4*a^(1/2)*c*f*(a*c)^(1/2)*((a*c - b*c*x)^(1/2) - (a*c)^(1/2)) 
^5)/(b*e*((a + b*x)^(1/2) - a^(1/2))^5) + (4*a^(1/2)*c^2*f*(a*c)^(1/2)*((a 
*c - b*c*x)^(1/2) - (a*c)^(1/2))^3)/(b*e*((a + b*x)^(1/2) - a^(1/2))^3)) - 
 ((66*C*a^2*c^5*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^3)/(b*f^2*((a + b*x...
 

Reduce [B] (verification not implemented)

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

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

Output:

(sqrt(c)*( - 2*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**5*c*e*f**5 - 2*asi 
n(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**5*c*f**6*x + 4*asin(sqrt(a - b*x)/(s 
qrt(a)*sqrt(2)))*a**4*b**2*e*f**5 + 4*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)) 
)*a**4*b**2*f**6*x - 2*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**4*b*c*e**2 
*f**4 - 2*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**4*b*c*e*f**5*x - 4*asin 
(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**3*b**3*e**2*f**4 - 4*asin(sqrt(a - b* 
x)/(sqrt(a)*sqrt(2)))*a**3*b**3*e*f**5*x + 14*asin(sqrt(a - b*x)/(sqrt(a)* 
sqrt(2)))*a**3*b**2*c*e**3*f**3 + 14*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2))) 
*a**3*b**2*c*e**2*f**4*x - 12*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**2*b 
**4*e**3*f**3 - 12*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**2*b**4*e**2*f* 
*4*x + 14*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**2*b**3*c*e**4*f**2 + 14 
*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**2*b**3*c*e**3*f**3*x + 4*asin(sq 
rt(a - b*x)/(sqrt(a)*sqrt(2)))*a*b**5*e**4*f**2 + 4*asin(sqrt(a - b*x)/(sq 
rt(a)*sqrt(2)))*a*b**5*e**3*f**3*x - 12*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2 
)))*a*b**4*c*e**5*f - 12*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a*b**4*c*e* 
*4*f**2*x + 8*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*b**6*e**5*f + 8*asin(s 
qrt(a - b*x)/(sqrt(a)*sqrt(2)))*b**6*e**4*f**2*x - 12*asin(sqrt(a - b*x)/( 
sqrt(a)*sqrt(2)))*b**5*c*e**6 - 12*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*b 
**5*c*e**5*f*x - 4*sqrt(f)*sqrt(a)*sqrt(2*sqrt(f)*sqrt(a)*sqrt(a*f - b*e)* 
sqrt(2) - 3*a*f + b*e)*sqrt(a*f + b*e)*sqrt(a*f - b*e)*sqrt(2)*atan((ta...