\(\int \frac {(c+d x)^2 (g+h x)}{(a+b x)^3 \sqrt {e+f x}} \, dx\) [120]

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

Optimal result

Integrand size = 29, antiderivative size = 329 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^3 \sqrt {e+f x}} \, dx=\frac {2 d^2 h \sqrt {e+f x}}{b^3 f}-\frac {(b c-a d)^2 (b g-a h) \sqrt {e+f x}}{2 b^3 (b e-a f) (a+b x)^2}-\frac {(b c-a d) \left (9 a^2 d f h+b^2 (8 d e g-3 c f g+4 c e h)-a b (5 d f g+12 d e h+c f h)\right ) \sqrt {e+f x}}{4 b^3 (b e-a f)^2 (a+b x)}-\frac {\left (4 d (b e-a f) (2 b e-a f) (b d g+2 b c h-3 a d h)-f \left (3 a^3 d^2 f h+a^2 b d f (d g+2 c h)+b^3 c (8 d e g-3 c f g+4 c e h)-a b^2 \left (4 d^2 e g+c^2 f h+2 c d (f g+4 e h)\right )\right )\right ) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {b e-a f}}\right )}{4 b^{7/2} (b e-a f)^{5/2}} \] Output:

2*d^2*h*(f*x+e)^(1/2)/b^3/f-1/2*(-a*d+b*c)^2*(-a*h+b*g)*(f*x+e)^(1/2)/b^3/ 
(-a*f+b*e)/(b*x+a)^2-1/4*(-a*d+b*c)*(9*a^2*d*f*h+b^2*(4*c*e*h-3*c*f*g+8*d* 
e*g)-a*b*(c*f*h+12*d*e*h+5*d*f*g))*(f*x+e)^(1/2)/b^3/(-a*f+b*e)^2/(b*x+a)- 
1/4*(4*d*(-a*f+b*e)*(-a*f+2*b*e)*(-3*a*d*h+2*b*c*h+b*d*g)-f*(3*a^3*d^2*f*h 
+a^2*b*d*f*(2*c*h+d*g)+b^3*c*(4*c*e*h-3*c*f*g+8*d*e*g)-a*b^2*(4*d^2*e*g+c^ 
2*f*h+2*c*d*(4*e*h+f*g))))*arctanh(b^(1/2)*(f*x+e)^(1/2)/(-a*f+b*e)^(1/2)) 
/b^(7/2)/(-a*f+b*e)^(5/2)
 

Mathematica [A] (verified)

Time = 1.20 (sec) , antiderivative size = 425, normalized size of antiderivative = 1.29 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^3 \sqrt {e+f x}} \, dx=\frac {\frac {\sqrt {b} \sqrt {e+f x} \left (15 a^4 d^2 f^2 h+a b^3 \left (2 c d f (-2 e g+f g x+8 e h x)+8 d^2 e x (f g+2 e h-2 f h x)+c^2 f (5 f g-2 e h+f h x)\right )+a^3 b d f (-6 c f h+d (-3 f g-26 e h+25 f h x))+b^4 \left (-8 c d e f g x+8 d^2 e^2 h x^2+c^2 f (3 f g x-2 e (g+2 h x))\right )+a^2 b^2 \left (-c^2 f^2 h-2 c d f (-6 e h+f (g+5 h x))+d^2 \left (8 e^2 h+e f (6 g-44 h x)+f^2 x (-5 g+8 h x)\right )\right )\right )}{f (b e-a f)^2 (a+b x)^2}+\frac {\left (-15 a^3 d^2 f^2 h+3 a^2 b d f (d f g+12 d e h+2 c f h)+b^3 \left (8 d^2 e^2 g+c^2 f (3 f g-4 e h)+8 c d e (-f g+2 e h)\right )+a b^2 \left (c^2 f^2 h+2 c d f (f g-8 e h)-8 d^2 e (f g+3 e h)\right )\right ) \arctan \left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {-b e+a f}}\right )}{(-b e+a f)^{5/2}}}{4 b^{7/2}} \] Input:

Integrate[((c + d*x)^2*(g + h*x))/((a + b*x)^3*Sqrt[e + f*x]),x]
 

Output:

