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

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 = 653 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^5 \sqrt {e+f x}} \, dx=-\frac {(b c-a d)^2 (b g-a h) \sqrt {e+f x}}{4 b^3 (b e-a f) (a+b x)^4}-\frac {(b c-a d) \left (17 a^2 d f h+b^2 (16 d e g-7 c f g+8 c e h)-a b (9 d f g+24 d e h+c f h)\right ) \sqrt {e+f x}}{24 b^3 (b e-a f)^2 (a+b x)^3}+\frac {\left (59 a^3 d^2 f^2 h-3 a^2 b d f (d f g+56 d e h+2 c f h)-b^3 \left (48 d^2 e^2 g+5 c^2 f (7 f g-8 e h)-16 c d e (5 f g-6 e h)\right )-a b^2 \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)-16 d^2 e (f g+9 e h)\right )\right ) \sqrt {e+f x}}{96 b^3 (b e-a f)^3 (a+b x)^2}+\frac {\left (5 a^3 d^2 f^3 h+3 a^2 b d f^2 (d f g-8 d e h+2 c f h)+b^3 \left (5 c^2 f^2 (7 f g-8 e h)-16 c d e f (5 f g-6 e h)+16 d^2 e^2 (3 f g-4 e h)\right )+a b^2 f \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)-16 d^2 e (f g-3 e h)\right )\right ) \sqrt {e+f x}}{64 b^3 (b e-a f)^4 (a+b x)}-\frac {f \left (5 a^3 d^2 f^3 h+3 a^2 b d f^2 (d f g-8 d e h+2 c f h)+b^3 \left (5 c^2 f^2 (7 f g-8 e h)-16 c d e f (5 f g-6 e h)+16 d^2 e^2 (3 f g-4 e h)\right )+a b^2 f \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)-16 d^2 e (f g-3 e h)\right )\right ) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {b e-a f}}\right )}{64 b^{7/2} (b e-a f)^{9/2}} \] Output:

