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

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

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

Mathematica [A] (verified)

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

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

Output:

((Sqrt[b]*(-3*a^4*d^2*f^2*h*(e + f*x) - a^3*b*d*f*(e + f*x)*(-10*d*e*h + 2 
*c*f*h + d*f*(g + 5*h*x)) + b^4*(8*d^2*e^2*(-(f*g) + e*h)*x^2 + 8*c*d*e*f* 
x*(3*f*g*x + e*(g - 2*h*x)) + c^2*f*(-15*f^2*g*x^2 + 2*e^2*(g + 2*h*x) + e 
*f*x*(-5*g + 12*h*x))) + a^2*b^2*(c^2*f^2*(-8*f*g + 13*e*h + 5*f*h*x) + 2* 
c*d*f*(-14*e^2*h + e*f*(13*g - 5*h*x) + f^2*x*(5*g + h*x)) + 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*b^3*(- 
8*d^2*e*x*(3*e*f*g - 2*e^2*h + f^2*g*x) + 2*c*d*f*(3*f^2*g*x^2 + 2*e^2*(g 
- 12*h*x) + e*f*x*(21*g - 8*h*x)) + c^2*f*(2*e^2*h + f^2*x*(-25*g + 3*h*x) 
 + e*f*(-9*g + 21*h*x)))))/(f*(-(b*e) + a*f)^3*(a + b*x)^2*Sqrt[e + f*x]) 
- ((-3*a^3*d^2*f^2*h - a^2*b*d*f*(d*f*g - 12*d*e*h + 2*c*f*h) + b^3*(8*d^2 
*e^2*g + 3*c^2*f*(5*f*g - 4*e*h) + 8*c*d*e*(-3*f*g + 2*e*h)) + a*b^2*(-3*c 
^2*f^2*h + 8*d^2*e*(f*g - 3*e*h) + 2*c*d*f*(-3*f*g + 8*e*h)))*ArcTan[(Sqrt 
[b]*Sqrt[e + f*x])/Sqrt[-(b*e) + a*f]])/(-(b*e) + a*f)^(7/2))/(4*b^(5/2))
 

Rubi [A] (verified)

Time = 0.77 (sec) , antiderivative size = 539, normalized size of antiderivative = 1.52, 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 {(c+d x)^2 (g+h x)}{(a+b x)^3 (e+f x)^{3/2}} \, dx\)

\(\Big \downarrow \) 166

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

\(\Big \downarrow \) 161