((Sqrt[b]*Sqrt[e + f*x]*(15*a^4*d^2*f^2*h + a*b^3*(2*c*d*f*(-2*e*g + f*g*x 
 + 8*e*h*x) + 8*d^2*e*x*(f*g + 2*e*h - 2*f*h*x) + c^2*f*(5*f*g - 2*e*h + f 
*h*x)) + a^3*b*d*f*(-6*c*f*h + d*(-3*f*g - 26*e*h + 25*f*h*x)) + b^4*(-8*c 
*d*e*f*g*x + 8*d^2*e^2*h*x^2 + c^2*f*(3*f*g*x - 2*e*(g + 2*h*x))) + a^2*b^ 
2*(-(c^2*f^2*h) - 2*c*d*f*(-6*e*h + f*(g + 5*h*x)) + d^2*(8*e^2*h + e*f*(6 
*g - 44*h*x) + f^2*x*(-5*g + 8*h*x)))))/(f*(b*e - a*f)^2*(a + b*x)^2) + (( 
-15*a^3*d^2*f^2*h + 3*a^2*b*d*f*(d*f*g + 12*d*e*h + 2*c*f*h) + b^3*(8*d^2* 
e^2*g + c^2*f*(3*f*g - 4*e*h) + 8*c*d*e*(-(f*g) + 2*e*h)) + a*b^2*(c^2*f^2 
*h + 2*c*d*f*(f*g - 8*e*h) - 8*d^2*e*(f*g + 3*e*h)))*ArcTan[(Sqrt[b]*Sqrt[ 
e + f*x])/Sqrt[-(b*e) + a*f]])/(-(b*e) + a*f)^(5/2))/(4*b^(7/2))
 

Rubi [A] (verified)

Time = 0.59 (sec) , antiderivative size = 400, normalized size of antiderivative = 1.22, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {166, 27, 25, 163, 73, 221}

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 {(c+d x)^2 (g+h x)}{(a+b x)^3 \sqrt {e+f x}} \, dx\)

\(\Big \downarrow \) 166