-1/4*(-a*d+b*c)^2*(-a*h+b*g)*(f*x+e)^(1/2)/b^3/(-a*f+b*e)/(b*x+a)^4-1/24*( 
-a*d+b*c)*(17*a^2*d*f*h+b^2*(8*c*e*h-7*c*f*g+16*d*e*g)-a*b*(c*f*h+24*d*e*h 
+9*d*f*g))*(f*x+e)^(1/2)/b^3/(-a*f+b*e)^2/(b*x+a)^3+1/96*(59*a^3*d^2*f^2*h 
-3*a^2*b*d*f*(2*c*f*h+56*d*e*h+d*f*g)-b^3*(48*d^2*e^2*g+5*c^2*f*(-8*e*h+7* 
f*g)-16*c*d*e*(-6*e*h+5*f*g))-a*b^2*(5*c^2*f^2*h+2*c*d*f*(-16*e*h+5*f*g)-1 
6*d^2*e*(9*e*h+f*g)))*(f*x+e)^(1/2)/b^3/(-a*f+b*e)^3/(b*x+a)^2+1/64*(5*a^3 
*d^2*f^3*h+3*a^2*b*d*f^2*(2*c*f*h-8*d*e*h+d*f*g)+b^3*(5*c^2*f^2*(-8*e*h+7* 
f*g)-16*c*d*e*f*(-6*e*h+5*f*g)+16*d^2*e^2*(-4*e*h+3*f*g))+a*b^2*f*(5*c^2*f 
^2*h+2*c*d*f*(-16*e*h+5*f*g)-16*d^2*e*(-3*e*h+f*g)))*(f*x+e)^(1/2)/b^3/(-a 
*f+b*e)^4/(b*x+a)-1/64*f*(5*a^3*d^2*f^3*h+3*a^2*b*d*f^2*(2*c*f*h-8*d*e*h+d 
*f*g)+b^3*(5*c^2*f^2*(-8*e*h+7*f*g)-16*c*d*e*f*(-6*e*h+5*f*g)+16*d^2*e^2*( 
-4*e*h+3*f*g))+a*b^2*f*(5*c^2*f^2*h+2*c*d*f*(-16*e*h+5*f*g)-16*d^2*e*(-3*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)^(9/2)
 

Mathematica [A] (verified)

Time = 5.53 (sec) , antiderivative size = 908, normalized size of antiderivative = 1.39 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^5 \sqrt {e+f x}} \, dx=-\frac {\sqrt {e+f x} \left (15 a^6 d^2 f^3 h+a^5 b d f^2 (18 c f h+d (9 f g-62 e h+55 f h x))+b^6 \left (48 d^2 e^2 x^2 (-3 f g x+2 e (g+2 h x))+16 c d e x \left (15 f^2 g x^2+4 e^2 (2 g+3 h x)-2 e f x (5 g+9 h x)\right )+c^2 \left (-105 f^3 g x^3+16 e^3 (3 g+4 h x)-8 e^2 f x (7 g+10 h x)+10 e f^2 x^2 (7 g+12 h x)\right )\right )+a b^5 \left (16 d^2 e x \left (3 f^2 g x^2+2 e^2 (2 g+9 h x)-e f x (35 g+9 h x)\right )+c^2 \left (16 e^3 h-5 f^3 x^2 (77 g+3 h x)+18 e f^2 x (14 g+25 h x)-8 e^2 f (25 g+37 h x)\right )+2 c d \left (-15 f^3 g x^3+16 e^3 (g+4 h x)+6 e f^2 x^2 (75 g+8 h x)-8 e^2 f x (37 g+70 h x)\right )\right )+a^4 b^2 f \left (15 c^2 f^2 h+6 c d f (5 f g-14 e h+11 f h x)+d^2 \left (104 e^2 h-6 e f (7 g+38 h x)+f^2 x (33 g+73 h x)\right )\right )+a^3 b^3 \left (c^2 f^2 (-279 f g+146 e h-73 f h x)-2 c d f \left (88 e^2 h+f^2 x (73 g+33 h x)+e f (-146 g+52 h x)\right )+d^2 \left (48 e^3 h-3 f^3 x^2 (11 g+5 h x)-2 e f^2 x (26 g+119 h x)+e^2 f (-88 g+296 h x)\right )\right )+a^2 b^4 \left (d^2 \left (-9 f^3 g x^3+24 e^2 f x (-15 g+8 h x)+16 e^3 (g+12 h x)+2 e f^2 x^2 (91 g+36 h x)\right )+2 c d \left (16 e^3 h-72 e^2 f (g+5 h x)-f^3 x^2 (55 g+9 h x)+2 e f^2 x (310 g+91 h x)\right )+c^2 f \left (-72 e^2 h-f^2 x (511 g+55 h x)+e f (326 g+620 h x)\right )\right )\right )}{192 b^3 (b e-a f)^4 (a+b x)^4}+\frac {f \left (5 a^3 d^2 f^3 h+3 a^2 b d f^2 (d f g-8 d e h+2 c f h)+a b^2 f \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)+16 d^2 e (-f g+3 e h)\right )+b^3 \left (5 c^2 f^2 (7 f g-8 e h)+16 d^2 e^2 (3 f g-4 e h)+16 c d e f (-5 f g+6 e h)\right )\right ) \arctan \left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {-b e+a f}}\right )}{64 b^{7/2} (-b e+a f)^{9/2}} \] Input:

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

Output:

-1/192*(Sqrt[e + f*x]*(15*a^6*d^2*f^3*h + a^5*b*d*f^2*(18*c*f*h + d*(9*f*g 
 - 62*e*h + 55*f*h*x)) + b^6*(48*d^2*e^2*x^2*(-3*f*g*x + 2*e*(g + 2*h*x)) 
+ 16*c*d*e*x*(15*f^2*g*x^2 + 4*e^2*(2*g + 3*h*x) - 2*e*f*x*(5*g + 9*h*x)) 
+ c^2*(-105*f^3*g*x^3 + 16*e^3*(3*g + 4*h*x) - 8*e^2*f*x*(7*g + 10*h*x) + 
10*e*f^2*x^2*(7*g + 12*h*x))) + a*b^5*(16*d^2*e*x*(3*f^2*g*x^2 + 2*e^2*(2* 
g + 9*h*x) - e*f*x*(35*g + 9*h*x)) + c^2*(16*e^3*h - 5*f^3*x^2*(77*g + 3*h 
*x) + 18*e*f^2*x*(14*g + 25*h*x) - 8*e^2*f*(25*g + 37*h*x)) + 2*c*d*(-15*f 
^3*g*x^3 + 16*e^3*(g + 4*h*x) + 6*e*f^2*x^2*(75*g + 8*h*x) - 8*e^2*f*x*(37 
*g + 70*h*x))) + a^4*b^2*f*(15*c^2*f^2*h + 6*c*d*f*(5*f*g - 14*e*h + 11*f* 
h*x) + d^2*(104*e^2*h - 6*e*f*(7*g + 38*h*x) + f^2*x*(33*g + 73*h*x))) + a 
^3*b^3*(c^2*f^2*(-279*f*g + 146*e*h - 73*f*h*x) - 2*c*d*f*(88*e^2*h + f^2* 
x*(73*g + 33*h*x) + e*f*(-146*g + 52*h*x)) + d^2*(48*e^3*h - 3*f^3*x^2*(11 
*g + 5*h*x) - 2*e*f^2*x*(26*g + 119*h*x) + e^2*f*(-88*g + 296*h*x))) + a^2 
*b^4*(d^2*(-9*f^3*g*x^3 + 24*e^2*f*x*(-15*g + 8*h*x) + 16*e^3*(g + 12*h*x) 
 + 2*e*f^2*x^2*(91*g + 36*h*x)) + 2*c*d*(16*e^3*h - 72*e^2*f*(g + 5*h*x) - 
 f^3*x^2*(55*g + 9*h*x) + 2*e*f^2*x*(310*g + 91*h*x)) + c^2*f*(-72*e^2*h - 
 f^2*x*(511*g + 55*h*x) + e*f*(326*g + 620*h*x)))))/(b^3*(b*e - a*f)^4*(a 
+ b*x)^4) + (f*(5*a^3*d^2*f^3*h + 3*a^2*b*d*f^2*(d*f*g - 8*d*e*h + 2*c*f*h 
) + a*b^2*f*(5*c^2*f^2*h + 2*c*d*f*(5*f*g - 16*e*h) + 16*d^2*e*(-(f*g) + 3 
*e*h)) + b^3*(5*c^2*f^2*(7*f*g - 8*e*h) + 16*d^2*e^2*(3*f*g - 4*e*h) + ...
 

Rubi [A] (verified)

Time = 0.82 (sec) , antiderivative size = 607, normalized size of antiderivative = 0.93, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {166, 27, 25, 162, 52, 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)^5 \sqrt {e+f x}} \, dx\)

\(\Big \downarrow \) 166

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

\(\Big \downarrow \) 162

\(\displaystyle -\frac {\frac {\left (5 a^3 d^2 f^3 h+3 a^2 b d f^2 (2 c f h-8 d e h+d f g)+a b^2 f \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)-16 d^2 e (f g-3 e h)\right )+b^3 \left (5 c^2 f^2 (7 f g-8 e h)-16 c d e f (5 f g-6 e h)+16 d^2 e^2 (3 f g-4 e h)\right )\right ) \int \frac {1}{(a+b x)^2 \sqrt {e+f x}}dx}{8 b^2 (b e-a f)^2}-\frac {\sqrt {e+f x} \left (15 a^4 d^2 f^2 h+a^3 b d f (18 c f h-52 d e h+9 d f g)-3 a^2 b^2 \left (3 c^2 f^2 h-2 c d f (5 f g-12 e h)+12 d^2 e (f g-2 e h)\right )+b x \left (35 a^3 d^2 f^2 h+3 a^2 b d f (-2 c f h-40 d e h+7 d f g)-a b^2 \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)+8 d^2 e (4 f g-15 e h)\right )-b^3 \left (5 c^2 f (7 f g-8 e h)-16 c d e (5 f g-6 e h)+24 d^2 e^2 g\right )\right )-a b^3 \left (c^2 f (63 f g-76 e h)-8 c d e (7 f g-2 e h)+8 d^2 e^2 g\right )-4 b^4 c e (8 c e h-7 c f g+4 d e g)\right )}{12 b^2 (a+b x)^3 (b e-a f)^2}}{8 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{4 b (a+b x)^4 (b e-a f)}\)

\(\Big \downarrow \) 52

