\(\int (A+B x) (d+e x)^2 \sqrt {a^2+2 a b x+b^2 x^2} \, dx\) [380]

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

Optimal result

Integrand size = 33, antiderivative size = 158 \[ \int (A+B x) (d+e x)^2 \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {(b d-a e) (B d-A e) (d+e x)^3 \sqrt {a^2+2 a b x+b^2 x^2}}{3 e^3 (a+b x)}-\frac {(2 b B d-A b e-a B e) (d+e x)^4 \sqrt {a^2+2 a b x+b^2 x^2}}{4 e^3 (a+b x)}+\frac {b B (d+e x)^5 \sqrt {a^2+2 a b x+b^2 x^2}}{5 e^3 (a+b x)} \] Output:

1/3*(-a*e+b*d)*(-A*e+B*d)*(e*x+d)^3*((b*x+a)^2)^(1/2)/e^3/(b*x+a)-1/4*(-A* 
b*e-B*a*e+2*B*b*d)*(e*x+d)^4*((b*x+a)^2)^(1/2)/e^3/(b*x+a)+1/5*b*B*(e*x+d) 
^5*((b*x+a)^2)^(1/2)/e^3/(b*x+a)
 

Mathematica [A] (verified)

Time = 1.07 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.76 \[ \int (A+B x) (d+e x)^2 \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {x \sqrt {(a+b x)^2} \left (5 a \left (4 A \left (3 d^2+3 d e x+e^2 x^2\right )+B x \left (6 d^2+8 d e x+3 e^2 x^2\right )\right )+b x \left (5 A \left (6 d^2+8 d e x+3 e^2 x^2\right )+2 B x \left (10 d^2+15 d e x+6 e^2 x^2\right )\right )\right )}{60 (a+b x)} \] Input:

Integrate[(A + B*x)*(d + e*x)^2*Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]
 

Output:

(x*Sqrt[(a + b*x)^2]*(5*a*(4*A*(3*d^2 + 3*d*e*x + e^2*x^2) + B*x*(6*d^2 + 
8*d*e*x + 3*e^2*x^2)) + b*x*(5*A*(6*d^2 + 8*d*e*x + 3*e^2*x^2) + 2*B*x*(10 
*d^2 + 15*d*e*x + 6*e^2*x^2))))/(60*(a + b*x))
 

Rubi [A] (verified)

Time = 0.48 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.66, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {1187, 27, 86, 2009}

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 \sqrt {a^2+2 a b x+b^2 x^2} (A+B x) (d+e x)^2 \, dx\)

\(\Big \downarrow \) 1187

\(\displaystyle \frac {\sqrt {a^2+2 a b x+b^2 x^2} \int b (a+b x) (A+B x) (d+e x)^2dx}{b (a+b x)}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\sqrt {a^2+2 a b x+b^2 x^2} \int (a+b x) (A+B x) (d+e x)^2dx}{a+b x}\)

\(\Big \downarrow \) 86

\(\displaystyle \frac {\sqrt {a^2+2 a b x+b^2 x^2} \int \left (\frac {b B (d+e x)^4}{e^2}+\frac {(-2 b B d+A b e+a B e) (d+e x)^3}{e^2}+\frac {(a e-b d) (A e-B d) (d+e x)^2}{e^2}\right )dx}{a+b x}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\sqrt {a^2+2 a b x+b^2 x^2} \left (-\frac {(d+e x)^4 (-a B e-A b e+2 b B d)}{4 e^3}+\frac {(d+e x)^3 (b d-a e) (B d-A e)}{3 e^3}+\frac {b B (d+e x)^5}{5 e^3}\right )}{a+b x}\)

Input:

Int[(A + B*x)*(d + e*x)^2*Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]
 

Output:

(Sqrt[a^2 + 2*a*b*x + b^2*x^2]*(((b*d - a*e)*(B*d - A*e)*(d + e*x)^3)/(3*e 
^3) - ((2*b*B*d - A*b*e - a*B*e)*(d + e*x)^4)/(4*e^3) + (b*B*(d + e*x)^5)/ 
(5*e^3)))/(a + b*x)
 

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 86
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ 
.), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; 
 FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 
] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p 
+ 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
 