\(\displaystyle \frac {\int \frac {(c+d x) ((4 d e+c f) (b g-a h)-4 b c (f g-e h)+d (b f g+4 b e h-5 a f h) x)}{2 (a+b x)^2 \sqrt {e+f x}}dx}{2 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{2 b (a+b x)^2 (b e-a f)}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int -\frac {(c+d x) (a (4 d e+c f) h-b (4 d e g-3 c f g+4 c e h)-d (b f g+4 b e h-5 a f h) x)}{(a+b x)^2 \sqrt {e+f x}}dx}{4 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{2 b (a+b x)^2 (b e-a f)}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\int \frac {(c+d x) (a (4 d e+c f) h-b (4 d e g-3 c f g+4 c e h)-d (b f g+4 b e h-5 a f h) x)}{(a+b x)^2 \sqrt {e+f x}}dx}{4 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{2 b (a+b x)^2 (b e-a f)}\)

\(\Big \downarrow \) 163

\(\displaystyle -\frac {\frac {\left (15 a^3 d^2 f^2 h-3 a^2 b d f (2 c f h+12 d e h+d f g)-a b^2 \left (c^2 f^2 h+2 c d f (f g-8 e h)-8 d^2 e (3 e h+f g)\right )-b^3 \left (c^2 f (3 f g-4 e h)-8 c d e (f g-2 e h)+8 d^2 e^2 g\right )\right ) \int \frac {1}{(a+b x) \sqrt {e+f x}}dx}{2 b^2 (b e-a f)}-\frac {\sqrt {e+f x} \left (15 a^3 d^2 f^2 h-a^2 b d f (6 c f h+26 d e h+3 d f g)+a b^2 \left (c^2 f^2 h-2 c d f (f g-6 e h)+2 d^2 e (4 e h+3 f g)\right )+2 b d^2 x (b e-a f) (-5 a f h+4 b e h+b f g)-b^3 c f (4 c e h-3 c f g+4 d e g)\right )}{b^2 f (a+b x) (b e-a f)}}{4 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{2 b (a+b x)^2 (b e-a f)}\)

\(\Big \downarrow \) 73

\(\displaystyle -\frac {\frac {\left (15 a^3 d^2 f^2 h-3 a^2 b d f (2 c f h+12 d e h+d f g)-a b^2 \left (c^2 f^2 h+2 c d f (f g-8 e h)-8 d^2 e (3 e h+f g)\right )-b^3 \left (c^2 f (3 f g-4 e h)-8 c d e (f g-2 e h)+8 d^2 e^2 g\right )\right ) \int \frac {1}{a+\frac {b (e+f x)}{f}-\frac {b e}{f}}d\sqrt {e+f x}}{b^2 f (b e-a f)}-\frac {\sqrt {e+f x} \left (15 a^3 d^2 f^2 h-a^2 b d f (6 c f h+26 d e h+3 d f g)+a b^2 \left (c^2 f^2 h-2 c d f (f g-6 e h)+2 d^2 e (4 e h+3 f g)\right )+2 b d^2 x (b e-a f) (-5 a f h+4 b e h+b f g)-b^3 c f (4 c e h-3 c f g+4 d e g)\right )}{b^2 f (a+b x) (b e-a f)}}{4 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{2 b (a+b x)^2 (b e-a f)}\)

\(\Big \downarrow \) 221

\(\displaystyle -\frac {-\frac {\text {arctanh}\left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {b e-a f}}\right ) \left (15 a^3 d^2 f^2 h-3 a^2 b d f (2 c f h+12 d e h+d f g)-a b^2 \left (c^2 f^2 h+2 c d f (f g-8 e h)-8 d^2 e (3 e h+f g)\right )-b^3 \left (c^2 f (3 f g-4 e h)-8 c d e (f g-2 e h)+8 d^2 e^2 g\right )\right )}{b^{5/2} (b e-a f)^{3/2}}-\frac {\sqrt {e+f x} \left (15 a^3 d^2 f^2 h-a^2 b d f (6 c f h+26 d e h+3 d f g)+a b^2 \left (c^2 f^2 h-2 c d f (f g-6 e h)+2 d^2 e (4 e h+3 f g)\right )+2 b d^2 x (b e-a f) (-5 a f h+4 b e h+b f g)-b^3 c f (4 c e h-3 c f g+4 d e g)\right )}{b^2 f (a+b x) (b e-a f)}}{4 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{2 b (a+b x)^2 (b e-a f)}\)

Input:

Int[((c + d*x)^2*(g + h*x))/((a + b*x)^3*Sqrt[e + f*x]),x]
 

Output:

-1/2*((b*g - a*h)*(c + d*x)^2*Sqrt[e + f*x])/(b*(b*e - a*f)*(a + b*x)^2) - 
 (-((Sqrt[e + f*x]*(15*a^3*d^2*f^2*h - b^3*c*f*(4*d*e*g - 3*c*f*g + 4*c*e* 
h) - a^2*b*d*f*(3*d*f*g + 26*d*e*h + 6*c*f*h) + a*b^2*(c^2*f^2*h - 2*c*d*f 
*(f*g - 6*e*h) + 2*d^2*e*(3*f*g + 4*e*h)) + 2*b*d^2*(b*e - a*f)*(b*f*g + 4 
*b*e*h - 5*a*f*h)*x))/(b^2*f*(b*e - a*f)*(a + b*x))) - ((15*a^3*d^2*f^2*h 
- 3*a^2*b*d*f*(d*f*g + 12*d*e*h + 2*c*f*h) - b^3*(8*d^2*e^2*g + c^2*f*(3*f 
*g - 4*e*h) - 8*c*d*e*(f*g - 2*e*h)) - a*b^2*(c^2*f^2*h + 2*c*d*f*(f*g - 8 
*e*h) - 8*d^2*e*(f*g + 3*e*h)))*ArcTanh[(Sqrt[b]*Sqrt[e + f*x])/Sqrt[b*e - 
 a*f]])/(b^(5/2)*(b*e - a*f)^(3/2)))/(4*b*(b*e - a*f))
 

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 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 163
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_) 
)*((g_.) + (h_.)*(x_)), x_] :> Simp[((a^2*d*f*h*(n + 2) + b^2*d*e*g*(m + n 
+ 3) + a*b*(c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 3)) + b*f*h*(b*c - a*d)* 
(m + 1)*x)/(b^2*d*(b*c - a*d)*(m + 1)*(m + n + 3)))*(a + b*x)^(m + 1)*(c + 
d*x)^(n + 1), x] - Simp[(a^2*d^2*f*h*(n + 1)*(n + 2) + a*b*d*(n + 1)*(2*c*f 
*h*(m + 1) - d*(f*g + e*h)*(m + n + 3)) + b^2*(c^2*f*h*(m + 1)*(m + 2) - c* 
d*(f*g + e*h)*(m + 1)*(m + n + 3) + d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2* 
d*(b*c - a*d)*(m + 1)*(m + n + 3))   Int[(a + b*x)^(m + 1)*(c + d*x)^n, x], 
 x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && ((GeQ[m, -2] && LtQ[m, - 
1]) || SumSimplerQ[m, 1]) && NeQ[m, -1] && NeQ[m + n + 3, 0]
 

rule 166
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[(b*g - a*h)*(a + b*x)^(m + 1)*(c + 
 d*x)^n*((e + f*x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] - Simp[1/(b*(b*e - 
a*f)*(m + 1))   Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^p*Simp[b* 
c*(f*g - e*h)*(m + 1) + (b*g - a*h)*(d*e*n + c*f*(p + 1)) + d*(b*(f*g - e*h 
)*(m + 1) + f*(b*g - a*h)*(n + p + 1))*x, x], x], x] /; FreeQ[{a, b, c, d, 
e, f, g, h, p}, x] && ILtQ[m, -1] && GtQ[n, 0]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 
Maple [A] (verified)

Time = 0.64 (sec) , antiderivative size = 448, normalized size of antiderivative = 1.36

method result size
pseudoelliptic \(-\frac {15 \left (\left (\left (-\frac {g \,f^{2} c^{2}}{5}+\frac {4 c e \left (c h +2 d g \right ) f}{15}-\frac {16 \left (c h +\frac {d g}{2}\right ) d \,e^{2}}{15}\right ) b^{3}-\frac {\left (\left (h \,c^{2}+2 c d g \right ) f^{2}+\left (-16 c d e h -8 d^{2} e g \right ) f -24 d^{2} e^{2} h \right ) a \,b^{2}}{15}-\frac {2 a^{2} d \left (\left (c h +\frac {d g}{2}\right ) f +6 d e h \right ) f b}{5}+a^{3} d^{2} f^{2} h \right ) \left (b x +a \right )^{2} f \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )-\left (\left (\frac {c^{2} f^{2} g x}{5}-\frac {2 \left (4 d g x +c \left (2 h x +g \right )\right ) c e f}{15}+\frac {8 d^{2} e^{2} h \,x^{2}}{15}\right ) b^{4}-\frac {2 a \left (\left (-c d g x -\frac {5 c^{2} \left (\frac {h x}{5}+g \right )}{2}\right ) f^{2}+\left (\left (8 h \,x^{2}-4 g x \right ) d^{2}+2 c \left (-4 h x +g \right ) d +h \,c^{2}\right ) e f -8 d^{2} e^{2} h x \right ) b^{3}}{15}-\frac {a^{2} \left (\left (\left (-8 h \,x^{2}+5 g x \right ) d^{2}+2 c \left (5 h x +g \right ) d +h \,c^{2}\right ) f^{2}-12 d \left (\left (-\frac {11 h x}{3}+\frac {g}{2}\right ) d +c h \right ) e f -8 d^{2} e^{2} h \right ) b^{2}}{15}-\frac {2 a^{3} d \left (\left (\left (-\frac {25 h x}{6}+\frac {g}{2}\right ) d +c h \right ) f +\frac {13 d e h}{3}\right ) f b}{5}+a^{4} d^{2} f^{2} h \right ) \sqrt {f x +e}\, \sqrt {\left (a f -b e \right ) b}\right )}{4 \sqrt {\left (a f -b e \right ) b}\, \left (a f -b e \right )^{2} \left (b x +a \right )^{2} b^{3} f}\) \(448\)
risch \(\frac {2 d^{2} h \sqrt {f x +e}}{b^{3} f}-\frac {\frac {-\frac {b f \left (9 a^{3} d^{2} f h -10 a^{2} b c d f h -12 a^{2} b \,d^{2} e h -5 a^{2} b \,d^{2} f g +a \,b^{2} c^{2} f h +16 a \,b^{2} c d e h +2 a \,b^{2} c d f g +8 a \,b^{2} d^{2} e g -4 b^{3} c^{2} e h +3 b^{3} c^{2} f g -8 b^{3} c d e g \right ) \left (f x +e \right )^{\frac {3}{2}}}{4 \left (a^{2} f^{2}-2 a b f e +b^{2} e^{2}\right )}-\frac {\left (7 a^{3} d^{2} f h -6 a^{2} b c d f h -12 a^{2} b \,d^{2} e h -3 a^{2} b \,d^{2} f g -a \,b^{2} c^{2} f h +16 a \,b^{2} c d e h -2 a \,b^{2} c d f g +8 a \,b^{2} d^{2} e g -4 b^{3} c^{2} e h +5 b^{3} c^{2} f g -8 b^{3} c d e g \right ) f \sqrt {f x +e}}{4 \left (a f -b e \right )}}{\left (\left (f x +e \right ) b +a f -b e \right )^{2}}+\frac {\left (15 a^{3} d^{2} f^{2} h -6 a^{2} b c d \,f^{2} h -36 a^{2} b \,d^{2} e f h -3 a^{2} b \,d^{2} f^{2} g -a \,b^{2} c^{2} f^{2} h +16 a \,b^{2} c d e f h -2 a \,b^{2} c d \,f^{2} g +24 a \,b^{2} d^{2} e^{2} h +8 a \,b^{2} d^{2} e f g +4 b^{3} c^{2} e f h -3 b^{3} c^{2} f^{2} g -16 b^{3} c d \,e^{2} h +8 b^{3} c d e f g -8 b^{3} d^{2} e^{2} g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{4 \left (a^{2} f^{2}-2 a b f e +b^{2} e^{2}\right ) \sqrt {\left (a f -b e \right ) b}}}{b^{3}}\) \(554\)
derivativedivides \(\frac {\frac {2 d^{2} h \sqrt {f x +e}}{b^{3}}-\frac {2 f \left (\frac {-\frac {b f \left (9 a^{3} d^{2} f h -10 a^{2} b c d f h -12 a^{2} b \,d^{2} e h -5 a^{2} b \,d^{2} f g +a \,b^{2} c^{2} f h +16 a \,b^{2} c d e h +2 a \,b^{2} c d f g +8 a \,b^{2} d^{2} e g -4 b^{3} c^{2} e h +3 b^{3} c^{2} f g -8 b^{3} c d e g \right ) \left (f x +e \right )^{\frac {3}{2}}}{8 \left (a^{2} f^{2}-2 a b f e +b^{2} e^{2}\right )}-\frac {\left (7 a^{3} d^{2} f h -6 a^{2} b c d f h -12 a^{2} b \,d^{2} e h -3 a^{2} b \,d^{2} f g -a \,b^{2} c^{2} f h +16 a \,b^{2} c d e h -2 a \,b^{2} c d f g +8 a \,b^{2} d^{2} e g -4 b^{3} c^{2} e h +5 b^{3} c^{2} f g -8 b^{3} c d e g \right ) f \sqrt {f x +e}}{8 \left (a f -b e \right )}}{\left (\left (f x +e \right ) b +a f -b e \right )^{2}}+\frac {\left (15 a^{3} d^{2} f^{2} h -6 a^{2} b c d \,f^{2} h -36 a^{2} b \,d^{2} e f h -3 a^{2} b \,d^{2} f^{2} g -a \,b^{2} c^{2} f^{2} h +16 a \,b^{2} c d e f h -2 a \,b^{2} c d \,f^{2} g +24 a \,b^{2} d^{2} e^{2} h +8 a \,b^{2} d^{2} e f g +4 b^{3} c^{2} e f h -3 b^{3} c^{2} f^{2} g -16 b^{3} c d \,e^{2} h +8 b^{3} c d e f g -8 b^{3} d^{2} e^{2} g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{8 \left (a^{2} f^{2}-2 a b f e +b^{2} e^{2}\right ) \sqrt {\left (a f -b e \right ) b}}\right )}{b^{3}}}{f}\) \(555\)
default \(\frac {\frac {2 d^{2} h \sqrt {f x +e}}{b^{3}}-\frac {2 f \left (\frac {-\frac {b f \left (9 a^{3} d^{2} f h -10 a^{2} b c d f h -12 a^{2} b \,d^{2} e h -5 a^{2} b \,d^{2} f g +a \,b^{2} c^{2} f h +16 a \,b^{2} c d e h +2 a \,b^{2} c d f g +8 a \,b^{2} d^{2} e g -4 b^{3} c^{2} e h +3 b^{3} c^{2} f g -8 b^{3} c d e g \right ) \left (f x +e \right )^{\frac {3}{2}}}{8 \left (a^{2} f^{2}-2 a b f e +b^{2} e^{2}\right )}-\frac {\left (7 a^{3} d^{2} f h -6 a^{2} b c d f h -12 a^{2} b \,d^{2} e h -3 a^{2} b \,d^{2} f g -a \,b^{2} c^{2} f h +16 a \,b^{2} c d e h -2 a \,b^{2} c d f g +8 a \,b^{2} d^{2} e g -4 b^{3} c^{2} e h +5 b^{3} c^{2} f g -8 b^{3} c d e g \right ) f \sqrt {f x +e}}{8 \left (a f -b e \right )}}{\left (\left (f x +e \right ) b +a f -b e \right )^{2}}+\frac {\left (15 a^{3} d^{2} f^{2} h -6 a^{2} b c d \,f^{2} h -36 a^{2} b \,d^{2} e f h -3 a^{2} b \,d^{2} f^{2} g -a \,b^{2} c^{2} f^{2} h +16 a \,b^{2} c d e f h -2 a \,b^{2} c d \,f^{2} g +24 a \,b^{2} d^{2} e^{2} h +8 a \,b^{2} d^{2} e f g +4 b^{3} c^{2} e f h -3 b^{3} c^{2} f^{2} g -16 b^{3} c d \,e^{2} h +8 b^{3} c d e f g -8 b^{3} d^{2} e^{2} g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{8 \left (a^{2} f^{2}-2 a b f e +b^{2} e^{2}\right ) \sqrt {\left (a f -b e \right ) b}}\right )}{b^{3}}}{f}\) \(555\)

Input:

int((d*x+c)^2*(h*x+g)/(b*x+a)^3/(f*x+e)^(1/2),x,method=_RETURNVERBOSE)
 

Output:

-15/4*(((-1/5*g*f^2*c^2+4/15*c*e*(c*h+2*d*g)*f-16/15*(c*h+1/2*d*g)*d*e^2)* 
b^3-1/15*((c^2*h+2*c*d*g)*f^2+(-16*c*d*e*h-8*d^2*e*g)*f-24*d^2*e^2*h)*a*b^ 
2-2/5*a^2*d*((c*h+1/2*d*g)*f+6*d*e*h)*f*b+a^3*d^2*f^2*h)*(b*x+a)^2*f*arcta 
n(b*(f*x+e)^(1/2)/((a*f-b*e)*b)^(1/2))-((1/5*c^2*f^2*g*x-2/15*(4*d*g*x+c*( 
2*h*x+g))*c*e*f+8/15*d^2*e^2*h*x^2)*b^4-2/15*a*((-c*d*g*x-5/2*c^2*(1/5*h*x 
+g))*f^2+((8*h*x^2-4*g*x)*d^2+2*c*(-4*h*x+g)*d+h*c^2)*e*f-8*d^2*e^2*h*x)*b 
^3-1/15*a^2*(((-8*h*x^2+5*g*x)*d^2+2*c*(5*h*x+g)*d+h*c^2)*f^2-12*d*((-11/3 
*h*x+1/2*g)*d+c*h)*e*f-8*d^2*e^2*h)*b^2-2/5*a^3*d*(((-25/6*h*x+1/2*g)*d+c* 
h)*f+13/3*d*e*h)*f*b+a^4*d^2*f^2*h)*(f*x+e)^(1/2)*((a*f-b*e)*b)^(1/2))/((a 
*f-b*e)*b)^(1/2)/(a*f-b*e)^2/(b*x+a)^2/b^3/f
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1243 vs. \(2 (307) = 614\).

Time = 0.26 (sec) , antiderivative size = 2500, normalized size of antiderivative = 7.60 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^3 \sqrt {e+f x}} \, dx=\text {Too large to display} \] Input:

integrate((d*x+c)^2*(h*x+g)/(b*x+a)^3/(f*x+e)^(1/2),x, algorithm="fricas")
 

Output:

[-1/8*(sqrt(b^2*e - a*b*f)*(((8*b^5*d^2*e^2*f - 8*(b^5*c*d + a*b^4*d^2)*e* 
f^2 + (3*b^5*c^2 + 2*a*b^4*c*d + 3*a^2*b^3*d^2)*f^3)*g + (8*(2*b^5*c*d - 3 
*a*b^4*d^2)*e^2*f - 4*(b^5*c^2 + 4*a*b^4*c*d - 9*a^2*b^3*d^2)*e*f^2 + (a*b 
^4*c^2 + 6*a^2*b^3*c*d - 15*a^3*b^2*d^2)*f^3)*h)*x^2 + (8*a^2*b^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- (3*b^6*c^2 + 10*a*b^5*c*d - 13*a^2*b^4*d^2)*e*f^2 + (3 
*a*b^5*c^2 + 2*a^2*b^4*c*d - 5*a^3*b^3*d^2)*f^3)*g - (16*a*b^5*d^2*e^3 ...
 

Sympy [F(-1)]

Timed out. \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^3 \sqrt {e+f x}} \, dx=\text {Timed out} \] Input:

integrate((d*x+c)**2*(h*x+g)/(b*x+a)**3/(f*x+e)**(1/2),x)
 

Output:

Timed out
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^3 \sqrt {e+f x}} \, dx=\text {Exception raised: ValueError} \] Input:

integrate((d*x+c)^2*(h*x+g)/(b*x+a)^3/(f*x+e)^(1/2),x, algorithm="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(a*f-b*e>0)', see `assume?` for m 
ore detail
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 864 vs. \(2 (307) = 614\).

Time = 0.15 (sec) , antiderivative size = 864, normalized size of antiderivative = 2.63 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^3 \sqrt {e+f x}} \, dx =\text {Too large to display} \] Input:

integrate((d*x+c)^2*(h*x+g)/(b*x+a)^3/(f*x+e)^(1/2),x, algorithm="giac")
 

Output:

1/4*(8*b^3*d^2*e^2*g - 8*b^3*c*d*e*f*g - 8*a*b^2*d^2*e*f*g + 3*b^3*c^2*f^2 
*g + 2*a*b^2*c*d*f^2*g + 3*a^2*b*d^2*f^2*g + 16*b^3*c*d*e^2*h - 24*a*b^2*d 
^2*e^2*h - 4*b^3*c^2*e*f*h - 16*a*b^2*c*d*e*f*h + 36*a^2*b*d^2*e*f*h + a*b 
^2*c^2*f^2*h + 6*a^2*b*c*d*f^2*h - 15*a^3*d^2*f^2*h)*arctan(sqrt(f*x + e)* 
b/sqrt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t(f*x + e)* 
a^4*d^2*f^3*h)/((b^5*e^2 - 2*a*b^4*e*f + a^2*b^3*f^2)*((f*x + e)*b - b*...
 

Mupad [B] (verification not implemented)

Time = 2.75 (sec) , antiderivative size = 591, normalized size of antiderivative = 1.80 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^3 \sqrt {e+f x}} \, dx=\frac {\frac {{\left (e+f\,x\right )}^{3/2}\,\left (9\,h\,a^3\,b\,d^2\,f^2-10\,h\,a^2\,b^2\,c\,d\,f^2-5\,g\,a^2\,b^2\,d^2\,f^2-12\,e\,h\,a^2\,b^2\,d^2\,f+h\,a\,b^3\,c^2\,f^2+2\,g\,a\,b^3\,c\,d\,f^2+16\,e\,h\,a\,b^3\,c\,d\,f+8\,e\,g\,a\,b^3\,d^2\,f+3\,g\,b^4\,c^2\,f^2-4\,e\,h\,b^4\,c^2\,f-8\,e\,g\,b^4\,c\,d\,f\right )}{4\,{\left (a\,f-b\,e\right )}^2}-\frac {\sqrt {e+f\,x}\,\left (-7\,h\,a^3\,d^2\,f^2+6\,h\,a^2\,b\,c\,d\,f^2+3\,g\,a^2\,b\,d^2\,f^2+12\,e\,h\,a^2\,b\,d^2\,f+h\,a\,b^2\,c^2\,f^2+2\,g\,a\,b^2\,c\,d\,f^2-16\,e\,h\,a\,b^2\,c\,d\,f-8\,e\,g\,a\,b^2\,d^2\,f-5\,g\,b^3\,c^2\,f^2+4\,e\,h\,b^3\,c^2\,f+8\,e\,g\,b^3\,c\,d\,f\right )}{4\,\left (a\,f-b\,e\right )}}{b^5\,{\left (e+f\,x\right )}^2-\left (e+f\,x\right )\,\left (2\,b^5\,e-2\,a\,b^4\,f\right )+b^5\,e^2+a^2\,b^3\,f^2-2\,a\,b^4\,e\,f}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,\sqrt {e+f\,x}}{\sqrt {a\,f-b\,e}}\right )\,\left (-15\,h\,a^3\,d^2\,f^2+6\,h\,a^2\,b\,c\,d\,f^2+36\,h\,a^2\,b\,d^2\,e\,f+3\,g\,a^2\,b\,d^2\,f^2+h\,a\,b^2\,c^2\,f^2-16\,h\,a\,b^2\,c\,d\,e\,f+2\,g\,a\,b^2\,c\,d\,f^2-24\,h\,a\,b^2\,d^2\,e^2-8\,g\,a\,b^2\,d^2\,e\,f-4\,h\,b^3\,c^2\,e\,f+3\,g\,b^3\,c^2\,f^2+16\,h\,b^3\,c\,d\,e^2-8\,g\,b^3\,c\,d\,e\,f+8\,g\,b^3\,d^2\,e^2\right )}{4\,b^{7/2}\,{\left (a\,f-b\,e\right )}^{5/2}}+\frac {2\,d^2\,h\,\sqrt {e+f\,x}}{b^3\,f} \] Input:

int(((g + h*x)*(c + d*x)^2)/((e + f*x)^(1/2)*(a + b*x)^3),x)
 

Output:

(((e + f*x)^(3/2)*(3*b^4*c^2*f^2*g - 4*b^4*c^2*e*f*h + a*b^3*c^2*f^2*h + 9 
*a^3*b*d^2*f^2*h - 5*a^2*b^2*d^2*f^2*g - 8*b^4*c*d*e*f*g + 2*a*b^3*c*d*f^2 
*g + 8*a*b^3*d^2*e*f*g - 10*a^2*b^2*c*d*f^2*h - 12*a^2*b^2*d^2*e*f*h + 16* 
a*b^3*c*d*e*f*h))/(4*(a*f - b*e)^2) - ((e + f*x)^(1/2)*(4*b^3*c^2*e*f*h - 
7*a^3*d^2*f^2*h - 5*b^3*c^2*f^2*g + a*b^2*c^2*f^2*h + 3*a^2*b*d^2*f^2*g + 
8*b^3*c*d*e*f*g + 2*a*b^2*c*d*f^2*g + 6*a^2*b*c*d*f^2*h - 8*a*b^2*d^2*e*f* 
g + 12*a^2*b*d^2*e*f*h - 16*a*b^2*c*d*e*f*h))/(4*(a*f - b*e)))/(b^5*(e + f 
*x)^2 - (e + f*x)*(2*b^5*e - 2*a*b^4*f) + b^5*e^2 + a^2*b^3*f^2 - 2*a*b^4* 
e*f) + (atan((b^(1/2)*(e + f*x)^(1/2))/(a*f - b*e)^(1/2))*(3*b^3*c^2*f^2*g 
 + 8*b^3*d^2*e^2*g - 15*a^3*d^2*f^2*h + 16*b^3*c*d*e^2*h - 4*b^3*c^2*e*f*h 
 + a*b^2*c^2*f^2*h - 24*a*b^2*d^2*e^2*h + 3*a^2*b*d^2*f^2*g - 8*b^3*c*d*e* 
f*g + 2*a*b^2*c*d*f^2*g + 6*a^2*b*c*d*f^2*h - 8*a*b^2*d^2*e*f*g + 36*a^2*b 
*d^2*e*f*h - 16*a*b^2*c*d*e*f*h))/(4*b^(7/2)*(a*f - b*e)^(5/2)) + (2*d^2*h 
*(e + f*x)^(1/2))/(b^3*f)
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 3133, normalized size of antiderivative = 9.52 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^3 \sqrt {e+f x}} \, dx =\text {Too large to display} \] Input:

int((d*x+c)^2*(h*x+g)/(b*x+a)^3/(f*x+e)^(1/2),x)
 

Output:

( - 15*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - 
b*e)))*a**5*d**2*f**3*h + 6*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b) 
/(sqrt(b)*sqrt(a*f - b*e)))*a**4*b*c*d*f**3*h + 36*sqrt(b)*sqrt(a*f - b*e) 
*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**4*b*d**2*e*f**2*h + 
3*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)) 
)*a**4*b*d**2*f**3*g - 30*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/( 
sqrt(b)*sqrt(a*f - b*e)))*a**4*b*d**2*f**3*h*x + sqrt(b)*sqrt(a*f - b*e)*a 
tan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**3*b**2*c**2*f**3*h - 1 
6*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)) 
)*a**3*b**2*c*d*e*f**2*h + 2*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b 
)/(sqrt(b)*sqrt(a*f - b*e)))*a**3*b**2*c*d*f**3*g + 12*sqrt(b)*sqrt(a*f - 
b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**3*b**2*c*d*f**3* 
h*x - 24*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f 
- b*e)))*a**3*b**2*d**2*e**2*f*h - 8*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e 
+ f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**3*b**2*d**2*e*f**2*g + 72*sqrt(b)* 
sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**3*b** 
2*d**2*e*f**2*h*x + 6*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt 
(b)*sqrt(a*f - b*e)))*a**3*b**2*d**2*f**3*g*x - 15*sqrt(b)*sqrt(a*f - b*e) 
*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**3*b**2*d**2*f**3*h*x 
**2 - 4*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*...