\(\displaystyle -\frac {\frac {\left (5 a^3 d^2 f^3 h+3 a^2 b d f^2 (2 c f h-8 d e h+d f g)+a b^2 f \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)-16 d^2 e (f g-3 e h)\right )+b^3 \left (5 c^2 f^2 (7 f g-8 e h)-16 c d e f (5 f g-6 e h)+16 d^2 e^2 (3 f g-4 e h)\right )\right ) \left (-\frac {f \int \frac {1}{(a+b x) \sqrt {e+f x}}dx}{2 (b e-a f)}-\frac {\sqrt {e+f x}}{(a+b x) (b e-a f)}\right )}{8 b^2 (b e-a f)^2}-\frac {\sqrt {e+f x} \left (15 a^4 d^2 f^2 h+a^3 b d f (18 c f h-52 d e h+9 d f g)-3 a^2 b^2 \left (3 c^2 f^2 h-2 c d f (5 f g-12 e h)+12 d^2 e (f g-2 e h)\right )+b x \left (35 a^3 d^2 f^2 h+3 a^2 b d f (-2 c f h-40 d e h+7 d f g)-a b^2 \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)+8 d^2 e (4 f g-15 e h)\right )-b^3 \left (5 c^2 f (7 f g-8 e h)-16 c d e (5 f g-6 e h)+24 d^2 e^2 g\right )\right )-a b^3 \left (c^2 f (63 f g-76 e h)-8 c d e (7 f g-2 e h)+8 d^2 e^2 g\right )-4 b^4 c e (8 c e h-7 c f g+4 d e g)\right )}{12 b^2 (a+b x)^3 (b e-a f)^2}}{8 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{4 b (a+b x)^4 (b e-a f)}\)

\(\Big \downarrow \) 73

\(\displaystyle -\frac {\frac {\left (5 a^3 d^2 f^3 h+3 a^2 b d f^2 (2 c f h-8 d e h+d f g)+a b^2 f \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)-16 d^2 e (f g-3 e h)\right )+b^3 \left (5 c^2 f^2 (7 f g-8 e h)-16 c d e f (5 f g-6 e h)+16 d^2 e^2 (3 f g-4 e h)\right )\right ) \left (-\frac {\int \frac {1}{a+\frac {b (e+f x)}{f}-\frac {b e}{f}}d\sqrt {e+f x}}{b e-a f}-\frac {\sqrt {e+f x}}{(a+b x) (b e-a f)}\right )}{8 b^2 (b e-a f)^2}-\frac {\sqrt {e+f x} \left (15 a^4 d^2 f^2 h+a^3 b d f (18 c f h-52 d e h+9 d f g)-3 a^2 b^2 \left (3 c^2 f^2 h-2 c d f (5 f g-12 e h)+12 d^2 e (f g-2 e h)\right )+b x \left (35 a^3 d^2 f^2 h+3 a^2 b d f (-2 c f h-40 d e h+7 d f g)-a b^2 \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)+8 d^2 e (4 f g-15 e h)\right )-b^3 \left (5 c^2 f (7 f g-8 e h)-16 c d e (5 f g-6 e h)+24 d^2 e^2 g\right )\right )-a b^3 \left (c^2 f (63 f g-76 e h)-8 c d e (7 f g-2 e h)+8 d^2 e^2 g\right )-4 b^4 c e (8 c e h-7 c f g+4 d e g)\right )}{12 b^2 (a+b x)^3 (b e-a f)^2}}{8 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{4 b (a+b x)^4 (b e-a f)}\)

\(\Big \downarrow \) 221

\(\displaystyle -\frac {\frac {\left (\frac {f \text {arctanh}\left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {b e-a f}}\right )}{\sqrt {b} (b e-a f)^{3/2}}-\frac {\sqrt {e+f x}}{(a+b x) (b e-a f)}\right ) \left (5 a^3 d^2 f^3 h+3 a^2 b d f^2 (2 c f h-8 d e h+d f g)+a b^2 f \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)-16 d^2 e (f g-3 e h)\right )+b^3 \left (5 c^2 f^2 (7 f g-8 e h)-16 c d e f (5 f g-6 e h)+16 d^2 e^2 (3 f g-4 e h)\right )\right )}{8 b^2 (b e-a f)^2}-\frac {\sqrt {e+f x} \left (15 a^4 d^2 f^2 h+a^3 b d f (18 c f h-52 d e h+9 d f g)-3 a^2 b^2 \left (3 c^2 f^2 h-2 c d f (5 f g-12 e h)+12 d^2 e (f g-2 e h)\right )+b x \left (35 a^3 d^2 f^2 h+3 a^2 b d f (-2 c f h-40 d e h+7 d f g)-a b^2 \left (5 c^2 f^2 h+2 c d f (5 f g-16 e h)+8 d^2 e (4 f g-15 e h)\right )-b^3 \left (5 c^2 f (7 f g-8 e h)-16 c d e (5 f g-6 e h)+24 d^2 e^2 g\right )\right )-a b^3 \left (c^2 f (63 f g-76 e h)-8 c d e (7 f g-2 e h)+8 d^2 e^2 g\right )-4 b^4 c e (8 c e h-7 c f g+4 d e g)\right )}{12 b^2 (a+b x)^3 (b e-a f)^2}}{8 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{4 b (a+b x)^4 (b e-a f)}\)

