3.514 \(\int (a+b \tan (d+e x)) (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x))^{3/2} \, dx\)

Optimal. Leaf size=284 \[ -\frac{2 a^4 b x \left (a^2+b^2\right ) \left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^{3/2}}{\left (a^2 \tan (d+e x)+a b\right )^3}+\frac{a^4 b \left (a^2+b^2\right ) \tan (d+e x) \left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^{3/2}}{e \left (a^2 \tan (d+e x)+a b\right )^3}+\frac{b \left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^{3/2}}{3 e}+\frac{\left (a^2+b^2\right ) \left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^{3/2}}{2 e (a \tan (d+e x)+b)}+\frac{\left (a^4-b^4\right ) \log (\cos (d+e x)) \left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^{3/2}}{e (a \tan (d+e x)+b)^3} \]

[Out]

(b*(b^2 + 2*a*b*Tan[d + e*x] + a^2*Tan[d + e*x]^2)^(3/2))/(3*e) + ((a^4 - b^4)*Log[Cos[d + e*x]]*(b^2 + 2*a*b*
Tan[d + e*x] + a^2*Tan[d + e*x]^2)^(3/2))/(e*(b + a*Tan[d + e*x])^3) + ((a^2 + b^2)*(b^2 + 2*a*b*Tan[d + e*x]
+ a^2*Tan[d + e*x]^2)^(3/2))/(2*e*(b + a*Tan[d + e*x])) - (2*a^4*b*(a^2 + b^2)*x*(b^2 + 2*a*b*Tan[d + e*x] + a
^2*Tan[d + e*x]^2)^(3/2))/(a*b + a^2*Tan[d + e*x])^3 + (a^4*b*(a^2 + b^2)*Tan[d + e*x]*(b^2 + 2*a*b*Tan[d + e*
x] + a^2*Tan[d + e*x]^2)^(3/2))/(e*(a*b + a^2*Tan[d + e*x])^3)

________________________________________________________________________________________

Rubi [A]  time = 0.226139, antiderivative size = 284, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.122, Rules used = {3710, 3528, 12, 3525, 3475} \[ -\frac{2 a^4 b x \left (a^2+b^2\right ) \left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^{3/2}}{\left (a^2 \tan (d+e x)+a b\right )^3}+\frac{a^4 b \left (a^2+b^2\right ) \tan (d+e x) \left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^{3/2}}{e \left (a^2 \tan (d+e x)+a b\right )^3}+\frac{b \left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^{3/2}}{3 e}+\frac{\left (a^2+b^2\right ) \left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^{3/2}}{2 e (a \tan (d+e x)+b)}+\frac{\left (a^4-b^4\right ) \log (\cos (d+e x)) \left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^{3/2}}{e (a \tan (d+e x)+b)^3} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Tan[d + e*x])*(b^2 + 2*a*b*Tan[d + e*x] + a^2*Tan[d + e*x]^2)^(3/2),x]

[Out]

(b*(b^2 + 2*a*b*Tan[d + e*x] + a^2*Tan[d + e*x]^2)^(3/2))/(3*e) + ((a^4 - b^4)*Log[Cos[d + e*x]]*(b^2 + 2*a*b*
Tan[d + e*x] + a^2*Tan[d + e*x]^2)^(3/2))/(e*(b + a*Tan[d + e*x])^3) + ((a^2 + b^2)*(b^2 + 2*a*b*Tan[d + e*x]
+ a^2*Tan[d + e*x]^2)^(3/2))/(2*e*(b + a*Tan[d + e*x])) - (2*a^4*b*(a^2 + b^2)*x*(b^2 + 2*a*b*Tan[d + e*x] + a
^2*Tan[d + e*x]^2)^(3/2))/(a*b + a^2*Tan[d + e*x])^3 + (a^4*b*(a^2 + b^2)*Tan[d + e*x]*(b^2 + 2*a*b*Tan[d + e*
x] + a^2*Tan[d + e*x]^2)^(3/2))/(e*(a*b + a^2*Tan[d + e*x])^3)

Rule 3710