\(\displaystyle -\frac {\frac {\left (3 a^3 d^2 f^2 h+a^2 b d f (2 c f h-12 d e h+d f g)+a b^2 \left (3 c^2 f^2 h+2 c d f (3 f g-8 e h)-8 d^2 e (f g-3 e h)\right )-b^3 \left (3 c^2 f (5 f g-4 e h)-8 c d e (3 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 (b e-a f)^2}-\frac {3 a^3 d^2 e f^2 h+a^2 b f \left (-2 c^2 f^2 h+2 c d e f h+d^2 e (f g-10 e h)\right )+x \left (3 a^3 d^2 f^3 h+a^2 b d f^2 (-2 c f h-8 d e h+d f g)-a b^2 f \left (3 c^2 f^2 h+2 c d f (3 f g-8 e h)-2 d^2 e (2 f g-e h)\right )+b^3 \left (3 c^2 f^2 (5 f g-4 e h)-8 c d e f (3 f g-2 e h)+2 d^2 e^2 (5 f g-4 e h)\right )\right )-a b^2 \left (-c^2 f^2 (10 f g-9 e h)+2 c d e f (13 f g-14 e h)-2 d^2 e^2 (7 f g-4 e h)\right )-b^3 c e f (4 c e h-5 c f g+4 d e g)}{b f (a+b x) \sqrt {e+f x} (b e-a f)^2}}{4 b (b e-a f)}-\frac {(c+d x)^2 (b g-a h)}{2 b (a+b x)^2 \sqrt {e+f x} (b e-a f)}\)

\(\Big \downarrow \) 73

\(\displaystyle -\frac {\frac {\left (3 a^3 d^2 f^2 h+a^2 b d f (2 c f h-12 d e h+d f g)+a b^2 \left (3 c^2 f^2 h+2 c d f (3 f g-8 e h)-8 d^2 e (f g-3 e h)\right )-b^3 \left (3 c^2 f (5 f g-4 e h)-8 c d e (3 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 f (b e-a f)^2}-\frac {3 a^3 d^2 e f^2 h+a^2 b f \left (-2 c^2 f^2 h+2 c d e f h+d^2 e (f g-10 e h)\right )+x \left (3 a^3 d^2 f^3 h+a^2 b d f^2 (-2 c f h-8 d e h+d f g)-a b^2 f \left (3 c^2 f^2 h+2 c d f (3 f g-8 e h)-2 d^2 e (2 f g-e h)\right )+b^3 \left (3 c^2 f^2 (5 f g-4 e h)-8 c d e f (3 f g-2 e h)+2 d^2 e^2 (5 f g-4 e h)\right )\right )-a b^2 \left (-c^2 f^2 (10 f g-9 e h)+2 c d e f (13 f g-14 e h)-2 d^2 e^2 (7 f g-4 e h)\right )-b^3 c e f (4 c e h-5 c f g+4 d e g)}{b f (a+b x) \sqrt {e+f x} (b e-a f)^2}}{4 b (b e-a f)}-\frac {(c+d x)^2 (b g-a h)}{2 b (a+b x)^2 \sqrt {e+f x} (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 (3 a^3 d^2 f^2 h+a^2 b d f (2 c f h-12 d e h+d f g)+a b^2 \left (3 c^2 f^2 h+2 c d f (3 f g-8 e h)-8 d^2 e (f g-3 e h)\right )-b^3 \left (3 c^2 f (5 f g-4 e h)-8 c d e (3 f g-2 e h)+8 d^2 e^2 g\right )\right )}{b^{3/2} (b e-a f)^{5/2}}-\frac {3 a^3 d^2 e f^2 h+a^2 b f \left (-2 c^2 f^2 h+2 c d e f h+d^2 e (f g-10 e h)\right )+x \left (3 a^3 d^2 f^3 h+a^2 b d f^2 (-2 c f h-8 d e h+d f g)-a b^2 f \left (3 c^2 f^2 h+2 c d f (3 f g-8 e h)-2 d^2 e (2 f g-e h)\right )+b^3 \left (3 c^2 f^2 (5 f g-4 e h)-8 c d e f (3 f g-2 e h)+2 d^2 e^2 (5 f g-4 e h)\right )\right )-a b^2 \left (-c^2 f^2 (10 f g-9 e h)+2 c d e f (13 f g-14 e h)-2 d^2 e^2 (7 f g-4 e h)\right )-b^3 c e f (4 c e h-5 c f g+4 d e g)}{b f (a+b x) \sqrt {e+f x} (b e-a f)^2}}{4 b (b e-a f)}-\frac {(c+d x)^2 (b g-a h)}{2 b (a+b x)^2 \sqrt {e+f x} (b e-a f)}\)

Input:

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

Output:

-1/2*((b*g - a*h)*(c + d*x)^2)/(b*(b*e - a*f)*(a + b*x)^2*Sqrt[e + f*x]) - 
 (-((3*a^3*d^2*e*f^2*h - b^3*c*e*f*(4*d*e*g - 5*c*f*g + 4*c*e*h) + a^2*b*f 
*(2*c*d*e*f*h - 2*c^2*f^2*h + d^2*e*(f*g - 10*e*h)) - a*b^2*(2*c*d*e*f*(13 
*f*g - 14*e*h) - c^2*f^2*(10*f*g - 9*e*h) - 2*d^2*e^2*(7*f*g - 4*e*h)) + ( 
3*a^3*d^2*f^3*h + a^2*b*d*f^2*(d*f*g - 8*d*e*h - 2*c*f*h) + b^3*(2*d^2*e^2 
*(5*f*g - 4*e*h) + 3*c^2*f^2*(5*f*g - 4*e*h) - 8*c*d*e*f*(3*f*g - 2*e*h)) 
- a*b^2*f*(3*c^2*f^2*h + 2*c*d*f*(3*f*g - 8*e*h) - 2*d^2*e*(2*f*g - e*h))) 
*x)/(b*f*(b*e - a*f)^2*(a + b*x)*Sqrt[e + f*x])) - ((3*a^3*d^2*f^2*h + a^2 
*b*d*f*(d*f*g - 12*d*e*h + 2*c*f*h) + a*b^2*(3*c^2*f^2*h + 2*c*d*f*(3*f*g 
- 8*e*h) - 8*d^2*e*(f*g - 3*e*h)) - b^3*(8*d^2*e^2*g + 3*c^2*f*(5*f*g - 4* 
e*h) - 8*c*d*e*(3*f*g - 2*e*h)))*ArcTanh[(Sqrt[b]*Sqrt[e + f*x])/Sqrt[b*e 
- a*f]])/(b^(3/2)*(b*e - a*f)^(5/2)))/(4*b*(b*e - a*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.68 (sec) , antiderivative size = 580, normalized size of antiderivative = 1.64

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

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1992 vs. \(2 (332) = 664\).

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

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

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

Output:

Timed out
 

Maxima [F(-2)]

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

integrate((d*x+c)^2*(h*x+g)/(b*x+a)^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(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. 981 vs. \(2 (332) = 664\).

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

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

Output:

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

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

(3*sqrt(b)*sqrt(e + f*x)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*s 
qrt(a*f - b*e)))*a**5*d**2*f**3*h + 2*sqrt(b)*sqrt(e + f*x)*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 - 12 
*sqrt(b)*sqrt(e + f*x)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqr 
t(a*f - b*e)))*a**4*b*d**2*e*f**2*h + sqrt(b)*sqrt(e + f*x)*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 + 6 
*sqrt(b)*sqrt(e + f*x)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqr 
t(a*f - b*e)))*a**4*b*d**2*f**3*h*x + 3*sqrt(b)*sqrt(e + f*x)*sqrt(a*f - b 
*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**3*b**2*c**2*f**3* 
h - 16*sqrt(b)*sqrt(e + f*x)*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 + 6*sqrt(b)*sqrt(e + f*x)*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 + 4*sqrt(b)*sqrt(e + f*x)*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(e + f* 
x)*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(e + f*x)*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 - 24*sqrt(b)* 
sqrt(e + f*x)*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 + 2*sqrt(b)*sqrt(e + f*x)*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...