Input:

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

Output:

-1/4*((b*g - a*h)*(c + d*x)^2*Sqrt[e + f*x])/(b*(b*e - a*f)*(a + b*x)^4) - 
 (-1/12*(Sqrt[e + f*x]*(15*a^4*d^2*f^2*h - 4*b^4*c*e*(4*d*e*g - 7*c*f*g + 
8*c*e*h) + a^3*b*d*f*(9*d*f*g - 52*d*e*h + 18*c*f*h) - 3*a^2*b^2*(3*c^2*f^ 
2*h - 2*c*d*f*(5*f*g - 12*e*h) + 12*d^2*e*(f*g - 2*e*h)) - a*b^3*(8*d^2*e^ 
2*g + c^2*f*(63*f*g - 76*e*h) - 8*c*d*e*(7*f*g - 2*e*h)) + b*(35*a^3*d^2*f 
^2*h + 3*a^2*b*d*f*(7*d*f*g - 40*d*e*h - 2*c*f*h) - a*b^2*(5*c^2*f^2*h + 2 
*c*d*f*(5*f*g - 16*e*h) + 8*d^2*e*(4*f*g - 15*e*h)) - b^3*(24*d^2*e^2*g + 
5*c^2*f*(7*f*g - 8*e*h) - 16*c*d*e*(5*f*g - 6*e*h)))*x))/(b^2*(b*e - a*f)^ 
2*(a + b*x)^3) + ((5*a^3*d^2*f^3*h + 3*a^2*b*d*f^2*(d*f*g - 8*d*e*h + 2*c* 
f*h) + b^3*(5*c^2*f^2*(7*f*g - 8*e*h) - 16*c*d*e*f*(5*f*g - 6*e*h) + 16*d^ 
2*e^2*(3*f*g - 4*e*h)) + a*b^2*f*(5*c^2*f^2*h + 2*c*d*f*(5*f*g - 16*e*h) - 
 16*d^2*e*(f*g - 3*e*h)))*(-(Sqrt[e + f*x]/((b*e - a*f)*(a + b*x))) + (f*A 
rcTanh[(Sqrt[b]*Sqrt[e + f*x])/Sqrt[b*e - a*f]])/(Sqrt[b]*(b*e - a*f)^(3/2 
))))/(8*b^2*(b*e - a*f)^2))/(8*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 52
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ 
(a + b*x)^(m + 1)*((c + d*x)^(n + 1)/((b*c - a*d)*(m + 1))), x] - Simp[d*(( 
m + n + 2)/((b*c - a*d)*(m + 1)))   Int[(a + b*x)^(m + 1)*(c + d*x)^n, x], 
x] /; FreeQ[{a, b, c, d, n}, x] && ILtQ[m, -1] && FractionQ[n] && LtQ[n, 0]
 

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 162
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_) 
)*((g_.) + (h_.)*(x_)), x_] :> Simp[((b^3*c*e*g*(m + 2) - a^3*d*f*h*(n + 2) 
 - a^2*b*(c*f*h*m - d*(f*g + e*h)*(m + n + 3)) - a*b^2*(c*(f*g + e*h) + d*e 
*g*(2*m + n + 4)) + b*(a^2*d*f*h*(m - n) - a*b*(2*c*f*h*(m + 1) - d*(f*g + 
e*h)*(n + 1)) + b^2*(c*(f*g + e*h)*(m + 1) - d*e*g*(m + n + 2)))*x)/(b^2*(b 
*c - a*d)^2*(m + 1)*(m + 2)))*(a + b*x)^(m + 1)*(c + d*x)^(n + 1), x] + Sim 
p[(f*(h/b^2) - (d*(m + n + 3)*(a^2*d*f*h*(m - n) - a*b*(2*c*f*h*(m + 1) - d 
*(f*g + e*h)*(n + 1)) + b^2*(c*(f*g + e*h)*(m + 1) - d*e*g*(m + n + 2))))/( 
b^2*(b*c - a*d)^2*(m + 1)*(m + 2)))   Int[(a + b*x)^(m + 2)*(c + d*x)^n, x] 
, x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && (LtQ[m, -2] || (EqQ[m + 
 n + 3, 0] &&  !LtQ[n, -2]))
 

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.76 (sec) , antiderivative size = 860, normalized size of antiderivative = 1.32

method result size
pseudoelliptic \(\text {Expression too large to display}\) \(860\)
derivativedivides \(\text {Expression too large to display}\) \(1242\)
default \(\text {Expression too large to display}\) \(1242\)

Input:

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

Output:

5/64/((a*f-b*e)*b)^(1/2)*(((7*c^2*g*f^3-8*c*e*(c*h+2*d*g)*f^2+96/5*(c*h+1/ 
2*d*g)*d*e^2*f-64/5*d^2*e^3*h)*b^3+a*((c^2*h+2*c*d*g)*f^2-32/5*(c*h+1/2*d* 
g)*d*e*f+48/5*d^2*e^2*h)*f*b^2+6/5*a^2*d*f^2*((c*h+1/2*d*g)*f-4*d*e*h)*b+a 
^3*d^2*f^3*h)*(b*x+a)^4*f*arctan(b*(f*x+e)^(1/2)/((a*f-b*e)*b)^(1/2))-((-7 
*c^2*f^3*g*x^3+14/3*x^2*c*(24/7*d*g*x+c*(12/7*h*x+g))*e*f^2-56/15*x*(18/7* 
d^2*g*x^2+20/7*(9/5*h*x+g)*x*c*d+c^2*(10/7*h*x+g))*e^2*f+16/5*e^3*(2*(2*h* 
x^3+g*x^2)*d^2+8/3*x*c*(3/2*h*x+g)*d+c^2*(4/3*h*x+g)))*b^6+16/15*a*(-385/1 
6*x^2*c*(6/77*d*g*x+c*(3/77*h*x+g))*f^3+63/4*x*(4/21*d^2*g*x^2+25/7*x*c*(8 
/75*h*x+g)*d+c^2*(25/14*h*x+g))*e*f^2-25/2*(14/5*x^2*(9/35*h*x+g)*d^2+74/2 
5*x*c*(70/37*h*x+g)*d+c^2*(37/25*h*x+g))*e^2*f+(2*(9*h*x^2+2*g*x)*d^2+2*c* 
(4*h*x+g)*d+h*c^2)*e^3)*b^5-24/5*a^2*(511/72*x*(9/511*d^2*g*x^2+110/511*x* 
c*(9/55*h*x+g)*d+c^2*(55/511*h*x+g))*f^3-163/36*(91/163*x^2*(36/91*h*x+g)* 
d^2+620/163*x*c*(91/310*h*x+g)*d+c^2*(310/163*h*x+g))*e*f^2+((-8/3*h*x^2+5 
*g*x)*d^2+2*c*(5*h*x+g)*d+h*c^2)*e^2*f-4/9*((6*h*x+1/2*g)*d+c*h)*d*e^3)*b^ 
4+146/15*a^3*((-33/146*(5/11*h*x+g)*x^2*d^2-(33/73*h*x+g)*x*c*d-279/146*(7 
3/279*h*x+g)*c^2)*f^3+(-26/73*x*(119/26*h*x+g)*d^2+2*(-26/73*h*x+g)*c*d+h* 
c^2)*e*f^2-88/73*(1/2*(-37/11*h*x+g)*d+c*h)*d*e^2*f+24/73*d^2*e^3*h)*b^3+a 
^4*f*((11/5*x*(73/33*h*x+g)*d^2+2*c*(11/5*h*x+g)*d+h*c^2)*f^2-28/5*d*e*((1 
9/7*h*x+1/2*g)*d+c*h)*f+104/15*d^2*e^2*h)*b^2+6/5*((1/2*(55/9*h*x+g)*d+c*h 
)*f-31/9*d*e*h)*a^5*d*f^2*b+a^6*d^2*f^3*h)*(f*x+e)^(1/2)*((a*f-b*e)*b)^...
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2799 vs. \(2 (625) = 1250\).

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

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

Output:

Too large to include
 

Sympy [F(-1)]

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

integrate((d*x+c)**2*(h*x+g)/(b*x+a)**5/(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)^5 \sqrt {e+f x}} \, dx=\text {Exception raised: ValueError} \] Input:

integrate((d*x+c)^2*(h*x+g)/(b*x+a)^5/(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. 2483 vs. \(2 (625) = 1250\).

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

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

Output:

1/64*(48*b^3*d^2*e^2*f^2*g - 80*b^3*c*d*e*f^3*g - 16*a*b^2*d^2*e*f^3*g + 3 
5*b^3*c^2*f^4*g + 10*a*b^2*c*d*f^4*g + 3*a^2*b*d^2*f^4*g - 64*b^3*d^2*e^3* 
f*h + 96*b^3*c*d*e^2*f^2*h + 48*a*b^2*d^2*e^2*f^2*h - 40*b^3*c^2*e*f^3*h - 
 32*a*b^2*c*d*e*f^3*h - 24*a^2*b*d^2*e*f^3*h + 5*a*b^2*c^2*f^4*h + 6*a^2*b 
*c*d*f^4*h + 5*a^3*d^2*f^4*h)*arctan(sqrt(f*x + e)*b/sqrt(-b^2*e + a*b*f)) 
/((b^7*e^4 - 4*a*b^6*e^3*f + 6*a^2*b^5*e^2*f^2 - 4*a^3*b^4*e*f^3 + a^4*b^3 
*f^4)*sqrt(-b^2*e + a*b*f)) + 1/192*(144*(f*x + e)^(7/2)*b^6*d^2*e^2*f^2*g 
 - 528*(f*x + e)^(5/2)*b^6*d^2*e^3*f^2*g + 624*(f*x + e)^(3/2)*b^6*d^2*e^4 
*f^2*g - 240*sqrt(f*x + e)*b^6*d^2*e^5*f^2*g - 240*(f*x + e)^(7/2)*b^6*c*d 
*e*f^3*g - 48*(f*x + e)^(7/2)*a*b^5*d^2*e*f^3*g + 880*(f*x + e)^(5/2)*b^6* 
c*d*e^2*f^3*g + 704*(f*x + e)^(5/2)*a*b^5*d^2*e^2*f^3*g - 1168*(f*x + e)^( 
3/2)*b^6*c*d*e^3*f^3*g - 1328*(f*x + e)^(3/2)*a*b^5*d^2*e^3*f^3*g + 528*sq 
rt(f*x + e)*b^6*c*d*e^4*f^3*g + 672*sqrt(f*x + e)*a*b^5*d^2*e^4*f^3*g + 10 
5*(f*x + e)^(7/2)*b^6*c^2*f^4*g + 30*(f*x + e)^(7/2)*a*b^5*c*d*f^4*g + 9*( 
f*x + e)^(7/2)*a^2*b^4*d^2*f^4*g - 385*(f*x + e)^(5/2)*b^6*c^2*e*f^4*g - 9 
90*(f*x + e)^(5/2)*a*b^5*c*d*e*f^4*g - 209*(f*x + e)^(5/2)*a^2*b^4*d^2*e*f 
^4*g + 511*(f*x + e)^(3/2)*b^6*c^2*e^2*f^4*g + 2482*(f*x + e)^(3/2)*a*b^5* 
c*d*e^2*f^4*g + 751*(f*x + e)^(3/2)*a^2*b^4*d^2*e^2*f^4*g - 279*sqrt(f*x + 
 e)*b^6*c^2*e^3*f^4*g - 1554*sqrt(f*x + e)*a*b^5*c*d*e^3*f^4*g - 567*sqrt( 
f*x + e)*a^2*b^4*d^2*e^3*f^4*g + 385*(f*x + e)^(5/2)*a*b^5*c^2*f^5*g + ...
 

Mupad [B] (verification not implemented)

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

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

Output:

(((e + f*x)^(7/2)*(35*b^3*c^2*f^4*g + 5*a^3*d^2*f^4*h + 5*a*b^2*c^2*f^4*h 
+ 3*a^2*b*d^2*f^4*g - 40*b^3*c^2*e*f^3*h - 64*b^3*d^2*e^3*f*h + 48*b^3*d^2 
*e^2*f^2*g + 48*a*b^2*d^2*e^2*f^2*h + 10*a*b^2*c*d*f^4*g + 6*a^2*b*c*d*f^4 
*h - 80*b^3*c*d*e*f^3*g - 16*a*b^2*d^2*e*f^3*g - 24*a^2*b*d^2*e*f^3*h + 96 
*b^3*c*d*e^2*f^2*h - 32*a*b^2*c*d*e*f^3*h))/(64*(a*f - b*e)^4) - ((e + f*x 
)^(1/2)*(5*a^3*d^2*f^4*h - 93*b^3*c^2*f^4*g + 5*a*b^2*c^2*f^4*h + 3*a^2*b* 
d^2*f^4*g + 88*b^3*c^2*e*f^3*h + 64*b^3*d^2*e^3*f*h - 80*b^3*d^2*e^2*f^2*g 
 + 48*a*b^2*d^2*e^2*f^2*h + 10*a*b^2*c*d*f^4*g + 6*a^2*b*c*d*f^4*h + 176*b 
^3*c*d*e*f^3*g - 16*a*b^2*d^2*e*f^3*g - 24*a^2*b*d^2*e*f^3*h - 160*b^3*c*d 
*e^2*f^2*h - 32*a*b^2*c*d*e*f^3*h))/(64*b^3*(a*f - b*e)) + ((e + f*x)^(5/2 
)*(385*b^3*c^2*f^4*g - 73*a^3*d^2*f^4*h + 55*a*b^2*c^2*f^4*h + 33*a^2*b*d^ 
2*f^4*g - 440*b^3*c^2*e*f^3*h - 576*b^3*d^2*e^3*f*h + 528*b^3*d^2*e^2*f^2* 
g + 144*a*b^2*d^2*e^2*f^2*h + 110*a*b^2*c*d*f^4*g + 66*a^2*b*c*d*f^4*h - 8 
80*b^3*c*d*e*f^3*g - 176*a*b^2*d^2*e*f^3*g + 120*a^2*b*d^2*e*f^3*h + 1056* 
b^3*c*d*e^2*f^2*h - 352*a*b^2*c*d*e*f^3*h))/(192*b*(a*f - b*e)^3) - ((e + 
f*x)^(3/2)*(55*a^3*d^2*f^4*h - 511*b^3*c^2*f^4*g - 73*a*b^2*c^2*f^4*h + 33 
*a^2*b*d^2*f^4*g + 584*b^3*c^2*e*f^3*h + 576*b^3*d^2*e^3*f*h - 624*b^3*d^2 
*e^2*f^2*g + 144*a*b^2*d^2*e^2*f^2*h - 146*a*b^2*c*d*f^4*g + 66*a^2*b*c*d* 
f^4*h + 1168*b^3*c*d*e*f^3*g + 80*a*b^2*d^2*e*f^3*g - 264*a^2*b*d^2*e*f^3* 
h - 1248*b^3*c*d*e^2*f^2*h + 160*a*b^2*c*d*e*f^3*h))/(192*b^2*(a*f - b*...
 

Reduce [B] (verification not implemented)

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

int((d*x+c)^2*(h*x+g)/(b*x+a)^5/(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**7*d**2*f**4*h + 18*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/( 
sqrt(b)*sqrt(a*f - b*e)))*a**6*b*c*d*f**4*h - 72*sqrt(b)*sqrt(a*f - b*e)*a 
tan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**6*b*d**2*e*f**3*h + 9* 
sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))* 
a**6*b*d**2*f**4*g + 60*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sq 
rt(b)*sqrt(a*f - b*e)))*a**6*b*d**2*f**4*h*x + 15*sqrt(b)*sqrt(a*f - b*e)* 
atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**5*b**2*c**2*f**4*h - 
96*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e) 
))*a**5*b**2*c*d*e*f**3*h + 30*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x) 
*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**5*b**2*c*d*f**4*g + 72*sqrt(b)*sqrt(a*f 
- b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**5*b**2*c*d*f** 
4*h*x + 144*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a 
*f - b*e)))*a**5*b**2*d**2*e**2*f**2*h - 48*sqrt(b)*sqrt(a*f - b*e)*atan(( 
sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**5*b**2*d**2*e*f**3*g - 288* 
sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))* 
a**5*b**2*d**2*e*f**3*h*x + 36*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x) 
*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**5*b**2*d**2*f**4*g*x + 90*sqrt(b)*sqrt(a 
*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**5*b**2*d**2 
*f**4*h*x**2 - 120*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt...