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

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 = 355 \[ \int \frac {(a+b x)^2 (g+h x)}{(c+d x)^3 (e+f x)^{3/2}} \, dx=\frac {2 (b e-a f)^2 (f g-e h)}{f (d e-c f)^3 \sqrt {e+f x}}-\frac {(b c-a d)^2 (d g-c h) \sqrt {e+f x}}{2 d^2 (d e-c f)^2 (c+d x)^2}-\frac {(b c-a d) \left (a d (7 d f g-4 d e h-3 c f h)-b \left (8 d^2 e g+5 c^2 f h-c d (f g+12 e h)\right )\right ) \sqrt {e+f x}}{4 d^2 (d e-c f)^3 (c+d x)}-\frac {\left (3 a^2 d^2 f (5 d f g-4 d e h-c f h)+b^2 \left (8 d^3 e^2 g-3 c^3 f^2 h-c^2 d f (f g-12 e h)+8 c d^2 e (f g-3 e h)\right )-2 a b d \left (c^2 f^2 h+c d f (3 f g-8 e h)+4 d^2 e (3 f g-2 e h)\right )\right ) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{4 d^{5/2} (d e-c f)^{7/2}} \] Output:

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

Mathematica [A] (verified)

Time = 1.98 (sec) , antiderivative size = 562, normalized size of antiderivative = 1.58 \[ \int \frac {(a+b x)^2 (g+h x)}{(c+d x)^3 (e+f x)^{3/2}} \, dx=\frac {\frac {\sqrt {d} \left (-2 a b d f \left (c^3 f h (e+f x)+4 d^3 e x (-e g-3 f g x+2 e h x)+c^2 d \left (14 e^2 h-f^2 x (5 g+h x)+e f (-13 g+5 h x)\right )+c d^2 \left (-3 f^2 g x^2-2 e^2 (g-12 h x)+e f x (-21 g+8 h x)\right )\right )-b^2 \left (8 d^4 e^2 (f g-e h) x^2+3 c^4 f^2 h (e+f x)+8 c d^3 e x \left (3 e f g-2 e^2 h+f^2 g x\right )+c^3 d f (e+f x) (-10 e h+f (g+5 h x))-c^2 d^2 \left (8 e^3 h+f^3 g x^2-2 e^2 f (7 g-6 h x)+e f^2 x (-5 g+12 h x)\right )\right )+a^2 d^2 f \left (c^2 f (-8 f g+13 e h+5 f h x)+d^2 \left (-15 f^2 g x^2+2 e^2 (g+2 h x)+e f x (-5 g+12 h x)\right )+c d \left (2 e^2 h+f^2 x (-25 g+3 h x)+e f (-9 g+21 h x)\right )\right )\right )}{f (-d e+c f)^3 (c+d x)^2 \sqrt {e+f x}}-\frac {\left (-3 a^2 d^2 f (-5 d f g+4 d e h+c f h)+2 a b d \left (-c^2 f^2 h+4 d^2 e (-3 f g+2 e h)+c d f (-3 f g+8 e h)\right )+b^2 \left (8 d^3 e^2 g-3 c^3 f^2 h+8 c d^2 e (f g-3 e h)+c^2 d f (-f g+12 e h)\right )\right ) \arctan \left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {-d e+c f}}\right )}{(-d e+c f)^{7/2}}}{4 d^{5/2}} \] Input:

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

Output:

((Sqrt[d]*(-2*a*b*d*f*(c^3*f*h*(e + f*x) + 4*d^3*e*x*(-(e*g) - 3*f*g*x + 2 
*e*h*x) + c^2*d*(14*e^2*h - f^2*x*(5*g + h*x) + e*f*(-13*g + 5*h*x)) + c*d 
^2*(-3*f^2*g*x^2 - 2*e^2*(g - 12*h*x) + e*f*x*(-21*g + 8*h*x))) - b^2*(8*d 
^4*e^2*(f*g - e*h)*x^2 + 3*c^4*f^2*h*(e + f*x) + 8*c*d^3*e*x*(3*e*f*g - 2* 
e^2*h + f^2*g*x) + c^3*d*f*(e + f*x)*(-10*e*h + f*(g + 5*h*x)) - c^2*d^2*( 
8*e^3*h + f^3*g*x^2 - 2*e^2*f*(7*g - 6*h*x) + e*f^2*x*(-5*g + 12*h*x))) + 
a^2*d^2*f*(c^2*f*(-8*f*g + 13*e*h + 5*f*h*x) + d^2*(-15*f^2*g*x^2 + 2*e^2* 
(g + 2*h*x) + e*f*x*(-5*g + 12*h*x)) + c*d*(2*e^2*h + f^2*x*(-25*g + 3*h*x 
) + e*f*(-9*g + 21*h*x)))))/(f*(-(d*e) + c*f)^3*(c + d*x)^2*Sqrt[e + f*x]) 
 - ((-3*a^2*d^2*f*(-5*d*f*g + 4*d*e*h + c*f*h) + 2*a*b*d*(-(c^2*f^2*h) + 4 
*d^2*e*(-3*f*g + 2*e*h) + c*d*f*(-3*f*g + 8*e*h)) + b^2*(8*d^3*e^2*g - 3*c 
^3*f^2*h + 8*c*d^2*e*(f*g - 3*e*h) + c^2*d*f*(-(f*g) + 12*e*h)))*ArcTan[(S 
qrt[d]*Sqrt[e + f*x])/Sqrt[-(d*e) + c*f]])/(-(d*e) + c*f)^(7/2))/(4*d^(5/2 
))
 

Rubi [A] (verified)

Time = 0.73 (sec) , antiderivative size = 513, normalized size of antiderivative = 1.45, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {166, 27, 161, 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 {(a+b x)^2 (g+h x)}{(c+d x)^3 (e+f x)^{3/2}} \, dx\)

\(\Big \downarrow \) 166

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 161

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 221

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

Input:

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

Output:

-1/2*((d*g - c*h)*(a + b*x)^2)/(d*(d*e - c*f)*(c + d*x)^2*Sqrt[e + f*x]) + 
 ((a^2*d*f*(d*e + 2*c*f)*(5*d*f*g - 4*d*e*h - c*f*h) - 2*a*b*d*e*f*(2*d^2* 
e*g + 13*c*d*f*g - 14*c*d*e*h - c^2*f*h) + b^2*c*e*(3*c^2*f^2*h + c*d*f*(f 
*g - 10*e*h) + 2*d^2*e*(7*f*g - 4*e*h)) + (3*a^2*d^2*f^2*(5*d*f*g - 4*d*e* 
h - c*f*h) - 2*a*b*d*f*(c^2*f^2*h + c*d*f*(3*f*g - 8*e*h) + 4*d^2*e*(3*f*g 
 - 2*e*h)) + b^2*(3*c^3*f^3*h + c^2*d*f^2*(f*g - 8*e*h) + 2*d^3*e^2*(5*f*g 
 - 4*e*h) + 2*c*d^2*e*f*(2*f*g - e*h)))*x)/(d*f*(d*e - c*f)^2*(c + d*x)*Sq 
rt[e + f*x]) - ((3*a^2*d^2*f*(5*d*f*g - 4*d*e*h - c*f*h) + b^2*(8*d^3*e^2* 
g - 3*c^3*f^2*h - c^2*d*f*(f*g - 12*e*h) + 8*c*d^2*e*(f*g - 3*e*h)) - 2*a* 
b*d*(c^2*f^2*h + c*d*f*(3*f*g - 8*e*h) + 4*d^2*e*(3*f*g - 2*e*h)))*ArcTanh 
[(Sqrt[d]*Sqrt[e + f*x])/Sqrt[d*e - c*f]])/(d^(3/2)*(d*e - c*f)^(5/2)))/(4 
*d*(d*e - c*f))
 

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

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.75 (sec) , antiderivative size = 582, normalized size of antiderivative = 1.64

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

Input:

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

Output:

3/4*((d*x+c)^2*((c*(c^2*f^2-4*c*d*e*f+8*d^2*e^2)*h+1/3*d*g*(c^2*f^2-8*c*d* 
e*f-8*d^2*e^2))*b^2+2/3*a*d*((c^2*f^2-8*c*d*e*f-8*d^2*e^2)*h+3*d*f*g*(c*f+ 
4*d*e))*b+a^2*d^2*((c*f+4*d*e)*h-5*d*f*g)*f)*arctan(d*(f*x+e)^(1/2)/((c*f- 
d*e)*d)^(1/2))*f*(f*x+e)^(1/2)+13/3*(1/13*((-3*c^3*x*(5/3*x*d+c)*f^3-3*c^2 
*(4/3*x*d+c)*e*(-3*d*x+c)*f^2+10*c^2*d*(6/5*x*d+c)*e^2*f+8*d^2*e^3*(d*x+c) 
^2)*h-d*(x*c^2*(-d*x+c)*f^2+c*e*(8*d^2*x^2+5*c*d*x+c^2)*f+14*d*e^2*(4/7*d^ 
2*x^2+12/7*c*d*x+c^2))*g*f)*b^2-2/13*a*d*((x*c^2*(-d*x+c)*f^2+c*e*(8*d^2*x 
^2+5*c*d*x+c^2)*f+14*d*e^2*(4/7*d^2*x^2+12/7*c*d*x+c^2))*h-13*d*(5/13*x*c* 
(3/5*x*d+c)*f^2+e*(12/13*d^2*x^2+21/13*c*d*x+c^2)*f+2/13*d*e^2*(2*d*x+c))* 
g)*f*b+a^2*d^2*((5/13*x*c*(3/5*x*d+c)*f^2+e*(12/13*d^2*x^2+21/13*c*d*x+c^2 
)*f+2/13*d*e^2*(2*d*x+c))*h-8/13*((15/8*d^2*x^2+25/8*c*d*x+c^2)*f^2+9/8*(5 
/9*x*d+c)*d*e*f-1/4*d^2*e^2)*g)*f)*((c*f-d*e)*d)^(1/2))/(f*x+e)^(1/2)/((c* 
f-d*e)*d)^(1/2)/(d*x+c)^2/(c*f-d*e)^3/d^2/f
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1987 vs. \(2 (333) = 666\).

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

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

Output:

Too large to include
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

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

