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

Optimal result
Mathematica [A] (verified)
Rubi [F]
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [A] (verification not implemented)
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 = 255 \[ \int \frac {(a+b x)^2 \sqrt {e+f x} (g+h x)}{c+d x} \, dx=\frac {2 (b c-a d)^2 (d g-c h) \sqrt {e+f x}}{d^4}+\frac {2 \left (d \left (2 a b d f^2 g+a^2 d f^2 h-b^2 e (d e+2 c f) h\right )-b (d e+c f) (2 a d f h+b (d f g-2 d e h-c f h))\right ) (e+f x)^{3/2}}{3 d^3 f^3}+\frac {2 b (2 a d f h+b (d f g-2 d e h-c f h)) (e+f x)^{5/2}}{5 d^2 f^3}+\frac {2 b^2 h (e+f x)^{7/2}}{7 d f^3}-\frac {2 (b c-a d)^2 \sqrt {d e-c f} (d g-c h) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{9/2}} \] Output:

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

Mathematica [A] (verified)

Time = 0.44 (sec) , antiderivative size = 277, normalized size of antiderivative = 1.09 \[ \int \frac {(a+b x)^2 \sqrt {e+f x} (g+h x)}{c+d x} \, dx=\frac {2 \sqrt {e+f x} \left (35 a^2 d^2 f^2 (-3 c f h+d (3 f g+e h+f h x))+14 a b d f \left (15 c^2 f^2 h-d^2 (e+f x) (-5 f g+2 e h-3 f h x)-5 c d f (3 f g+e h+f h x)\right )+b^2 \left (-105 c^3 f^3 h+35 c^2 d f^2 (3 f g+e h+f h x)-7 c d^2 f (e+f x) (5 f g-2 e h+3 f h x)+d^3 (e+f x) \left (8 e^2 h+3 f^2 x (7 g+5 h x)-2 e f (7 g+6 h x)\right )\right )\right )}{105 d^4 f^3}-\frac {2 (b c-a d)^2 \sqrt {-d e+c f} (d g-c h) \arctan \left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {-d e+c f}}\right )}{d^{9/2}} \] Input:

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

Output:

(2*Sqrt[e + f*x]*(35*a^2*d^2*f^2*(-3*c*f*h + d*(3*f*g + e*h + f*h*x)) + 14 
*a*b*d*f*(15*c^2*f^2*h - d^2*(e + f*x)*(-5*f*g + 2*e*h - 3*f*h*x) - 5*c*d* 
f*(3*f*g + e*h + f*h*x)) + b^2*(-105*c^3*f^3*h + 35*c^2*d*f^2*(3*f*g + e*h 
 + f*h*x) - 7*c*d^2*f*(e + f*x)*(5*f*g - 2*e*h + 3*f*h*x) + d^3*(e + f*x)* 
(8*e^2*h + 3*f^2*x*(7*g + 5*h*x) - 2*e*f*(7*g + 6*h*x)))))/(105*d^4*f^3) - 
 (2*(b*c - a*d)^2*Sqrt[-(d*e) + c*f]*(d*g - c*h)*ArcTan[(Sqrt[d]*Sqrt[e + 
f*x])/Sqrt[-(d*e) + c*f]])/d^(9/2)
 

Rubi [F]

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

\(\Big \downarrow \) 170

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

Input:

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

Output:

$Aborted
 

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 170
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[h*(a + b*x)^m*(c + d*x)^(n + 1)*(( 
e + f*x)^(p + 1)/(d*f*(m + n + p + 2))), x] + Simp[1/(d*f*(m + n + p + 2)) 
  Int[(a + b*x)^(m - 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*g*(m + n + p + 2 
) - h*(b*c*e*m + a*(d*e*(n + 1) + c*f*(p + 1))) + (b*d*f*g*(m + n + p + 2) 
+ h*(a*d*f*m - b*(d*e*(m + n + 1) + c*f*(m + p + 1))))*x, x], x], x] /; Fre 
eQ[{a, b, c, d, e, f, g, h, n, p}, x] && GtQ[m, 0] && NeQ[m + n + p + 2, 0] 
 && IntegerQ[m]
 
Maple [A] (verified)

Time = 0.49 (sec) , antiderivative size = 310, normalized size of antiderivative = 1.22

