\(\int (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3 \, dx\) [349]

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

Optimal result

Integrand size = 25, antiderivative size = 210 \[ \int (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3 \, dx=-\frac {2 \sqrt {2} a^3 d^{7/2} \text {arctanh}\left (\frac {\sqrt {d}+\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{f}+\frac {4 a^3 d^3 \sqrt {d \tan (e+f x)}}{f}-\frac {4 a^3 d^2 (d \tan (e+f x))^{3/2}}{3 f}-\frac {4 a^3 d (d \tan (e+f x))^{5/2}}{5 f}+\frac {4 a^3 (d \tan (e+f x))^{7/2}}{7 f}+\frac {16 a^3 (d \tan (e+f x))^{9/2}}{33 d f}+\frac {2 (d \tan (e+f x))^{9/2} \left (a^3+a^3 \tan (e+f x)\right )}{11 d f} \] Output:

-2*2^(1/2)*a^3*d^(7/2)*arctanh(1/2*(d^(1/2)+d^(1/2)*tan(f*x+e))*2^(1/2)/(d 
*tan(f*x+e))^(1/2))/f+4*a^3*d^3*(d*tan(f*x+e))^(1/2)/f-4/3*a^3*d^2*(d*tan( 
f*x+e))^(3/2)/f-4/5*a^3*d*(d*tan(f*x+e))^(5/2)/f+4/7*a^3*(d*tan(f*x+e))^(7 
/2)/f+16/33*a^3*(d*tan(f*x+e))^(9/2)/d/f+2/11*(d*tan(f*x+e))^(9/2)*(a^3+a^ 
3*tan(f*x+e))/d/f
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(909\) vs. \(2(210)=420\).

Time = 6.11 (sec) , antiderivative size = 909, normalized size of antiderivative = 4.33 \[ \int (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3 \, dx=\frac {4 \cos ^3(e+f x) (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{7 f (\cos (e+f x)+\sin (e+f x))^3}-\frac {4 \cos ^3(e+f x) \cot (e+f x) (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{5 f (\cos (e+f x)+\sin (e+f x))^3}-\frac {4 \cos ^3(e+f x) \cot ^2(e+f x) (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{3 f (\cos (e+f x)+\sin (e+f x))^3}+\frac {4 \cos ^3(e+f x) \cot ^3(e+f x) (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{f (\cos (e+f x)+\sin (e+f x))^3}+\frac {2 \cos ^2(e+f x) \sin (e+f x) (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{3 f (\cos (e+f x)+\sin (e+f x))^3}+\frac {2 \cos (e+f x) \sin ^2(e+f x) (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{11 f (\cos (e+f x)+\sin (e+f x))^3}+\frac {2 \arctan \left (\sqrt [4]{-\tan (e+f x)} \sqrt [4]{\tan (e+f x)}\right ) \cos ^3(e+f x) \sqrt [4]{-\tan (e+f x)} (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{f (\cos (e+f x)+\sin (e+f x))^3 \tan ^{\frac {15}{4}}(e+f x)}-\frac {2 \text {arctanh}\left (\sqrt [4]{-\tan (e+f x)} \sqrt [4]{\tan (e+f x)}\right ) \cos ^3(e+f x) \sqrt [4]{-\tan (e+f x)} (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{f (\cos (e+f x)+\sin (e+f x))^3 \tan ^{\frac {15}{4}}(e+f x)}+\frac {\sqrt {2} \arctan \left (1-\sqrt {2} \sqrt {\tan (e+f x)}\right ) \cos ^3(e+f x) (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{f (\cos (e+f x)+\sin (e+f x))^3 \tan ^{\frac {7}{2}}(e+f x)}-\frac {\sqrt {2} \arctan \left (1+\sqrt {2} \sqrt {\tan (e+f x)}\right ) \cos ^3(e+f x) (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{f (\cos (e+f x)+\sin (e+f x))^3 \tan ^{\frac {7}{2}}(e+f x)}+\frac {\cos ^3(e+f x) \log \left (1-\sqrt {2} \sqrt {\tan (e+f x)}+\tan (e+f x)\right ) (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{\sqrt {2} f (\cos (e+f x)+\sin (e+f x))^3 \tan ^{\frac {7}{2}}(e+f x)}-\frac {\cos ^3(e+f x) \log \left (1+\sqrt {2} \sqrt {\tan (e+f x)}+\tan (e+f x)\right ) (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3}{\sqrt {2} f (\cos (e+f x)+\sin (e+f x))^3 \tan ^{\frac {7}{2}}(e+f x)} \] Input:

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

Output:

(4*Cos[e + f*x]^3*(d*Tan[e + f*x])^(7/2)*(a + a*Tan[e + f*x])^3)/(7*f*(Cos 
[e + f*x] + Sin[e + f*x])^3) - (4*Cos[e + f*x]^3*Cot[e + f*x]*(d*Tan[e + f 
*x])^(7/2)*(a + a*Tan[e + f*x])^3)/(5*f*(Cos[e + f*x] + Sin[e + f*x])^3) - 
 (4*Cos[e + f*x]^3*Cot[e + f*x]^2*(d*Tan[e + f*x])^(7/2)*(a + a*Tan[e + f* 
x])^3)/(3*f*(Cos[e + f*x] + Sin[e + f*x])^3) + (4*Cos[e + f*x]^3*Cot[e + f 
*x]^3*(d*Tan[e + f*x])^(7/2)*(a + a*Tan[e + f*x])^3)/(f*(Cos[e + f*x] + Si 
n[e + f*x])^3) + (2*Cos[e + f*x]^2*Sin[e + f*x]*(d*Tan[e + f*x])^(7/2)*(a 
+ a*Tan[e + f*x])^3)/(3*f*(Cos[e + f*x] + Sin[e + f*x])^3) + (2*Cos[e + f* 
x]*Sin[e + f*x]^2*(d*Tan[e + f*x])^(7/2)*(a + a*Tan[e + f*x])^3)/(11*f*(Co 
s[e + f*x] + Sin[e + f*x])^3) + (2*ArcTan[(-Tan[e + f*x])^(1/4)*Tan[e + f* 
x]^(1/4)]*Cos[e + f*x]^3*(-Tan[e + f*x])^(1/4)*(d*Tan[e + f*x])^(7/2)*(a + 
 a*Tan[e + f*x])^3)/(f*(Cos[e + f*x] + Sin[e + f*x])^3*Tan[e + f*x]^(15/4) 
) - (2*ArcTanh[(-Tan[e + f*x])^(1/4)*Tan[e + f*x]^(1/4)]*Cos[e + f*x]^3*(- 
Tan[e + f*x])^(1/4)*(d*Tan[e + f*x])^(7/2)*(a + a*Tan[e + f*x])^3)/(f*(Cos 
[e + f*x] + Sin[e + f*x])^3*Tan[e + f*x]^(15/4)) + (Sqrt[2]*ArcTan[1 - Sqr 
t[2]*Sqrt[Tan[e + f*x]]]*Cos[e + f*x]^3*(d*Tan[e + f*x])^(7/2)*(a + a*Tan[ 
e + f*x])^3)/(f*(Cos[e + f*x] + Sin[e + f*x])^3*Tan[e + f*x]^(7/2)) - (Sqr 
t[2]*ArcTan[1 + Sqrt[2]*Sqrt[Tan[e + f*x]]]*Cos[e + f*x]^3*(d*Tan[e + f*x] 
)^(7/2)*(a + a*Tan[e + f*x])^3)/(f*(Cos[e + f*x] + Sin[e + f*x])^3*Tan[e + 
 f*x]^(7/2)) + (Cos[e + f*x]^3*Log[1 - Sqrt[2]*Sqrt[Tan[e + f*x]] + Tan...
 

Rubi [A] (verified)

Time = 1.31 (sec) , antiderivative size = 229, normalized size of antiderivative = 1.09, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {3042, 4049, 3042, 4113, 3042, 4011, 3042, 4011, 3042, 4011, 3042, 4011, 3042, 4015, 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 (a \tan (e+f x)+a)^3 (d \tan (e+f x))^{7/2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a \tan (e+f x)+a)^3 (d \tan (e+f x))^{7/2}dx\)

\(\Big \downarrow \) 4049

\(\displaystyle \frac {2 \int (d \tan (e+f x))^{7/2} \left (12 d \tan ^2(e+f x) a^3+d a^3+11 d \tan (e+f x) a^3\right )dx}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 \int (d \tan (e+f x))^{7/2} \left (12 d \tan (e+f x)^2 a^3+d a^3+11 d \tan (e+f x) a^3\right )dx}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 4113

\(\displaystyle \frac {2 \left (\int (d \tan (e+f x))^{7/2} \left (11 a^3 d \tan (e+f x)-11 a^3 d\right )dx+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 \left (\int (d \tan (e+f x))^{7/2} \left (11 a^3 d \tan (e+f x)-11 a^3 d\right )dx+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 4011

\(\displaystyle \frac {2 \left (\int (d \tan (e+f x))^{5/2} \left (-11 d^2 a^3-11 d^2 \tan (e+f x) a^3\right )dx+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}+\frac {22 a^3 d (d \tan (e+f x))^{7/2}}{7 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 \left (\int (d \tan (e+f x))^{5/2} \left (-11 d^2 a^3-11 d^2 \tan (e+f x) a^3\right )dx+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}+\frac {22 a^3 d (d \tan (e+f x))^{7/2}}{7 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 4011

\(\displaystyle \frac {2 \left (\int (d \tan (e+f x))^{3/2} \left (11 a^3 d^3-11 a^3 d^3 \tan (e+f x)\right )dx-\frac {22 a^3 d^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}+\frac {22 a^3 d (d \tan (e+f x))^{7/2}}{7 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 \left (\int (d \tan (e+f x))^{3/2} \left (11 a^3 d^3-11 a^3 d^3 \tan (e+f x)\right )dx-\frac {22 a^3 d^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}+\frac {22 a^3 d (d \tan (e+f x))^{7/2}}{7 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 4011

\(\displaystyle \frac {2 \left (\int \sqrt {d \tan (e+f x)} \left (11 a^3 d^4+11 a^3 \tan (e+f x) d^4\right )dx-\frac {22 a^3 d^3 (d \tan (e+f x))^{3/2}}{3 f}-\frac {22 a^3 d^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}+\frac {22 a^3 d (d \tan (e+f x))^{7/2}}{7 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 \left (\int \sqrt {d \tan (e+f x)} \left (11 a^3 d^4+11 a^3 \tan (e+f x) d^4\right )dx-\frac {22 a^3 d^3 (d \tan (e+f x))^{3/2}}{3 f}-\frac {22 a^3 d^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}+\frac {22 a^3 d (d \tan (e+f x))^{7/2}}{7 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 4011

\(\displaystyle \frac {2 \left (\int \frac {11 a^3 d^5 \tan (e+f x)-11 a^3 d^5}{\sqrt {d \tan (e+f x)}}dx+\frac {22 a^3 d^4 \sqrt {d \tan (e+f x)}}{f}-\frac {22 a^3 d^3 (d \tan (e+f x))^{3/2}}{3 f}-\frac {22 a^3 d^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}+\frac {22 a^3 d (d \tan (e+f x))^{7/2}}{7 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 \left (\int \frac {11 a^3 d^5 \tan (e+f x)-11 a^3 d^5}{\sqrt {d \tan (e+f x)}}dx+\frac {22 a^3 d^4 \sqrt {d \tan (e+f x)}}{f}-\frac {22 a^3 d^3 (d \tan (e+f x))^{3/2}}{3 f}-\frac {22 a^3 d^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}+\frac {22 a^3 d (d \tan (e+f x))^{7/2}}{7 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 4015

\(\displaystyle \frac {2 \left (-\frac {242 a^6 d^{10} \int \frac {1}{121 \cot (e+f x) \left (a^3 d^5+a^3 \tan (e+f x) d^5\right )^2-242 a^6 d^{10}}d\left (-\frac {11 \left (a^3 d^5+a^3 \tan (e+f x) d^5\right )}{\sqrt {d \tan (e+f x)}}\right )}{f}+\frac {22 a^3 d^4 \sqrt {d \tan (e+f x)}}{f}-\frac {22 a^3 d^3 (d \tan (e+f x))^{3/2}}{3 f}-\frac {22 a^3 d^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {22 a^3 d (d \tan (e+f x))^{7/2}}{7 f}+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {2 \left (-\frac {11 \sqrt {2} a^3 d^{9/2} \text {arctanh}\left (\frac {a^3 d^5 \tan (e+f x)+a^3 d^5}{\sqrt {2} a^3 d^{9/2} \sqrt {d \tan (e+f x)}}\right )}{f}+\frac {22 a^3 d^4 \sqrt {d \tan (e+f x)}}{f}-\frac {22 a^3 d^3 (d \tan (e+f x))^{3/2}}{3 f}-\frac {22 a^3 d^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {22 a^3 d (d \tan (e+f x))^{7/2}}{7 f}+\frac {8 a^3 (d \tan (e+f x))^{9/2}}{3 f}\right )}{11 d}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{9/2}}{11 d f}\)

Input:

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

Output:

(2*(d*Tan[e + f*x])^(9/2)*(a^3 + a^3*Tan[e + f*x]))/(11*d*f) + (2*((-11*Sq 
rt[2]*a^3*d^(9/2)*ArcTanh[(a^3*d^5 + a^3*d^5*Tan[e + f*x])/(Sqrt[2]*a^3*d^ 
(9/2)*Sqrt[d*Tan[e + f*x]])])/f + (22*a^3*d^4*Sqrt[d*Tan[e + f*x]])/f - (2 
2*a^3*d^3*(d*Tan[e + f*x])^(3/2))/(3*f) - (22*a^3*d^2*(d*Tan[e + f*x])^(5/ 
2))/(5*f) + (22*a^3*d*(d*Tan[e + f*x])^(7/2))/(7*f) + (8*a^3*(d*Tan[e + f* 
x])^(9/2))/(3*f)))/(11*d)
 

Defintions of rubi rules used

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]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4011
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 4015
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ 
)]], x_Symbol] :> Simp[-2*(d^2/f)   Subst[Int[1/(2*c*d + b*x^2), x], x, (c 
- d*Tan[e + f*x])/Sqrt[b*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && 
 EqQ[c^2 - d^2, 0]
 

rule 4049
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*(a + b*Tan[e + f*x])^(m - 2)*((c 
+ d*Tan[e + f*x])^(n + 1)/(d*f*(m + n - 1))), x] + Simp[1/(d*(m + n - 1)) 
 Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^n*Simp[a^3*d*(m + n 
- 1) - b^2*(b*c*(m - 2) + a*d*(1 + n)) + b*d*(m + n - 1)*(3*a^2 - b^2)*Tan[ 
e + f*x] - b^2*(b*c*(m - 2) - a*d*(3*m + 2*n - 4))*Tan[e + f*x]^2, x], x], 
x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2 
, 0] && NeQ[c^2 + d^2, 0] && IntegerQ[2*m] && GtQ[m, 2] && (GeQ[n, -1] || I 
ntegerQ[m]) &&  !(IGtQ[n, 2] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])) 
)
 

rule 4113
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) 
+ (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*((a + 
 b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f*x])^m*Si 
mp[A - C + B*Tan[e + f*x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && 
NeQ[A*b^2 - a*b*B + a^2*C, 0] &&  !LeQ[m, -1]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(368\) vs. \(2(177)=354\).

Time = 1.86 (sec) , antiderivative size = 369, normalized size of antiderivative = 1.76

method result size
derivativedivides \(\frac {2 a^{3} \left (\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {11}{2}}}{11}+\frac {d \left (d \tan \left (f x +e \right )\right )^{\frac {9}{2}}}{3}+\frac {2 d^{2} \left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}-\frac {2 d^{3} \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}-\frac {2 d^{4} \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}+2 d^{5} \sqrt {d \tan \left (f x +e \right )}-2 d^{6} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f \,d^{2}}\) \(369\)
default \(\frac {2 a^{3} \left (\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {11}{2}}}{11}+\frac {d \left (d \tan \left (f x +e \right )\right )^{\frac {9}{2}}}{3}+\frac {2 d^{2} \left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}-\frac {2 d^{3} \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}-\frac {2 d^{4} \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}+2 d^{5} \sqrt {d \tan \left (f x +e \right )}-2 d^{6} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f \,d^{2}}\) \(369\)
parts \(\text {Expression too large to display}\) \(718\)

Input:

int((d*tan(f*x+e))^(7/2)*(a+a*tan(f*x+e))^3,x,method=_RETURNVERBOSE)
 

Output:

2/f*a^3/d^2*(1/11*(d*tan(f*x+e))^(11/2)+1/3*d*(d*tan(f*x+e))^(9/2)+2/7*d^2 
*(d*tan(f*x+e))^(7/2)-2/5*d^3*(d*tan(f*x+e))^(5/2)-2/3*d^4*(d*tan(f*x+e))^ 
(3/2)+2*d^5*(d*tan(f*x+e))^(1/2)-2*d^6*(1/8/d*(d^2)^(1/4)*2^(1/2)*(ln((d*t 
an(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f*x 
+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))+2*arctan(2^(1/2 
)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)-2*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan 
(f*x+e))^(1/2)+1))-1/8/(d^2)^(1/4)*2^(1/2)*(ln((d*tan(f*x+e)-(d^2)^(1/4)*( 
d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f*x+e)+(d^2)^(1/4)*(d*tan( 
f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))+2*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f* 
x+e))^(1/2)+1)-2*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1))))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 338, normalized size of antiderivative = 1.61 \[ \int (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3 \, dx=\left [\frac {1155 \, \sqrt {2} a^{3} d^{\frac {7}{2}} \log \left (\frac {d \tan \left (f x + e\right )^{2} - 2 \, \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} {\left (\tan \left (f x + e\right ) + 1\right )} + 4 \, d \tan \left (f x + e\right ) + d}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \, {\left (105 \, a^{3} d^{3} \tan \left (f x + e\right )^{5} + 385 \, a^{3} d^{3} \tan \left (f x + e\right )^{4} + 330 \, a^{3} d^{3} \tan \left (f x + e\right )^{3} - 462 \, a^{3} d^{3} \tan \left (f x + e\right )^{2} - 770 \, a^{3} d^{3} \tan \left (f x + e\right ) + 2310 \, a^{3} d^{3}\right )} \sqrt {d \tan \left (f x + e\right )}}{1155 \, f}, \frac {2 \, {\left (1155 \, \sqrt {2} a^{3} \sqrt {-d} d^{3} \arctan \left (\frac {\sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {-d} {\left (\tan \left (f x + e\right ) + 1\right )}}{2 \, d \tan \left (f x + e\right )}\right ) + {\left (105 \, a^{3} d^{3} \tan \left (f x + e\right )^{5} + 385 \, a^{3} d^{3} \tan \left (f x + e\right )^{4} + 330 \, a^{3} d^{3} \tan \left (f x + e\right )^{3} - 462 \, a^{3} d^{3} \tan \left (f x + e\right )^{2} - 770 \, a^{3} d^{3} \tan \left (f x + e\right ) + 2310 \, a^{3} d^{3}\right )} \sqrt {d \tan \left (f x + e\right )}\right )}}{1155 \, f}\right ] \] Input:

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

Output:

[1/1155*(1155*sqrt(2)*a^3*d^(7/2)*log((d*tan(f*x + e)^2 - 2*sqrt(2)*sqrt(d 
*tan(f*x + e))*sqrt(d)*(tan(f*x + e) + 1) + 4*d*tan(f*x + e) + d)/(tan(f*x 
 + e)^2 + 1)) + 2*(105*a^3*d^3*tan(f*x + e)^5 + 385*a^3*d^3*tan(f*x + e)^4 
 + 330*a^3*d^3*tan(f*x + e)^3 - 462*a^3*d^3*tan(f*x + e)^2 - 770*a^3*d^3*t 
an(f*x + e) + 2310*a^3*d^3)*sqrt(d*tan(f*x + e)))/f, 2/1155*(1155*sqrt(2)* 
a^3*sqrt(-d)*d^3*arctan(1/2*sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(-d)*(tan(f*x 
 + e) + 1)/(d*tan(f*x + e))) + (105*a^3*d^3*tan(f*x + e)^5 + 385*a^3*d^3*t 
an(f*x + e)^4 + 330*a^3*d^3*tan(f*x + e)^3 - 462*a^3*d^3*tan(f*x + e)^2 - 
770*a^3*d^3*tan(f*x + e) + 2310*a^3*d^3)*sqrt(d*tan(f*x + e)))/f]
 

Sympy [F]

\[ \int (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3 \, dx=a^{3} \left (\int \left (d \tan {\left (e + f x \right )}\right )^{\frac {7}{2}}\, dx + \int 3 \left (d \tan {\left (e + f x \right )}\right )^{\frac {7}{2}} \tan {\left (e + f x \right )}\, dx + \int 3 \left (d \tan {\left (e + f x \right )}\right )^{\frac {7}{2}} \tan ^{2}{\left (e + f x \right )}\, dx + \int \left (d \tan {\left (e + f x \right )}\right )^{\frac {7}{2}} \tan ^{3}{\left (e + f x \right )}\, dx\right ) \] Input:

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 199, normalized size of antiderivative = 0.95 \[ \int (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3 \, dx=-\frac {1155 \, a^{3} d^{5} {\left (\frac {\sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} - \frac {\sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} - \frac {2 \, {\left (105 \, \left (d \tan \left (f x + e\right )\right )^{\frac {11}{2}} a^{3} + 385 \, \left (d \tan \left (f x + e\right )\right )^{\frac {9}{2}} a^{3} d + 330 \, \left (d \tan \left (f x + e\right )\right )^{\frac {7}{2}} a^{3} d^{2} - 462 \, \left (d \tan \left (f x + e\right )\right )^{\frac {5}{2}} a^{3} d^{3} - 770 \, \left (d \tan \left (f x + e\right )\right )^{\frac {3}{2}} a^{3} d^{4} + 2310 \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{5}\right )}}{d}}{1155 \, d f} \] Input:

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

Output:

-1/1155*(1155*a^3*d^5*(sqrt(2)*log(d*tan(f*x + e) + sqrt(2)*sqrt(d*tan(f*x 
 + e))*sqrt(d) + d)/sqrt(d) - sqrt(2)*log(d*tan(f*x + e) - sqrt(2)*sqrt(d* 
tan(f*x + e))*sqrt(d) + d)/sqrt(d)) - 2*(105*(d*tan(f*x + e))^(11/2)*a^3 + 
 385*(d*tan(f*x + e))^(9/2)*a^3*d + 330*(d*tan(f*x + e))^(7/2)*a^3*d^2 - 4 
62*(d*tan(f*x + e))^(5/2)*a^3*d^3 - 770*(d*tan(f*x + e))^(3/2)*a^3*d^4 + 2 
310*sqrt(d*tan(f*x + e))*a^3*d^5)/d)/(d*f)
 

Giac [F(-2)]

Exception generated. \[ \int (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3 \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro 
unding error%%%{%%%{1,[8,34]%%%}+%%%{14,[8,32]%%%}+%%%{91,[8,30]%%%}+%%%{3 
64,[8,28]
 

Mupad [B] (verification not implemented)

Time = 4.47 (sec) , antiderivative size = 185, normalized size of antiderivative = 0.88 \[ \int (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3 \, dx=\frac {4\,a^3\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{7/2}}{7\,f}+\frac {4\,a^3\,d^3\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{f}-\frac {4\,a^3\,d^2\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{3\,f}+\frac {2\,a^3\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{9/2}}{3\,d\,f}+\frac {2\,a^3\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{11/2}}{11\,d^2\,f}-\frac {4\,a^3\,d\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2}}{5\,f}+\frac {\sqrt {2}\,a^3\,d^{7/2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,a^6\,d^{17/2}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,32{}\mathrm {i}}{32\,a^6\,d^9+32\,a^6\,d^9\,\mathrm {tan}\left (e+f\,x\right )}\right )\,2{}\mathrm {i}}{f} \] Input:

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

Output:

(4*a^3*(d*tan(e + f*x))^(7/2))/(7*f) + (4*a^3*d^3*(d*tan(e + f*x))^(1/2))/ 
f - (4*a^3*d^2*(d*tan(e + f*x))^(3/2))/(3*f) + (2*a^3*(d*tan(e + f*x))^(9/ 
2))/(3*d*f) + (2*a^3*(d*tan(e + f*x))^(11/2))/(11*d^2*f) - (4*a^3*d*(d*tan 
(e + f*x))^(5/2))/(5*f) + (2^(1/2)*a^3*d^(7/2)*atan((2^(1/2)*a^6*d^(17/2)* 
(d*tan(e + f*x))^(1/2)*32i)/(32*a^6*d^9 + 32*a^6*d^9*tan(e + f*x)))*2i)/f
 

Reduce [F]

\[ \int (d \tan (e+f x))^{7/2} (a+a \tan (e+f x))^3 \, dx=\frac {\sqrt {d}\, a^{3} d^{3} \left (10 \sqrt {\tan \left (f x +e \right )}\, \tan \left (f x +e \right )^{4}-12 \sqrt {\tan \left (f x +e \right )}\, \tan \left (f x +e \right )^{2}+60 \sqrt {\tan \left (f x +e \right )}-30 \left (\int \frac {\sqrt {\tan \left (f x +e \right )}}{\tan \left (f x +e \right )}d x \right ) f +15 \left (\int \sqrt {\tan \left (f x +e \right )}\, \tan \left (f x +e \right )^{6}d x \right ) f +45 \left (\int \sqrt {\tan \left (f x +e \right )}\, \tan \left (f x +e \right )^{4}d x \right ) f \right )}{15 f} \] Input:

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

Output:

(sqrt(d)*a**3*d**3*(10*sqrt(tan(e + f*x))*tan(e + f*x)**4 - 12*sqrt(tan(e 
+ f*x))*tan(e + f*x)**2 + 60*sqrt(tan(e + f*x)) - 30*int(sqrt(tan(e + f*x) 
)/tan(e + f*x),x)*f + 15*int(sqrt(tan(e + f*x))*tan(e + f*x)**6,x)*f + 45* 
int(sqrt(tan(e + f*x))*tan(e + f*x)**4,x)*f))/(15*f)