rule 1187
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_) + (b_.)*(x_ 
) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(a + b*x + c*x^2)^FracPart[p]/(c^ 
IntPart[p]*(b/2 + c*x)^(2*FracPart[p]))   Int[(d + e*x)^m*(f + g*x)^n*(b/2 
+ c*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[b^2 
 - 4*a*c, 0] &&  !IntegerQ[p]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [A] (verified)

Time = 0.87 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.81

method result size
gosper \(\frac {x \left (12 B \,e^{2} b \,x^{4}+15 x^{3} A b \,e^{2}+15 x^{3} B a \,e^{2}+30 x^{3} B b d e +20 x^{2} A a \,e^{2}+40 x^{2} A b d e +40 x^{2} B a d e +20 B b \,d^{2} x^{2}+60 x A a d e +30 A b \,d^{2} x +30 x a B \,d^{2}+60 A a \,d^{2}\right ) \sqrt {\left (b x +a \right )^{2}}}{60 b x +60 a}\) \(128\)
orering \(\frac {x \left (12 B \,e^{2} b \,x^{4}+15 x^{3} A b \,e^{2}+15 x^{3} B a \,e^{2}+30 x^{3} B b d e +20 x^{2} A a \,e^{2}+40 x^{2} A b d e +40 x^{2} B a d e +20 B b \,d^{2} x^{2}+60 x A a d e +30 A b \,d^{2} x +30 x a B \,d^{2}+60 A a \,d^{2}\right ) \sqrt {\left (b x +a \right )^{2}}}{60 b x +60 a}\) \(128\)
risch \(\frac {\sqrt {\left (b x +a \right )^{2}}\, B \,e^{2} b \,x^{5}}{5 b x +5 a}+\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (\left (A b +B a \right ) e^{2}+2 B b d e \right ) x^{4}}{4 b x +4 a}+\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (A a \,e^{2}+2 \left (A b +B a \right ) d e +B b \,d^{2}\right ) x^{3}}{3 b x +3 a}+\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (2 A a d e +\left (A b +B a \right ) d^{2}\right ) x^{2}}{2 b x +2 a}+\frac {\sqrt {\left (b x +a \right )^{2}}\, A a \,d^{2} x}{b x +a}\) \(174\)
default \(\frac {\operatorname {csgn}\left (b x +a \right ) \left (b x +a \right )^{2} \left (12 B \,e^{2} x^{3} b^{3}+15 A \,b^{3} e^{2} x^{2}-9 B \,x^{2} a \,b^{2} e^{2}+30 B \,b^{3} d e \,x^{2}-10 A x a \,b^{2} e^{2}+40 A \,b^{3} d e x +6 B \,a^{2} b \,e^{2} x -20 B x a \,b^{2} d e +20 B \,b^{3} d^{2} x +5 A \,a^{2} b \,e^{2}-20 A \,b^{2} d e a +30 A \,b^{3} d^{2}-3 B \,e^{2} a^{3}+10 B \,a^{2} b d e -10 B \,b^{2} d^{2} a \right )}{60 b^{4}}\) \(175\)

Input:

int((B*x+A)*(e*x+d)^2*((b*x+a)^2)^(1/2),x,method=_RETURNVERBOSE)
 

Output:

1/60*x*(12*B*b*e^2*x^4+15*A*b*e^2*x^3+15*B*a*e^2*x^3+30*B*b*d*e*x^3+20*A*a 
*e^2*x^2+40*A*b*d*e*x^2+40*B*a*d*e*x^2+20*B*b*d^2*x^2+60*A*a*d*e*x+30*A*b* 
d^2*x+30*B*a*d^2*x+60*A*a*d^2)*((b*x+a)^2)^(1/2)/(b*x+a)
 

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.59 \[ \int (A+B x) (d+e x)^2 \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {1}{5} \, B b e^{2} x^{5} + A a d^{2} x + \frac {1}{4} \, {\left (2 \, B b d e + {\left (B a + A b\right )} e^{2}\right )} x^{4} + \frac {1}{3} \, {\left (B b d^{2} + A a e^{2} + 2 \, {\left (B a + A b\right )} d e\right )} x^{3} + \frac {1}{2} \, {\left (2 \, A a d e + {\left (B a + A b\right )} d^{2}\right )} x^{2} \] Input:

integrate((B*x+A)*(e*x+d)^2*((b*x+a)^2)^(1/2),x, algorithm="fricas")
 

Output:

1/5*B*b*e^2*x^5 + A*a*d^2*x + 1/4*(2*B*b*d*e + (B*a + A*b)*e^2)*x^4 + 1/3* 
(B*b*d^2 + A*a*e^2 + 2*(B*a + A*b)*d*e)*x^3 + 1/2*(2*A*a*d*e + (B*a + A*b) 
*d^2)*x^2
 

Sympy [A] (verification not implemented)

Time = 2.37 (sec) , antiderivative size = 704, normalized size of antiderivative = 4.46 \[ \int (A+B x) (d+e x)^2 \sqrt {a^2+2 a b x+b^2 x^2} \, dx =\text {Too large to display} \] Input:

integrate((B*x+A)*(e*x+d)**2*((b*x+a)**2)**(1/2),x)
 

Output:

A*d**2*Piecewise(((a/(2*b) + x/2)*sqrt(a**2 + 2*a*b*x + b**2*x**2), Ne(b** 
2, 0)), ((a**2 + 2*a*b*x)**(3/2)/(3*a*b), Ne(a*b, 0)), (x*sqrt(a**2), True 
)) + 2*A*d*e*Piecewise((sqrt(a**2 + 2*a*b*x + b**2*x**2)*(-a**2/(6*b**2) + 
 a*x/(6*b) + x**2/3), Ne(b**2, 0)), ((-a**2*(a**2 + 2*a*b*x)**(3/2)/3 + (a 
**2 + 2*a*b*x)**(5/2)/5)/(2*a**2*b**2), Ne(a*b, 0)), (x**2*sqrt(a**2)/2, T 
rue)) + A*e**2*Piecewise((sqrt(a**2 + 2*a*b*x + b**2*x**2)*(a**3/(12*b**3) 
 - a**2*x/(12*b**2) + a*x**2/(12*b) + x**3/4), Ne(b**2, 0)), ((a**4*(a**2 
+ 2*a*b*x)**(3/2)/3 - 2*a**2*(a**2 + 2*a*b*x)**(5/2)/5 + (a**2 + 2*a*b*x)* 
*(7/2)/7)/(4*a**3*b**3), Ne(a*b, 0)), (x**3*sqrt(a**2)/3, True)) + B*d**2* 
Piecewise((sqrt(a**2 + 2*a*b*x + b**2*x**2)*(-a**2/(6*b**2) + a*x/(6*b) + 
x**2/3), Ne(b**2, 0)), ((-a**2*(a**2 + 2*a*b*x)**(3/2)/3 + (a**2 + 2*a*b*x 
)**(5/2)/5)/(2*a**2*b**2), Ne(a*b, 0)), (x**2*sqrt(a**2)/2, True)) + 2*B*d 
*e*Piecewise((sqrt(a**2 + 2*a*b*x + b**2*x**2)*(a**3/(12*b**3) - a**2*x/(1 
2*b**2) + a*x**2/(12*b) + x**3/4), Ne(b**2, 0)), ((a**4*(a**2 + 2*a*b*x)** 
(3/2)/3 - 2*a**2*(a**2 + 2*a*b*x)**(5/2)/5 + (a**2 + 2*a*b*x)**(7/2)/7)/(4 
*a**3*b**3), Ne(a*b, 0)), (x**3*sqrt(a**2)/3, True)) + B*e**2*Piecewise((s 
qrt(a**2 + 2*a*b*x + b**2*x**2)*(-a**4/(20*b**4) + a**3*x/(20*b**3) - a**2 
*x**2/(20*b**2) + a*x**3/(20*b) + x**4/5), Ne(b**2, 0)), ((-a**6*(a**2 + 2 
*a*b*x)**(3/2)/3 + 3*a**4*(a**2 + 2*a*b*x)**(5/2)/5 - 3*a**2*(a**2 + 2*a*b 
*x)**(7/2)/7 + (a**2 + 2*a*b*x)**(9/2)/9)/(8*a**4*b**4), Ne(a*b, 0)), (...
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 456 vs. \(2 (119) = 238\).

Time = 0.04 (sec) , antiderivative size = 456, normalized size of antiderivative = 2.89 \[ \int (A+B x) (d+e x)^2 \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {1}{2} \, \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A d^{2} x - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B a^{3} e^{2} x}{2 \, b^{3}} + \frac {{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{\frac {3}{2}} B e^{2} x^{2}}{5 \, b^{2}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A a d^{2}}{2 \, b} - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B a^{4} e^{2}}{2 \, b^{4}} - \frac {7 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{\frac {3}{2}} B a e^{2} x}{20 \, b^{3}} + \frac {9 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{\frac {3}{2}} B a^{2} e^{2}}{20 \, b^{4}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} {\left (2 \, B d e + A e^{2}\right )} a^{2} x}{2 \, b^{2}} - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} {\left (B d^{2} + 2 \, A d e\right )} a x}{2 \, b} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} {\left (2 \, B d e + A e^{2}\right )} a^{3}}{2 \, b^{3}} - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} {\left (B d^{2} + 2 \, A d e\right )} a^{2}}{2 \, b^{2}} + \frac {{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{\frac {3}{2}} {\left (2 \, B d e + A e^{2}\right )} x}{4 \, b^{2}} - \frac {5 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{\frac {3}{2}} {\left (2 \, B d e + A e^{2}\right )} a}{12 \, b^{3}} + \frac {{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{\frac {3}{2}} {\left (B d^{2} + 2 \, A d e\right )}}{3 \, b^{2}} \] Input:

integrate((B*x+A)*(e*x+d)^2*((b*x+a)^2)^(1/2),x, algorithm="maxima")
 

Output:

1/2*sqrt(b^2*x^2 + 2*a*b*x + a^2)*A*d^2*x - 1/2*sqrt(b^2*x^2 + 2*a*b*x + a 
^2)*B*a^3*e^2*x/b^3 + 1/5*(b^2*x^2 + 2*a*b*x + a^2)^(3/2)*B*e^2*x^2/b^2 + 
1/2*sqrt(b^2*x^2 + 2*a*b*x + a^2)*A*a*d^2/b - 1/2*sqrt(b^2*x^2 + 2*a*b*x + 
 a^2)*B*a^4*e^2/b^4 - 7/20*(b^2*x^2 + 2*a*b*x + a^2)^(3/2)*B*a*e^2*x/b^3 + 
 9/20*(b^2*x^2 + 2*a*b*x + a^2)^(3/2)*B*a^2*e^2/b^4 + 1/2*sqrt(b^2*x^2 + 2 
*a*b*x + a^2)*(2*B*d*e + A*e^2)*a^2*x/b^2 - 1/2*sqrt(b^2*x^2 + 2*a*b*x + a 
^2)*(B*d^2 + 2*A*d*e)*a*x/b + 1/2*sqrt(b^2*x^2 + 2*a*b*x + a^2)*(2*B*d*e + 
 A*e^2)*a^3/b^3 - 1/2*sqrt(b^2*x^2 + 2*a*b*x + a^2)*(B*d^2 + 2*A*d*e)*a^2/ 
b^2 + 1/4*(b^2*x^2 + 2*a*b*x + a^2)^(3/2)*(2*B*d*e + A*e^2)*x/b^2 - 5/12*( 
b^2*x^2 + 2*a*b*x + a^2)^(3/2)*(2*B*d*e + A*e^2)*a/b^3 + 1/3*(b^2*x^2 + 2* 
a*b*x + a^2)^(3/2)*(B*d^2 + 2*A*d*e)/b^2
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 260 vs. \(2 (119) = 238\).

Time = 0.17 (sec) , antiderivative size = 260, normalized size of antiderivative = 1.65 \[ \int (A+B x) (d+e x)^2 \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {1}{5} \, B b e^{2} x^{5} \mathrm {sgn}\left (b x + a\right ) + \frac {1}{2} \, B b d e x^{4} \mathrm {sgn}\left (b x + a\right ) + \frac {1}{4} \, B a e^{2} x^{4} \mathrm {sgn}\left (b x + a\right ) + \frac {1}{4} \, A b e^{2} x^{4} \mathrm {sgn}\left (b x + a\right ) + \frac {1}{3} \, B b d^{2} x^{3} \mathrm {sgn}\left (b x + a\right ) + \frac {2}{3} \, B a d e x^{3} \mathrm {sgn}\left (b x + a\right ) + \frac {2}{3} \, A b d e x^{3} \mathrm {sgn}\left (b x + a\right ) + \frac {1}{3} \, A a e^{2} x^{3} \mathrm {sgn}\left (b x + a\right ) + \frac {1}{2} \, B a d^{2} x^{2} \mathrm {sgn}\left (b x + a\right ) + \frac {1}{2} \, A b d^{2} x^{2} \mathrm {sgn}\left (b x + a\right ) + A a d e x^{2} \mathrm {sgn}\left (b x + a\right ) + A a d^{2} x \mathrm {sgn}\left (b x + a\right ) - \frac {{\left (10 \, B a^{3} b^{2} d^{2} - 30 \, A a^{2} b^{3} d^{2} - 10 \, B a^{4} b d e + 20 \, A a^{3} b^{2} d e + 3 \, B a^{5} e^{2} - 5 \, A a^{4} b e^{2}\right )} \mathrm {sgn}\left (b x + a\right )}{60 \, b^{4}} \] Input:

integrate((B*x+A)*(e*x+d)^2*((b*x+a)^2)^(1/2),x, algorithm="giac")
 

Output:

1/5*B*b*e^2*x^5*sgn(b*x + a) + 1/2*B*b*d*e*x^4*sgn(b*x + a) + 1/4*B*a*e^2* 
x^4*sgn(b*x + a) + 1/4*A*b*e^2*x^4*sgn(b*x + a) + 1/3*B*b*d^2*x^3*sgn(b*x 
+ a) + 2/3*B*a*d*e*x^3*sgn(b*x + a) + 2/3*A*b*d*e*x^3*sgn(b*x + a) + 1/3*A 
*a*e^2*x^3*sgn(b*x + a) + 1/2*B*a*d^2*x^2*sgn(b*x + a) + 1/2*A*b*d^2*x^2*s 
gn(b*x + a) + A*a*d*e*x^2*sgn(b*x + a) + A*a*d^2*x*sgn(b*x + a) - 1/60*(10 
*B*a^3*b^2*d^2 - 30*A*a^2*b^3*d^2 - 10*B*a^4*b*d*e + 20*A*a^3*b^2*d*e + 3* 
B*a^5*e^2 - 5*A*a^4*b*e^2)*sgn(b*x + a)/b^4
 

Mupad [B] (verification not implemented)

Time = 11.56 (sec) , antiderivative size = 564, normalized size of antiderivative = 3.57 \[ \int (A+B x) (d+e x)^2 \sqrt {a^2+2 a b x+b^2 x^2} \, dx=A\,d^2\,\left (\frac {x}{2}+\frac {a}{2\,b}\right )\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}+\frac {B\,e^2\,x^2\,{\left (a^2+2\,a\,b\,x+b^2\,x^2\right )}^{3/2}}{5\,b^2}+\frac {B\,d^2\,\left (8\,b^2\,\left (a^2+b^2\,x^2\right )-12\,a^2\,b^2+4\,a\,b^3\,x\right )\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{24\,b^4}+\frac {A\,e^2\,x\,{\left (a^2+2\,a\,b\,x+b^2\,x^2\right )}^{3/2}}{4\,b^2}-\frac {5\,A\,a\,e^2\,\left (8\,b^2\,\left (a^2+b^2\,x^2\right )-12\,a^2\,b^2+4\,a\,b^3\,x\right )\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{96\,b^5}-\frac {B\,a^2\,e^2\,\left (8\,b^2\,\left (a^2+b^2\,x^2\right )-12\,a^2\,b^2+4\,a\,b^3\,x\right )\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{60\,b^6}+\frac {A\,d\,e\,\left (8\,b^2\,\left (a^2+b^2\,x^2\right )-12\,a^2\,b^2+4\,a\,b^3\,x\right )\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{12\,b^4}-\frac {A\,a^2\,e^2\,\left (\frac {x}{2}+\frac {a}{2\,b}\right )\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{4\,b^2}+\frac {B\,d\,e\,x\,{\left (a^2+2\,a\,b\,x+b^2\,x^2\right )}^{3/2}}{2\,b^2}-\frac {7\,B\,a\,e^2\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}\,\left (a^3-5\,a\,b^2\,x^2+3\,b\,x\,\left (a^2+2\,a\,b\,x+b^2\,x^2\right )-4\,a^2\,b\,x\right )}{60\,b^4}-\frac {5\,B\,a\,d\,e\,\left (8\,b^2\,\left (a^2+b^2\,x^2\right )-12\,a^2\,b^2+4\,a\,b^3\,x\right )\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{48\,b^5}-\frac {B\,a^2\,d\,e\,\left (\frac {x}{2}+\frac {a}{2\,b}\right )\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{2\,b^2} \] Input:

int(((a + b*x)^2)^(1/2)*(A + B*x)*(d + e*x)^2,x)
 

Output:

A*d^2*(x/2 + a/(2*b))*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2) + (B*e^2*x^2*(a^2 + 
b^2*x^2 + 2*a*b*x)^(3/2))/(5*b^2) + (B*d^2*(8*b^2*(a^2 + b^2*x^2) - 12*a^2 
*b^2 + 4*a*b^3*x)*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2))/(24*b^4) + (A*e^2*x*(a^ 
2 + b^2*x^2 + 2*a*b*x)^(3/2))/(4*b^2) - (5*A*a*e^2*(8*b^2*(a^2 + b^2*x^2) 
- 12*a^2*b^2 + 4*a*b^3*x)*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2))/(96*b^5) - (B*a 
^2*e^2*(8*b^2*(a^2 + b^2*x^2) - 12*a^2*b^2 + 4*a*b^3*x)*(a^2 + b^2*x^2 + 2 
*a*b*x)^(1/2))/(60*b^6) + (A*d*e*(8*b^2*(a^2 + b^2*x^2) - 12*a^2*b^2 + 4*a 
*b^3*x)*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2))/(12*b^4) - (A*a^2*e^2*(x/2 + a/(2 
*b))*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2))/(4*b^2) + (B*d*e*x*(a^2 + b^2*x^2 + 
2*a*b*x)^(3/2))/(2*b^2) - (7*B*a*e^2*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2)*(a^3 
- 5*a*b^2*x^2 + 3*b*x*(a^2 + b^2*x^2 + 2*a*b*x) - 4*a^2*b*x))/(60*b^4) - ( 
5*B*a*d*e*(8*b^2*(a^2 + b^2*x^2) - 12*a^2*b^2 + 4*a*b^3*x)*(a^2 + b^2*x^2 
+ 2*a*b*x)^(1/2))/(48*b^5) - (B*a^2*d*e*(x/2 + a/(2*b))*(a^2 + b^2*x^2 + 2 
*a*b*x)^(1/2))/(2*b^2)
 

Reduce [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.57 \[ \int (A+B x) (d+e x)^2 \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {x \left (6 b^{2} e^{2} x^{4}+15 a b \,e^{2} x^{3}+15 b^{2} d e \,x^{3}+10 a^{2} e^{2} x^{2}+40 a b d e \,x^{2}+10 b^{2} d^{2} x^{2}+30 a^{2} d e x +30 a b \,d^{2} x +30 a^{2} d^{2}\right )}{30} \] Input:

int((B*x+A)*(e*x+d)^2*((b*x+a)^2)^(1/2),x)
 

Output:

(x*(30*a**2*d**2 + 30*a**2*d*e*x + 10*a**2*e**2*x**2 + 30*a*b*d**2*x + 40* 
a*b*d*e*x**2 + 15*a*b*e**2*x**3 + 10*b**2*d**2*x**2 + 15*b**2*d*e*x**3 + 6 
*b**2*e**2*x**4))/30