method result size
pseudoelliptic \(\frac {-2 \sqrt {\left (c f -d e \right ) d}\, \left (\left (\left (-\frac {8 \left (f x +e \right ) \left (\frac {15}{8} f^{2} x^{2}-\frac {3}{2} e f x +e^{2}\right ) d^{3}}{105}-\frac {2 c \left (f x +e \right ) f \left (-\frac {3 f x}{2}+e \right ) d^{2}}{15}-\frac {c^{2} f^{2} \left (f x +e \right ) d}{3}+c^{3} f^{3}\right ) b^{2}-2 a \left (-\frac {2 \left (f x +e \right ) \left (-\frac {3 f x}{2}+e \right ) d^{2}}{15}-\frac {c f \left (f x +e \right ) d}{3}+c^{2} f^{2}\right ) d f b +a^{2} d^{2} \left (\frac {\left (-f x -e \right ) d}{3}+c f \right ) f^{2}\right ) h -\left (\left (-\frac {2 \left (f x +e \right ) \left (-\frac {3 f x}{2}+e \right ) d^{2}}{15}-\frac {c f \left (f x +e \right ) d}{3}+c^{2} f^{2}\right ) b^{2}-2 a d \left (\frac {\left (-f x -e \right ) d}{3}+c f \right ) f b +a^{2} d^{2} f^{2}\right ) d g f \right ) \sqrt {f x +e}+2 f^{3} \left (a d -b c \right )^{2} \left (c h -d g \right ) \left (c f -d e \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{f^{3} d^{4} \sqrt {\left (c f -d e \right ) d}}\) \(310\)
derivativedivides \(\frac {-\frac {2 \left (-\frac {h \,b^{2} \left (f x +e \right )^{\frac {7}{2}} d^{3}}{7}-\frac {2 a b \,d^{3} f h \left (f x +e \right )^{\frac {5}{2}}}{5}+\frac {b^{2} c \,d^{2} f h \left (f x +e \right )^{\frac {5}{2}}}{5}+\frac {2 b^{2} d^{3} e h \left (f x +e \right )^{\frac {5}{2}}}{5}-\frac {b^{2} d^{3} f g \left (f x +e \right )^{\frac {5}{2}}}{5}-\frac {a^{2} d^{3} f^{2} h \left (f x +e \right )^{\frac {3}{2}}}{3}+\frac {2 a b c \,d^{2} f^{2} h \left (f x +e \right )^{\frac {3}{2}}}{3}+\frac {2 a b \,d^{3} e f h \left (f x +e \right )^{\frac {3}{2}}}{3}-\frac {2 a b \,d^{3} f^{2} g \left (f x +e \right )^{\frac {3}{2}}}{3}-\frac {b^{2} c^{2} d \,f^{2} h \left (f x +e \right )^{\frac {3}{2}}}{3}-\frac {b^{2} c \,d^{2} e f h \left (f x +e \right )^{\frac {3}{2}}}{3}+\frac {b^{2} c \,d^{2} f^{2} g \left (f x +e \right )^{\frac {3}{2}}}{3}-\frac {b^{2} d^{3} e^{2} h \left (f x +e \right )^{\frac {3}{2}}}{3}+\frac {b^{2} d^{3} e f g \left (f x +e \right )^{\frac {3}{2}}}{3}+a^{2} c \,d^{2} f^{3} h \sqrt {f x +e}-a^{2} d^{3} f^{3} g \sqrt {f x +e}-2 a b \,c^{2} d \,f^{3} h \sqrt {f x +e}+2 a b c \,d^{2} f^{3} g \sqrt {f x +e}+b^{2} c^{3} f^{3} h \sqrt {f x +e}-b^{2} c^{2} d \,f^{3} g \sqrt {f x +e}\right )}{d^{4}}+\frac {2 f^{3} \left (a^{2} c^{2} d^{2} f h -a^{2} c \,d^{3} e h -a^{2} c \,d^{3} f g +g \,a^{2} e \,d^{4}-2 a b \,c^{3} d f h +2 a b \,c^{2} d^{2} e h +2 a b \,c^{2} d^{2} f g -2 a b c \,d^{3} e g +c^{4} b^{2} f h -b^{2} c^{3} d e h -b^{2} c^{3} d f g +b^{2} c^{2} d^{2} e g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{d^{4} \sqrt {\left (c f -d e \right ) d}}}{f^{3}}\) \(552\)
default \(\frac {-\frac {2 \left (-\frac {h \,b^{2} \left (f x +e \right )^{\frac {7}{2}} d^{3}}{7}-\frac {2 a b \,d^{3} f h \left (f x +e \right )^{\frac {5}{2}}}{5}+\frac {b^{2} c \,d^{2} f h \left (f x +e \right )^{\frac {5}{2}}}{5}+\frac {2 b^{2} d^{3} e h \left (f x +e \right )^{\frac {5}{2}}}{5}-\frac {b^{2} d^{3} f g \left (f x +e \right )^{\frac {5}{2}}}{5}-\frac {a^{2} d^{3} f^{2} h \left (f x +e \right )^{\frac {3}{2}}}{3}+\frac {2 a b c \,d^{2} f^{2} h \left (f x +e \right )^{\frac {3}{2}}}{3}+\frac {2 a b \,d^{3} e f h \left (f x +e \right )^{\frac {3}{2}}}{3}-\frac {2 a b \,d^{3} f^{2} g \left (f x +e \right )^{\frac {3}{2}}}{3}-\frac {b^{2} c^{2} d \,f^{2} h \left (f x +e \right )^{\frac {3}{2}}}{3}-\frac {b^{2} c \,d^{2} e f h \left (f x +e \right )^{\frac {3}{2}}}{3}+\frac {b^{2} c \,d^{2} f^{2} g \left (f x +e \right )^{\frac {3}{2}}}{3}-\frac {b^{2} d^{3} e^{2} h \left (f x +e \right )^{\frac {3}{2}}}{3}+\frac {b^{2} d^{3} e f g \left (f x +e \right )^{\frac {3}{2}}}{3}+a^{2} c \,d^{2} f^{3} h \sqrt {f x +e}-a^{2} d^{3} f^{3} g \sqrt {f x +e}-2 a b \,c^{2} d \,f^{3} h \sqrt {f x +e}+2 a b c \,d^{2} f^{3} g \sqrt {f x +e}+b^{2} c^{3} f^{3} h \sqrt {f x +e}-b^{2} c^{2} d \,f^{3} g \sqrt {f x +e}\right )}{d^{4}}+\frac {2 f^{3} \left (a^{2} c^{2} d^{2} f h -a^{2} c \,d^{3} e h -a^{2} c \,d^{3} f g +g \,a^{2} e \,d^{4}-2 a b \,c^{3} d f h +2 a b \,c^{2} d^{2} e h +2 a b \,c^{2} d^{2} f g -2 a b c \,d^{3} e g +c^{4} b^{2} f h -b^{2} c^{3} d e h -b^{2} c^{3} d f g +b^{2} c^{2} d^{2} e g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{d^{4} \sqrt {\left (c f -d e \right ) d}}}{f^{3}}\) \(552\)
risch \(-\frac {2 \left (-15 h \,b^{2} d^{3} f^{3} x^{3}-42 a b \,d^{3} f^{3} h \,x^{2}+21 b^{2} c \,d^{2} f^{3} h \,x^{2}-3 b^{2} d^{3} e \,f^{2} h \,x^{2}-21 b^{2} d^{3} f^{3} g \,x^{2}-35 a^{2} d^{3} f^{3} h x +70 a b c \,d^{2} f^{3} h x -14 a b \,d^{3} e \,f^{2} h x -70 a b \,d^{3} f^{3} g x -35 b^{2} c^{2} d \,f^{3} h x +7 b^{2} c \,d^{2} e \,f^{2} h x +35 b^{2} c \,d^{2} f^{3} g x +4 b^{2} d^{3} e^{2} f h x -7 b^{2} d^{3} e \,f^{2} g x +105 a^{2} c \,d^{2} f^{3} h -35 a^{2} d^{3} e \,f^{2} h -105 a^{2} d^{3} f^{3} g -210 a b \,c^{2} d \,f^{3} h +70 a b c \,d^{2} e \,f^{2} h +210 a b c \,d^{2} f^{3} g +28 a b \,d^{3} e^{2} f h -70 a b \,d^{3} e \,f^{2} g +105 b^{2} c^{3} f^{3} h -35 b^{2} c^{2} d e \,f^{2} h -105 b^{2} c^{2} d \,f^{3} g -14 b^{2} c \,d^{2} e^{2} f h +35 b^{2} c \,d^{2} e \,f^{2} g -8 b^{2} d^{3} e^{3} h +14 b^{2} d^{3} e^{2} f g \right ) \sqrt {f x +e}}{105 f^{3} d^{4}}+\frac {2 \left (a^{2} c^{2} d^{2} f h -a^{2} c \,d^{3} e h -a^{2} c \,d^{3} f g +g \,a^{2} e \,d^{4}-2 a b \,c^{3} d f h +2 a b \,c^{2} d^{2} e h +2 a b \,c^{2} d^{2} f g -2 a b c \,d^{3} e g +c^{4} b^{2} f h -b^{2} c^{3} d e h -b^{2} c^{3} d f g +b^{2} c^{2} d^{2} e g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{d^{4} \sqrt {\left (c f -d e \right ) d}}\) \(577\)

Input:

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

Output:

2/((c*f-d*e)*d)^(1/2)*(-((c*f-d*e)*d)^(1/2)*(((-8/105*(f*x+e)*(15/8*f^2*x^ 
2-3/2*e*f*x+e^2)*d^3-2/15*c*(f*x+e)*f*(-3/2*f*x+e)*d^2-1/3*c^2*f^2*(f*x+e) 
*d+c^3*f^3)*b^2-2*a*(-2/15*(f*x+e)*(-3/2*f*x+e)*d^2-1/3*c*f*(f*x+e)*d+c^2* 
f^2)*d*f*b+a^2*d^2*(1/3*(-f*x-e)*d+c*f)*f^2)*h-((-2/15*(f*x+e)*(-3/2*f*x+e 
)*d^2-1/3*c*f*(f*x+e)*d+c^2*f^2)*b^2-2*a*d*(1/3*(-f*x-e)*d+c*f)*f*b+a^2*d^ 
2*f^2)*d*g*f)*(f*x+e)^(1/2)+f^3*(a*d-b*c)^2*(c*h-d*g)*(c*f-d*e)*arctan(d*( 
f*x+e)^(1/2)/((c*f-d*e)*d)^(1/2)))/f^3/d^4
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 468 vs. \(2 (231) = 462\).

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

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

Output:

[-1/105*(105*((b^2*c^2*d - 2*a*b*c*d^2 + a^2*d^3)*f^3*g - (b^2*c^3 - 2*a*b 
*c^2*d + a^2*c*d^2)*f^3*h)*sqrt((d*e - c*f)/d)*log((d*f*x + 2*d*e - c*f + 
2*sqrt(f*x + e)*d*sqrt((d*e - c*f)/d))/(d*x + c)) - 2*(15*b^2*d^3*f^3*h*x^ 
3 + 3*(7*b^2*d^3*f^3*g + (b^2*d^3*e*f^2 - 7*(b^2*c*d^2 - 2*a*b*d^3)*f^3)*h 
)*x^2 - 7*(2*b^2*d^3*e^2*f + 5*(b^2*c*d^2 - 2*a*b*d^3)*e*f^2 - 15*(b^2*c^2 
*d - 2*a*b*c*d^2 + a^2*d^3)*f^3)*g + (8*b^2*d^3*e^3 + 14*(b^2*c*d^2 - 2*a* 
b*d^3)*e^2*f + 35*(b^2*c^2*d - 2*a*b*c*d^2 + a^2*d^3)*e*f^2 - 105*(b^2*c^3 
 - 2*a*b*c^2*d + a^2*c*d^2)*f^3)*h + (7*(b^2*d^3*e*f^2 - 5*(b^2*c*d^2 - 2* 
a*b*d^3)*f^3)*g - (4*b^2*d^3*e^2*f + 7*(b^2*c*d^2 - 2*a*b*d^3)*e*f^2 - 35* 
(b^2*c^2*d - 2*a*b*c*d^2 + a^2*d^3)*f^3)*h)*x)*sqrt(f*x + e))/(d^4*f^3), - 
2/105*(105*((b^2*c^2*d - 2*a*b*c*d^2 + a^2*d^3)*f^3*g - (b^2*c^3 - 2*a*b*c 
^2*d + a^2*c*d^2)*f^3*h)*sqrt(-(d*e - c*f)/d)*arctan(-sqrt(f*x + e)*d*sqrt 
(-(d*e - c*f)/d)/(d*e - c*f)) - (15*b^2*d^3*f^3*h*x^3 + 3*(7*b^2*d^3*f^3*g 
 + (b^2*d^3*e*f^2 - 7*(b^2*c*d^2 - 2*a*b*d^3)*f^3)*h)*x^2 - 7*(2*b^2*d^3*e 
^2*f + 5*(b^2*c*d^2 - 2*a*b*d^3)*e*f^2 - 15*(b^2*c^2*d - 2*a*b*c*d^2 + a^2 
*d^3)*f^3)*g + (8*b^2*d^3*e^3 + 14*(b^2*c*d^2 - 2*a*b*d^3)*e^2*f + 35*(b^2 
*c^2*d - 2*a*b*c*d^2 + a^2*d^3)*e*f^2 - 105*(b^2*c^3 - 2*a*b*c^2*d + a^2*c 
*d^2)*f^3)*h + (7*(b^2*d^3*e*f^2 - 5*(b^2*c*d^2 - 2*a*b*d^3)*f^3)*g - (4*b 
^2*d^3*e^2*f + 7*(b^2*c*d^2 - 2*a*b*d^3)*e*f^2 - 35*(b^2*c^2*d - 2*a*b*c*d 
^2 + a^2*d^3)*f^3)*h)*x)*sqrt(f*x + e))/(d^4*f^3)]
 

Sympy [A] (verification not implemented)

Time = 12.90 (sec) , antiderivative size = 486, normalized size of antiderivative = 1.91 \[ \int \frac {(a+b x)^2 \sqrt {e+f x} (g+h x)}{c+d x} \, dx=\begin {cases} \frac {2 \left (\frac {b^{2} h \left (e + f x\right )^{\frac {7}{2}}}{7 d f^{2}} + \frac {\left (e + f x\right )^{\frac {5}{2}} \cdot \left (2 a b d f h - b^{2} c f h - 2 b^{2} d e h + b^{2} d f g\right )}{5 d^{2} f^{2}} + \frac {\left (e + f x\right )^{\frac {3}{2}} \left (a^{2} d^{2} f^{2} h - 2 a b c d f^{2} h - 2 a b d^{2} e f h + 2 a b d^{2} f^{2} g + b^{2} c^{2} f^{2} h + b^{2} c d e f h - b^{2} c d f^{2} g + b^{2} d^{2} e^{2} h - b^{2} d^{2} e f g\right )}{3 d^{3} f^{2}} + \frac {\sqrt {e + f x} \left (- a^{2} c d^{2} f h + a^{2} d^{3} f g + 2 a b c^{2} d f h - 2 a b c d^{2} f g - b^{2} c^{3} f h + b^{2} c^{2} d f g\right )}{d^{4}} + \frac {f \left (a d - b c\right )^{2} \left (c f - d e\right ) \left (c h - d g\right ) \operatorname {atan}{\left (\frac {\sqrt {e + f x}}{\sqrt {\frac {c f - d e}{d}}} \right )}}{d^{5} \sqrt {\frac {c f - d e}{d}}}\right )}{f} & \text {for}\: f \neq 0 \\\sqrt {e} \left (\frac {b^{2} h x^{3}}{3 d} + \frac {x^{2} \cdot \left (2 a b d h - b^{2} c h + b^{2} d g\right )}{2 d^{2}} + \frac {x \left (a^{2} d^{2} h - 2 a b c d h + 2 a b d^{2} g + b^{2} c^{2} h - b^{2} c d g\right )}{d^{3}} - \frac {\left (a d - b c\right )^{2} \left (c h - d g\right ) \left (\begin {cases} \frac {x}{c} & \text {for}\: d = 0 \\\frac {\log {\left (c + d x \right )}}{d} & \text {otherwise} \end {cases}\right )}{d^{3}}\right ) & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((2*(b**2*h*(e + f*x)**(7/2)/(7*d*f**2) + (e + f*x)**(5/2)*(2*a*b 
*d*f*h - b**2*c*f*h - 2*b**2*d*e*h + b**2*d*f*g)/(5*d**2*f**2) + (e + f*x) 
**(3/2)*(a**2*d**2*f**2*h - 2*a*b*c*d*f**2*h - 2*a*b*d**2*e*f*h + 2*a*b*d* 
*2*f**2*g + b**2*c**2*f**2*h + b**2*c*d*e*f*h - b**2*c*d*f**2*g + b**2*d** 
2*e**2*h - b**2*d**2*e*f*g)/(3*d**3*f**2) + sqrt(e + f*x)*(-a**2*c*d**2*f* 
h + a**2*d**3*f*g + 2*a*b*c**2*d*f*h - 2*a*b*c*d**2*f*g - b**2*c**3*f*h + 
b**2*c**2*d*f*g)/d**4 + f*(a*d - b*c)**2*(c*f - d*e)*(c*h - d*g)*atan(sqrt 
(e + f*x)/sqrt((c*f - d*e)/d))/(d**5*sqrt((c*f - d*e)/d)))/f, Ne(f, 0)), ( 
sqrt(e)*(b**2*h*x**3/(3*d) + x**2*(2*a*b*d*h - b**2*c*h + b**2*d*g)/(2*d** 
2) + x*(a**2*d**2*h - 2*a*b*c*d*h + 2*a*b*d**2*g + b**2*c**2*h - b**2*c*d* 
g)/d**3 - (a*d - b*c)**2*(c*h - d*g)*Piecewise((x/c, Eq(d, 0)), (log(c + d 
*x)/d, True))/d**3), True))
 

Maxima [F(-2)]

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

integrate((b*x+a)^2*(f*x+e)^(1/2)*(h*x+g)/(d*x+c),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. 581 vs. \(2 (231) = 462\).

Time = 0.14 (sec) , antiderivative size = 581, normalized size of antiderivative = 2.28 \[ \int \frac {(a+b x)^2 \sqrt {e+f x} (g+h x)}{c+d x} \, dx=\frac {2 \, {\left (b^{2} c^{2} d^{2} e g - 2 \, a b c d^{3} e g + a^{2} d^{4} e g - b^{2} c^{3} d f g + 2 \, a b c^{2} d^{2} f g - a^{2} c d^{3} f g - b^{2} c^{3} d e h + 2 \, a b c^{2} d^{2} e h - a^{2} c d^{3} e h + b^{2} c^{4} f h - 2 \, a b c^{3} d f h + a^{2} c^{2} d^{2} f h\right )} \arctan \left (\frac {\sqrt {f x + e} d}{\sqrt {-d^{2} e + c d f}}\right )}{\sqrt {-d^{2} e + c d f} d^{4}} + \frac {2 \, {\left (21 \, {\left (f x + e\right )}^{\frac {5}{2}} b^{2} d^{6} f^{19} g - 35 \, {\left (f x + e\right )}^{\frac {3}{2}} b^{2} d^{6} e f^{19} g - 35 \, {\left (f x + e\right )}^{\frac {3}{2}} b^{2} c d^{5} f^{20} g + 70 \, {\left (f x + e\right )}^{\frac {3}{2}} a b d^{6} f^{20} g + 105 \, \sqrt {f x + e} b^{2} c^{2} d^{4} f^{21} g - 210 \, \sqrt {f x + e} a b c d^{5} f^{21} g + 105 \, \sqrt {f x + e} a^{2} d^{6} f^{21} g + 15 \, {\left (f x + e\right )}^{\frac {7}{2}} b^{2} d^{6} f^{18} h - 42 \, {\left (f x + e\right )}^{\frac {5}{2}} b^{2} d^{6} e f^{18} h + 35 \, {\left (f x + e\right )}^{\frac {3}{2}} b^{2} d^{6} e^{2} f^{18} h - 21 \, {\left (f x + e\right )}^{\frac {5}{2}} b^{2} c d^{5} f^{19} h + 42 \, {\left (f x + e\right )}^{\frac {5}{2}} a b d^{6} f^{19} h + 35 \, {\left (f x + e\right )}^{\frac {3}{2}} b^{2} c d^{5} e f^{19} h - 70 \, {\left (f x + e\right )}^{\frac {3}{2}} a b d^{6} e f^{19} h + 35 \, {\left (f x + e\right )}^{\frac {3}{2}} b^{2} c^{2} d^{4} f^{20} h - 70 \, {\left (f x + e\right )}^{\frac {3}{2}} a b c d^{5} f^{20} h + 35 \, {\left (f x + e\right )}^{\frac {3}{2}} a^{2} d^{6} f^{20} h - 105 \, \sqrt {f x + e} b^{2} c^{3} d^{3} f^{21} h + 210 \, \sqrt {f x + e} a b c^{2} d^{4} f^{21} h - 105 \, \sqrt {f x + e} a^{2} c d^{5} f^{21} h\right )}}{105 \, d^{7} f^{21}} \] Input:

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

Output:

2*(b^2*c^2*d^2*e*g - 2*a*b*c*d^3*e*g + a^2*d^4*e*g - b^2*c^3*d*f*g + 2*a*b 
*c^2*d^2*f*g - a^2*c*d^3*f*g - b^2*c^3*d*e*h + 2*a*b*c^2*d^2*e*h - a^2*c*d 
^3*e*h + b^2*c^4*f*h - 2*a*b*c^3*d*f*h + a^2*c^2*d^2*f*h)*arctan(sqrt(f*x 
+ e)*d/sqrt(-d^2*e + c*d*f))/(sqrt(-d^2*e + c*d*f)*d^4) + 2/105*(21*(f*x + 
 e)^(5/2)*b^2*d^6*f^19*g - 35*(f*x + e)^(3/2)*b^2*d^6*e*f^19*g - 35*(f*x + 
 e)^(3/2)*b^2*c*d^5*f^20*g + 70*(f*x + e)^(3/2)*a*b*d^6*f^20*g + 105*sqrt( 
f*x + e)*b^2*c^2*d^4*f^21*g - 210*sqrt(f*x + e)*a*b*c*d^5*f^21*g + 105*sqr 
t(f*x + e)*a^2*d^6*f^21*g + 15*(f*x + e)^(7/2)*b^2*d^6*f^18*h - 42*(f*x + 
e)^(5/2)*b^2*d^6*e*f^18*h + 35*(f*x + e)^(3/2)*b^2*d^6*e^2*f^18*h - 21*(f* 
x + e)^(5/2)*b^2*c*d^5*f^19*h + 42*(f*x + e)^(5/2)*a*b*d^6*f^19*h + 35*(f* 
x + e)^(3/2)*b^2*c*d^5*e*f^19*h - 70*(f*x + e)^(3/2)*a*b*d^6*e*f^19*h + 35 
*(f*x + e)^(3/2)*b^2*c^2*d^4*f^20*h - 70*(f*x + e)^(3/2)*a*b*c*d^5*f^20*h 
+ 35*(f*x + e)^(3/2)*a^2*d^6*f^20*h - 105*sqrt(f*x + e)*b^2*c^3*d^3*f^21*h 
 + 210*sqrt(f*x + e)*a*b*c^2*d^4*f^21*h - 105*sqrt(f*x + e)*a^2*c*d^5*f^21 
*h)/(d^7*f^21)
 

Mupad [B] (verification not implemented)

Time = 2.11 (sec) , antiderivative size = 571, normalized size of antiderivative = 2.24 \[ \int \frac {(a+b x)^2 \sqrt {e+f x} (g+h x)}{c+d x} \, dx={\left (e+f\,x\right )}^{5/2}\,\left (\frac {2\,b^2\,f\,g-6\,b^2\,e\,h+4\,a\,b\,f\,h}{5\,d\,f^3}-\frac {2\,b^2\,h\,\left (c\,f^4-d\,e\,f^3\right )}{5\,d^2\,f^6}\right )-\sqrt {e+f\,x}\,\left (\frac {2\,{\left (a\,f-b\,e\right )}^2\,\left (e\,h-f\,g\right )}{d\,f^3}-\frac {\left (\frac {\left (\frac {2\,b^2\,f\,g-6\,b^2\,e\,h+4\,a\,b\,f\,h}{d\,f^3}-\frac {2\,b^2\,h\,\left (c\,f^4-d\,e\,f^3\right )}{d^2\,f^6}\right )\,\left (c\,f^4-d\,e\,f^3\right )}{d\,f^3}-\frac {2\,\left (a\,f-b\,e\right )\,\left (a\,f\,h-3\,b\,e\,h+2\,b\,f\,g\right )}{d\,f^3}\right )\,\left (c\,f^4-d\,e\,f^3\right )}{d\,f^3}\right )-{\left (e+f\,x\right )}^{3/2}\,\left (\frac {\left (\frac {2\,b^2\,f\,g-6\,b^2\,e\,h+4\,a\,b\,f\,h}{d\,f^3}-\frac {2\,b^2\,h\,\left (c\,f^4-d\,e\,f^3\right )}{d^2\,f^6}\right )\,\left (c\,f^4-d\,e\,f^3\right )}{3\,d\,f^3}-\frac {2\,\left (a\,f-b\,e\right )\,\left (a\,f\,h-3\,b\,e\,h+2\,b\,f\,g\right )}{3\,d\,f^3}\right )+\frac {2\,b^2\,h\,{\left (e+f\,x\right )}^{7/2}}{7\,d\,f^3}+\frac {\mathrm {atan}\left (\frac {\sqrt {d}\,\sqrt {e+f\,x}\,{\left (a\,d-b\,c\right )}^2\,\sqrt {d\,e-c\,f}\,\left (c\,h-d\,g\right )\,1{}\mathrm {i}}{a^2\,d^4\,e\,g+b^2\,c^4\,f\,h-a^2\,c\,d^3\,e\,h-a^2\,c\,d^3\,f\,g-b^2\,c^3\,d\,e\,h-b^2\,c^3\,d\,f\,g+b^2\,c^2\,d^2\,e\,g+a^2\,c^2\,d^2\,f\,h-2\,a\,b\,c\,d^3\,e\,g-2\,a\,b\,c^3\,d\,f\,h+2\,a\,b\,c^2\,d^2\,e\,h+2\,a\,b\,c^2\,d^2\,f\,g}\right )\,{\left (a\,d-b\,c\right )}^2\,\sqrt {d\,e-c\,f}\,\left (c\,h-d\,g\right )\,2{}\mathrm {i}}{d^{9/2}} \] Input:

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

Output:

(e + f*x)^(5/2)*((2*b^2*f*g - 6*b^2*e*h + 4*a*b*f*h)/(5*d*f^3) - (2*b^2*h* 
(c*f^4 - d*e*f^3))/(5*d^2*f^6)) - (e + f*x)^(1/2)*((2*(a*f - b*e)^2*(e*h - 
 f*g))/(d*f^3) - (((((2*b^2*f*g - 6*b^2*e*h + 4*a*b*f*h)/(d*f^3) - (2*b^2* 
h*(c*f^4 - d*e*f^3))/(d^2*f^6))*(c*f^4 - d*e*f^3))/(d*f^3) - (2*(a*f - b*e 
)*(a*f*h - 3*b*e*h + 2*b*f*g))/(d*f^3))*(c*f^4 - d*e*f^3))/(d*f^3)) - (e + 
 f*x)^(3/2)*((((2*b^2*f*g - 6*b^2*e*h + 4*a*b*f*h)/(d*f^3) - (2*b^2*h*(c*f 
^4 - d*e*f^3))/(d^2*f^6))*(c*f^4 - d*e*f^3))/(3*d*f^3) - (2*(a*f - b*e)*(a 
*f*h - 3*b*e*h + 2*b*f*g))/(3*d*f^3)) + (atan((d^(1/2)*(e + f*x)^(1/2)*(a* 
d - b*c)^2*(d*e - c*f)^(1/2)*(c*h - d*g)*1i)/(a^2*d^4*e*g + b^2*c^4*f*h - 
a^2*c*d^3*e*h - a^2*c*d^3*f*g - b^2*c^3*d*e*h - b^2*c^3*d*f*g + b^2*c^2*d^ 
2*e*g + a^2*c^2*d^2*f*h - 2*a*b*c*d^3*e*g - 2*a*b*c^3*d*f*h + 2*a*b*c^2*d^ 
2*e*h + 2*a*b*c^2*d^2*f*g))*(a*d - b*c)^2*(d*e - c*f)^(1/2)*(c*h - d*g)*2i 
)/d^(9/2) + (2*b^2*h*(e + f*x)^(7/2))/(7*d*f^3)
 

Reduce [B] (verification not implemented)

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

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

Output:

(2*(105*sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - 
 d*e)))*a**2*c*d**2*f**3*h - 105*sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f* 
x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a**2*d**3*f**3*g - 210*sqrt(d)*sqrt(c*f - 
 d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a*b*c**2*d*f**3*h 
+ 210*sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d 
*e)))*a*b*c*d**2*f**3*g + 105*sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)* 
d)/(sqrt(d)*sqrt(c*f - d*e)))*b**2*c**3*f**3*h - 105*sqrt(d)*sqrt(c*f - d* 
e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*b**2*c**2*d*f**3*g - 
105*sqrt(e + f*x)*a**2*c*d**3*f**3*h + 35*sqrt(e + f*x)*a**2*d**4*e*f**2*h 
 + 105*sqrt(e + f*x)*a**2*d**4*f**3*g + 35*sqrt(e + f*x)*a**2*d**4*f**3*h* 
x + 210*sqrt(e + f*x)*a*b*c**2*d**2*f**3*h - 70*sqrt(e + f*x)*a*b*c*d**3*e 
*f**2*h - 210*sqrt(e + f*x)*a*b*c*d**3*f**3*g - 70*sqrt(e + f*x)*a*b*c*d** 
3*f**3*h*x - 28*sqrt(e + f*x)*a*b*d**4*e**2*f*h + 70*sqrt(e + f*x)*a*b*d** 
4*e*f**2*g + 14*sqrt(e + f*x)*a*b*d**4*e*f**2*h*x + 70*sqrt(e + f*x)*a*b*d 
**4*f**3*g*x + 42*sqrt(e + f*x)*a*b*d**4*f**3*h*x**2 - 105*sqrt(e + f*x)*b 
**2*c**3*d*f**3*h + 35*sqrt(e + f*x)*b**2*c**2*d**2*e*f**2*h + 105*sqrt(e 
+ f*x)*b**2*c**2*d**2*f**3*g + 35*sqrt(e + f*x)*b**2*c**2*d**2*f**3*h*x + 
14*sqrt(e + f*x)*b**2*c*d**3*e**2*f*h - 35*sqrt(e + f*x)*b**2*c*d**3*e*f** 
2*g - 7*sqrt(e + f*x)*b**2*c*d**3*e*f**2*h*x - 35*sqrt(e + f*x)*b**2*c*d** 
3*f**3*g*x - 21*sqrt(e + f*x)*b**2*c*d**3*f**3*h*x**2 + 8*sqrt(e + f*x)...