Int[((A_) + (B_.)*tan[(d_.) + (e_.)*(x_)])*((a_) + (b_.)*tan[(d_.) + (e_.)*(x_)] + (c_.)*tan[(d_.) + (e_.)*(x_
)]^2)^(n_), x_Symbol] :> Dist[(a + b*Tan[d + e*x] + c*Tan[d + e*x]^2)^n/(b + 2*c*Tan[d + e*x])^(2*n), Int[(A +
 B*Tan[d + e*x])*(b + 2*c*Tan[d + e*x])^(2*n), x], x] /; FreeQ[{a, b, c, d, e, A, B}, x] && EqQ[b^2 - 4*a*c, 0
] &&  !IntegerQ[n]

Rule 3528

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3525

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (a+b \tan (d+e x)) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2} \, dx &=\frac{\left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2} \int \left (2 a b+2 a^2 \tan (d+e x)\right )^3 (a+b \tan (d+e x)) \, dx}{\left (2 a b+2 a^2 \tan (d+e x)\right )^3}\\ &=\frac{b \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{3 e}+\frac{\left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2} \int 2 a \left (a^2+b^2\right ) \tan (d+e x) \left (2 a b+2 a^2 \tan (d+e x)\right )^2 \, dx}{\left (2 a b+2 a^2 \tan (d+e x)\right )^3}\\ &=\frac{b \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{3 e}+\frac{\left (2 a \left (a^2+b^2\right ) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}\right ) \int \tan (d+e x) \left (2 a b+2 a^2 \tan (d+e x)\right )^2 \, dx}{\left (2 a b+2 a^2 \tan (d+e x)\right )^3}\\ &=\frac{b \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{3 e}+\frac{\left (a^2+b^2\right ) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{2 e (b+a \tan (d+e x))}+\frac{\left (2 a \left (a^2+b^2\right ) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}\right ) \int \left (2 a b+2 a^2 \tan (d+e x)\right ) \left (-2 a^2+2 a b \tan (d+e x)\right ) \, dx}{\left (2 a b+2 a^2 \tan (d+e x)\right )^3}\\ &=\frac{b \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{3 e}+\frac{\left (a^2+b^2\right ) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{2 e (b+a \tan (d+e x))}-\frac{2 a^4 b \left (a^2+b^2\right ) x \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{\left (a b+a^2 \tan (d+e x)\right )^3}+\frac{a^4 b \left (a^2+b^2\right ) \tan (d+e x) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{e \left (a b+a^2 \tan (d+e x)\right )^3}-\frac{\left (8 a^3 \left (a^2-b^2\right ) \left (a^2+b^2\right ) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}\right ) \int \tan (d+e x) \, dx}{\left (2 a b+2 a^2 \tan (d+e x)\right )^3}\\ &=\frac{b \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{3 e}+\frac{\left (a^4-b^4\right ) \log (\cos (d+e x)) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{e (b+a \tan (d+e x))^3}+\frac{\left (a^2+b^2\right ) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{2 e (b+a \tan (d+e x))}-\frac{2 a^4 b \left (a^2+b^2\right ) x \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{\left (a b+a^2 \tan (d+e x)\right )^3}+\frac{a^4 b \left (a^2+b^2\right ) \tan (d+e x) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^{3/2}}{e \left (a b+a^2 \tan (d+e x)\right )^3}\\ \end{align*}

Mathematica [C]  time = 1.36673, size = 147, normalized size = 0.52 \[ \frac{\sqrt{(a \tan (d+e x)+b)^2} \left (3 a^2 \left (a^2+3 b^2\right ) \tan ^2(d+e x)+6 a b \left (2 a^2+3 b^2\right ) \tan (d+e x)-3 \left (a^2+b^2\right ) \left ((a-i b)^2 \log (-\tan (d+e x)+i)+(a+i b)^2 \log (\tan (d+e x)+i)\right )+2 a^3 b \tan ^3(d+e x)\right )}{6 e (a \tan (d+e x)+b)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tan[d + e*x])*(b^2 + 2*a*b*Tan[d + e*x] + a^2*Tan[d + e*x]^2)^(3/2),x]

[Out]

(Sqrt[(b + a*Tan[d + e*x])^2]*(-3*(a^2 + b^2)*((a - I*b)^2*Log[I - Tan[d + e*x]] + (a + I*b)^2*Log[I + Tan[d +
 e*x]]) + 6*a*b*(2*a^2 + 3*b^2)*Tan[d + e*x] + 3*a^2*(a^2 + 3*b^2)*Tan[d + e*x]^2 + 2*a^3*b*Tan[d + e*x]^3))/(
6*e*(b + a*Tan[d + e*x]))

________________________________________________________________________________________

Maple [A]  time = 0.088, size = 158, normalized size = 0.6 \begin{align*} -{\frac{-2\, \left ( \tan \left ( ex+d \right ) \right ) ^{3}{a}^{3}b-3\, \left ( \tan \left ( ex+d \right ) \right ) ^{2}{a}^{4}-9\, \left ( \tan \left ( ex+d \right ) \right ) ^{2}{a}^{2}{b}^{2}+3\,\ln \left ( 1+ \left ( \tan \left ( ex+d \right ) \right ) ^{2} \right ){a}^{4}-3\,\ln \left ( 1+ \left ( \tan \left ( ex+d \right ) \right ) ^{2} \right ){b}^{4}+12\,\arctan \left ( \tan \left ( ex+d \right ) \right ){a}^{3}b+12\,\arctan \left ( \tan \left ( ex+d \right ) \right ) a{b}^{3}-12\,\tan \left ( ex+d \right ){a}^{3}b-18\,\tan \left ( ex+d \right ) a{b}^{3}}{6\,e \left ( b+a\tan \left ( ex+d \right ) \right ) ^{3}} \left ( \left ( b+a\tan \left ( ex+d \right ) \right ) ^{2} \right ) ^{{\frac{3}{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(e*x+d))*(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^(3/2),x)

[Out]

-1/6/e*((b+a*tan(e*x+d))^2)^(3/2)*(-2*tan(e*x+d)^3*a^3*b-3*tan(e*x+d)^2*a^4-9*tan(e*x+d)^2*a^2*b^2+3*ln(1+tan(
e*x+d)^2)*a^4-3*ln(1+tan(e*x+d)^2)*b^4+12*arctan(tan(e*x+d))*a^3*b+12*arctan(tan(e*x+d))*a*b^3-12*tan(e*x+d)*a
^3*b-18*tan(e*x+d)*a*b^3)/(b+a*tan(e*x+d))^3

________________________________________________________________________________________

Maxima [A]  time = 1.52516, size = 224, normalized size = 0.79 \begin{align*} \frac{3 \,{\left (a^{3} \tan \left (e x + d\right )^{2} + 6 \, a^{2} b \tan \left (e x + d\right ) - 2 \,{\left (3 \, a^{2} b - b^{3}\right )}{\left (e x + d\right )} -{\left (a^{3} - 3 \, a b^{2}\right )} \log \left (\tan \left (e x + d\right )^{2} + 1\right )\right )} a +{\left (2 \, a^{3} \tan \left (e x + d\right )^{3} + 9 \, a^{2} b \tan \left (e x + d\right )^{2} + 6 \,{\left (a^{3} - 3 \, a b^{2}\right )}{\left (e x + d\right )} - 3 \,{\left (3 \, a^{2} b - b^{3}\right )} \log \left (\tan \left (e x + d\right )^{2} + 1\right ) - 6 \,{\left (a^{3} - 3 \, a b^{2}\right )} \tan \left (e x + d\right )\right )} b}{6 \, e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(e*x+d))*(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^(3/2),x, algorithm="maxima")

[Out]

1/6*(3*(a^3*tan(e*x + d)^2 + 6*a^2*b*tan(e*x + d) - 2*(3*a^2*b - b^3)*(e*x + d) - (a^3 - 3*a*b^2)*log(tan(e*x
+ d)^2 + 1))*a + (2*a^3*tan(e*x + d)^3 + 9*a^2*b*tan(e*x + d)^2 + 6*(a^3 - 3*a*b^2)*(e*x + d) - 3*(3*a^2*b - b
^3)*log(tan(e*x + d)^2 + 1) - 6*(a^3 - 3*a*b^2)*tan(e*x + d))*b)/e

________________________________________________________________________________________

Fricas [A]  time = 1.75058, size = 236, normalized size = 0.83 \begin{align*} \frac{2 \, a^{3} b \tan \left (e x + d\right )^{3} - 12 \,{\left (a^{3} b + a b^{3}\right )} e x + 3 \,{\left (a^{4} + 3 \, a^{2} b^{2}\right )} \tan \left (e x + d\right )^{2} + 3 \,{\left (a^{4} - b^{4}\right )} \log \left (\frac{1}{\tan \left (e x + d\right )^{2} + 1}\right ) + 6 \,{\left (2 \, a^{3} b + 3 \, a b^{3}\right )} \tan \left (e x + d\right )}{6 \, e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(e*x+d))*(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^(3/2),x, algorithm="fricas")

[Out]

1/6*(2*a^3*b*tan(e*x + d)^3 - 12*(a^3*b + a*b^3)*e*x + 3*(a^4 + 3*a^2*b^2)*tan(e*x + d)^2 + 3*(a^4 - b^4)*log(
1/(tan(e*x + d)^2 + 1)) + 6*(2*a^3*b + 3*a*b^3)*tan(e*x + d))/e

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (d + e x \right )}\right ) \left (\left (a \tan{\left (d + e x \right )} + b\right )^{2}\right )^{\frac{3}{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(e*x+d))*(b**2+2*a*b*tan(e*x+d)+a**2*tan(e*x+d)**2)**(3/2),x)

[Out]

Integral((a + b*tan(d + e*x))*((a*tan(d + e*x) + b)**2)**(3/2), x)

________________________________________________________________________________________

Giac [A]  time = 1.52229, size = 328, normalized size = 1.15 \begin{align*} -2 \,{\left (a^{3} b \mathrm{sgn}\left (a \tan \left (x e + d\right ) + b\right ) + a b^{3} \mathrm{sgn}\left (a \tan \left (x e + d\right ) + b\right )\right )}{\left (x e + d\right )} e^{\left (-1\right )} - \frac{1}{2} \,{\left (a^{4} \mathrm{sgn}\left (a \tan \left (x e + d\right ) + b\right ) - b^{4} \mathrm{sgn}\left (a \tan \left (x e + d\right ) + b\right )\right )} e^{\left (-1\right )} \log \left (\tan \left (x e + d\right )^{2} + 1\right ) + \frac{1}{6} \,{\left (2 \, a^{3} b e^{2} \mathrm{sgn}\left (a \tan \left (x e + d\right ) + b\right ) \tan \left (x e + d\right )^{3} + 3 \, a^{4} e^{2} \mathrm{sgn}\left (a \tan \left (x e + d\right ) + b\right ) \tan \left (x e + d\right )^{2} + 9 \, a^{2} b^{2} e^{2} \mathrm{sgn}\left (a \tan \left (x e + d\right ) + b\right ) \tan \left (x e + d\right )^{2} + 12 \, a^{3} b e^{2} \mathrm{sgn}\left (a \tan \left (x e + d\right ) + b\right ) \tan \left (x e + d\right ) + 18 \, a b^{3} e^{2} \mathrm{sgn}\left (a \tan \left (x e + d\right ) + b\right ) \tan \left (x e + d\right )\right )} e^{\left (-3\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(e*x+d))*(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^(3/2),x, algorithm="giac")

[Out]

-2*(a^3*b*sgn(a*tan(x*e + d) + b) + a*b^3*sgn(a*tan(x*e + d) + b))*(x*e + d)*e^(-1) - 1/2*(a^4*sgn(a*tan(x*e +
 d) + b) - b^4*sgn(a*tan(x*e + d) + b))*e^(-1)*log(tan(x*e + d)^2 + 1) + 1/6*(2*a^3*b*e^2*sgn(a*tan(x*e + d) +
 b)*tan(x*e + d)^3 + 3*a^4*e^2*sgn(a*tan(x*e + d) + b)*tan(x*e + d)^2 + 9*a^2*b^2*e^2*sgn(a*tan(x*e + d) + b)*
tan(x*e + d)^2 + 12*a^3*b*e^2*sgn(a*tan(x*e + d) + b)*tan(x*e + d) + 18*a*b^3*e^2*sgn(a*tan(x*e + d) + b)*tan(
x*e + d))*e^(-3)