integrate((b*x+a)^2*(h*x+g)/(d*x+c)^3/(f*x+e)^(3/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(c*f-d*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. 980 vs. \(2 (333) = 666\).

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

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

Output:

1/4*(8*b^2*d^3*e^2*g + 8*b^2*c*d^2*e*f*g - 24*a*b*d^3*e*f*g - b^2*c^2*d*f^ 
2*g - 6*a*b*c*d^2*f^2*g + 15*a^2*d^3*f^2*g - 24*b^2*c*d^2*e^2*h + 16*a*b*d 
^3*e^2*h + 12*b^2*c^2*d*e*f*h + 16*a*b*c*d^2*e*f*h - 12*a^2*d^3*e*f*h - 3* 
b^2*c^3*f^2*h - 2*a*b*c^2*d*f^2*h - 3*a^2*c*d^2*f^2*h)*arctan(sqrt(f*x + e 
)*d/sqrt(-d^2*e + c*d*f))/((d^5*e^3 - 3*c*d^4*e^2*f + 3*c^2*d^3*e*f^2 - c^ 
3*d^2*f^3)*sqrt(-d^2*e + c*d*f)) + 2*(b^2*e^2*f*g - 2*a*b*e*f^2*g + a^2*f^ 
3*g - b^2*e^3*h + 2*a*b*e^2*f*h - a^2*e*f^2*h)/((d^3*e^3*f - 3*c*d^2*e^2*f 
^2 + 3*c^2*d*e*f^3 - c^3*f^4)*sqrt(f*x + e)) + 1/4*(8*(f*x + e)^(3/2)*b^2* 
c*d^3*e*f*g - 8*(f*x + e)^(3/2)*a*b*d^4*e*f*g - 8*sqrt(f*x + e)*b^2*c*d^3* 
e^2*f*g + 8*sqrt(f*x + e)*a*b*d^4*e^2*f*g - (f*x + e)^(3/2)*b^2*c^2*d^2*f^ 
2*g - 6*(f*x + e)^(3/2)*a*b*c*d^3*f^2*g + 7*(f*x + e)^(3/2)*a^2*d^4*f^2*g 
+ 7*sqrt(f*x + e)*b^2*c^2*d^2*e*f^2*g + 2*sqrt(f*x + e)*a*b*c*d^3*e*f^2*g 
- 9*sqrt(f*x + e)*a^2*d^4*e*f^2*g + sqrt(f*x + e)*b^2*c^3*d*f^3*g - 10*sqr 
t(f*x + e)*a*b*c^2*d^2*f^3*g + 9*sqrt(f*x + e)*a^2*c*d^3*f^3*g - 12*(f*x + 
 e)^(3/2)*b^2*c^2*d^2*e*f*h + 16*(f*x + e)^(3/2)*a*b*c*d^3*e*f*h - 4*(f*x 
+ e)^(3/2)*a^2*d^4*e*f*h + 12*sqrt(f*x + e)*b^2*c^2*d^2*e^2*f*h - 16*sqrt( 
f*x + e)*a*b*c*d^3*e^2*f*h + 4*sqrt(f*x + e)*a^2*d^4*e^2*f*h + 5*(f*x + e) 
^(3/2)*b^2*c^3*d*f^2*h - 2*(f*x + e)^(3/2)*a*b*c^2*d^2*f^2*h - 3*(f*x + e) 
^(3/2)*a^2*c*d^3*f^2*h - 15*sqrt(f*x + e)*b^2*c^3*d*e*f^2*h + 14*sqrt(f*x 
+ e)*a*b*c^2*d^2*e*f^2*h + sqrt(f*x + e)*a^2*c*d^3*e*f^2*h + 3*sqrt(f*x...
 

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

(3*sqrt(d)*sqrt(e + f*x)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*s 
qrt(c*f - d*e)))*a**2*c**3*d**2*f**3*h + 12*sqrt(d)*sqrt(e + f*x)*sqrt(c*f 
 - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a**2*c**2*d**3*e 
*f**2*h - 15*sqrt(d)*sqrt(e + f*x)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/ 
(sqrt(d)*sqrt(c*f - d*e)))*a**2*c**2*d**3*f**3*g + 6*sqrt(d)*sqrt(e + f*x) 
*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a**2*c* 
*2*d**3*f**3*h*x + 24*sqrt(d)*sqrt(e + f*x)*sqrt(c*f - d*e)*atan((sqrt(e + 
 f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a**2*c*d**4*e*f**2*h*x - 30*sqrt(d)*sq 
rt(e + f*x)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e 
)))*a**2*c*d**4*f**3*g*x + 3*sqrt(d)*sqrt(e + f*x)*sqrt(c*f - d*e)*atan((s 
qrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a**2*c*d**4*f**3*h*x**2 + 12*sq 
rt(d)*sqrt(e + f*x)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c 
*f - d*e)))*a**2*d**5*e*f**2*h*x**2 - 15*sqrt(d)*sqrt(e + f*x)*sqrt(c*f - 
d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a**2*d**5*f**3*g*x* 
*2 + 2*sqrt(d)*sqrt(e + f*x)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt( 
d)*sqrt(c*f - d*e)))*a*b*c**4*d*f**3*h - 16*sqrt(d)*sqrt(e + f*x)*sqrt(c*f 
 - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a*b*c**3*d**2*e* 
f**2*h + 6*sqrt(d)*sqrt(e + f*x)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(s 
qrt(d)*sqrt(c*f - d*e)))*a*b*c**3*d**2*f**3*g + 4*sqrt(d)*sqrt(e + f*x)*sq 
rt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a*b*c**...