\(\int \tan ^2(e+f x) \sqrt [3]{c+d \tan (e+f x)} \, dx\) [683]

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

Optimal result

Integrand size = 23, antiderivative size = 439 \[ \int \tan ^2(e+f x) \sqrt [3]{c+d \tan (e+f x)} \, dx=\frac {1}{4} \sqrt [3]{c-\sqrt {-d^2}} x+\frac {1}{4} \sqrt [3]{c+\sqrt {-d^2}} x-\frac {\sqrt {3} d \sqrt [3]{c-\sqrt {-d^2}} \arctan \left (\frac {1+\frac {2 \sqrt [3]{c+d \tan (e+f x)}}{\sqrt [3]{c-\sqrt {-d^2}}}}{\sqrt {3}}\right )}{2 \sqrt {-d^2} f}+\frac {\sqrt {3} d \sqrt [3]{c+\sqrt {-d^2}} \arctan \left (\frac {1+\frac {2 \sqrt [3]{c+d \tan (e+f x)}}{\sqrt [3]{c+\sqrt {-d^2}}}}{\sqrt {3}}\right )}{2 \sqrt {-d^2} f}+\frac {d \sqrt [3]{c-\sqrt {-d^2}} \log (\cos (e+f x))}{4 \sqrt {-d^2} f}-\frac {d \sqrt [3]{c+\sqrt {-d^2}} \log (\cos (e+f x))}{4 \sqrt {-d^2} f}+\frac {3 d \sqrt [3]{c-\sqrt {-d^2}} \log \left (\sqrt [3]{c-\sqrt {-d^2}}-\sqrt [3]{c+d \tan (e+f x)}\right )}{4 \sqrt {-d^2} f}-\frac {3 d \sqrt [3]{c+\sqrt {-d^2}} \log \left (\sqrt [3]{c+\sqrt {-d^2}}-\sqrt [3]{c+d \tan (e+f x)}\right )}{4 \sqrt {-d^2} f}+\frac {3 (c+d \tan (e+f x))^{4/3}}{4 d f} \] Output:

1/4*(c-(-d^2)^(1/2))^(1/3)*x+1/4*(c+(-d^2)^(1/2))^(1/3)*x-1/2*3^(1/2)*d*(c 
-(-d^2)^(1/2))^(1/3)*arctan(1/3*(1+2*(c+d*tan(f*x+e))^(1/3)/(c-(-d^2)^(1/2 
))^(1/3))*3^(1/2))/(-d^2)^(1/2)/f+1/2*3^(1/2)*d*(c+(-d^2)^(1/2))^(1/3)*arc 
tan(1/3*(1+2*(c+d*tan(f*x+e))^(1/3)/(c+(-d^2)^(1/2))^(1/3))*3^(1/2))/(-d^2 
)^(1/2)/f+1/4*d*(c-(-d^2)^(1/2))^(1/3)*ln(cos(f*x+e))/(-d^2)^(1/2)/f-1/4*d 
*(c+(-d^2)^(1/2))^(1/3)*ln(cos(f*x+e))/(-d^2)^(1/2)/f+3/4*d*(c-(-d^2)^(1/2 
))^(1/3)*ln((c-(-d^2)^(1/2))^(1/3)-(c+d*tan(f*x+e))^(1/3))/(-d^2)^(1/2)/f- 
3/4*d*(c+(-d^2)^(1/2))^(1/3)*ln((c+(-d^2)^(1/2))^(1/3)-(c+d*tan(f*x+e))^(1 
/3))/(-d^2)^(1/2)/f+3/4*(c+d*tan(f*x+e))^(4/3)/d/f
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.53 (sec) , antiderivative size = 313, normalized size of antiderivative = 0.71 \[ \int \tan ^2(e+f x) \sqrt [3]{c+d \tan (e+f x)} \, dx=\frac {i \sqrt [3]{c-i d} \left (2 \sqrt {3} \arctan \left (\frac {1+\frac {2 \sqrt [3]{c+d \tan (e+f x)}}{\sqrt [3]{c-i d}}}{\sqrt {3}}\right )-2 \log \left (\sqrt [3]{c-i d}-\sqrt [3]{c+d \tan (e+f x)}\right )+\log \left ((c-i d)^{2/3}+\sqrt [3]{c-i d} \sqrt [3]{c+d \tan (e+f x)}+(c+d \tan (e+f x))^{2/3}\right )\right )-i \sqrt [3]{c+i d} \left (2 \sqrt {3} \arctan \left (\frac {1+\frac {2 \sqrt [3]{c+d \tan (e+f x)}}{\sqrt [3]{c+i d}}}{\sqrt {3}}\right )-2 \log \left (\sqrt [3]{c+i d}-\sqrt [3]{c+d \tan (e+f x)}\right )+\log \left ((c+i d)^{2/3}+\sqrt [3]{c+i d} \sqrt [3]{c+d \tan (e+f x)}+(c+d \tan (e+f x))^{2/3}\right )\right )+\frac {3 (c+d \tan (e+f x))^{4/3}}{d}}{4 f} \] Input:

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

Output:

(I*(c - I*d)^(1/3)*(2*Sqrt[3]*ArcTan[(1 + (2*(c + d*Tan[e + f*x])^(1/3))/( 
c - I*d)^(1/3))/Sqrt[3]] - 2*Log[(c - I*d)^(1/3) - (c + d*Tan[e + f*x])^(1 
/3)] + Log[(c - I*d)^(2/3) + (c - I*d)^(1/3)*(c + d*Tan[e + f*x])^(1/3) + 
(c + d*Tan[e + f*x])^(2/3)]) - I*(c + I*d)^(1/3)*(2*Sqrt[3]*ArcTan[(1 + (2 
*(c + d*Tan[e + f*x])^(1/3))/(c + I*d)^(1/3))/Sqrt[3]] - 2*Log[(c + I*d)^( 
1/3) - (c + d*Tan[e + f*x])^(1/3)] + Log[(c + I*d)^(2/3) + (c + I*d)^(1/3) 
*(c + d*Tan[e + f*x])^(1/3) + (c + d*Tan[e + f*x])^(2/3)]) + (3*(c + d*Tan 
[e + f*x])^(4/3))/d)/(4*f)
 

Rubi [A] (verified)

Time = 0.60 (sec) , antiderivative size = 405, normalized size of antiderivative = 0.92, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 4026, 25, 3042, 3966, 485, 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 \tan ^2(e+f x) \sqrt [3]{c+d \tan (e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \tan (e+f x)^2 \sqrt [3]{c+d \tan (e+f x)}dx\)

\(\Big \downarrow \) 4026

\(\displaystyle \int -\sqrt [3]{c+d \tan (e+f x)}dx+\frac {3 (c+d \tan (e+f x))^{4/3}}{4 d f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {3 (c+d \tan (e+f x))^{4/3}}{4 d f}-\int \sqrt [3]{c+d \tan (e+f x)}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {3 (c+d \tan (e+f x))^{4/3}}{4 d f}-\int \sqrt [3]{c+d \tan (e+f x)}dx\)

\(\Big \downarrow \) 3966

\(\displaystyle \frac {3 (c+d \tan (e+f x))^{4/3}}{4 d f}-\frac {d \int \frac {\sqrt [3]{c+d \tan (e+f x)}}{\tan ^2(e+f x) d^2+d^2}d(d \tan (e+f x))}{f}\)

\(\Big \downarrow \) 485

\(\displaystyle \frac {3 (c+d \tan (e+f x))^{4/3}}{4 d f}-\frac {d \int \left (\frac {\sqrt [3]{c+d \tan (e+f x)} \sqrt {-d^2}}{2 d^2 \left (\sqrt {-d^2}-d \tan (e+f x)\right )}+\frac {\sqrt [3]{c+d \tan (e+f x)} \sqrt {-d^2}}{2 d^2 \left (d \tan (e+f x)+\sqrt {-d^2}\right )}\right )d(d \tan (e+f x))}{f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {3 (c+d \tan (e+f x))^{4/3}}{4 d f}-\frac {d \left (\frac {\sqrt {3} \sqrt [3]{c-\sqrt {-d^2}} \arctan \left (\frac {\frac {2 \sqrt [3]{c+d \tan (e+f x)}}{\sqrt [3]{c-\sqrt {-d^2}}}+1}{\sqrt {3}}\right )}{2 \sqrt {-d^2}}-\frac {\sqrt {3} \sqrt [3]{c+\sqrt {-d^2}} \arctan \left (\frac {\frac {2 \sqrt [3]{c+d \tan (e+f x)}}{\sqrt [3]{c+\sqrt {-d^2}}}+1}{\sqrt {3}}\right )}{2 \sqrt {-d^2}}-\frac {\sqrt [3]{c+\sqrt {-d^2}} \log \left (\sqrt {-d^2}-d \tan (e+f x)\right )}{4 \sqrt {-d^2}}+\frac {\sqrt [3]{c-\sqrt {-d^2}} \log \left (\sqrt {-d^2}+d \tan (e+f x)\right )}{4 \sqrt {-d^2}}-\frac {3 \sqrt [3]{c-\sqrt {-d^2}} \log \left (\sqrt [3]{c-\sqrt {-d^2}}-\sqrt [3]{c+d \tan (e+f x)}\right )}{4 \sqrt {-d^2}}+\frac {3 \sqrt [3]{c+\sqrt {-d^2}} \log \left (\sqrt [3]{c+\sqrt {-d^2}}-\sqrt [3]{c+d \tan (e+f x)}\right )}{4 \sqrt {-d^2}}\right )}{f}\)

Input:

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

Output:

-((d*((Sqrt[3]*(c - Sqrt[-d^2])^(1/3)*ArcTan[(1 + (2*(c + d*Tan[e + f*x])^ 
(1/3))/(c - Sqrt[-d^2])^(1/3))/Sqrt[3]])/(2*Sqrt[-d^2]) - (Sqrt[3]*(c + Sq 
rt[-d^2])^(1/3)*ArcTan[(1 + (2*(c + d*Tan[e + f*x])^(1/3))/(c + Sqrt[-d^2] 
)^(1/3))/Sqrt[3]])/(2*Sqrt[-d^2]) - ((c + Sqrt[-d^2])^(1/3)*Log[Sqrt[-d^2] 
 - d*Tan[e + f*x]])/(4*Sqrt[-d^2]) + ((c - Sqrt[-d^2])^(1/3)*Log[Sqrt[-d^2 
] + d*Tan[e + f*x]])/(4*Sqrt[-d^2]) - (3*(c - Sqrt[-d^2])^(1/3)*Log[(c - S 
qrt[-d^2])^(1/3) - (c + d*Tan[e + f*x])^(1/3)])/(4*Sqrt[-d^2]) + (3*(c + S 
qrt[-d^2])^(1/3)*Log[(c + Sqrt[-d^2])^(1/3) - (c + d*Tan[e + f*x])^(1/3)]) 
/(4*Sqrt[-d^2])))/f) + (3*(c + d*Tan[e + f*x])^(4/3))/(4*d*f)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 485
Int[((c_) + (d_.)*(x_))^(n_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[Expand 
Integrand[(c + d*x)^n, 1/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d, n}, x] & 
&  !IntegerQ[2*n]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

rule 3966
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b/d   Su 
bst[Int[(a + x)^n/(b^2 + x^2), x], x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c 
, d, n}, x] && NeQ[a^2 + b^2, 0]
 

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

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.15 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.18

method result size
derivativedivides \(\frac {\frac {3 \left (c +d \tan \left (f x +e \right )\right )^{\frac {4}{3}}}{4 d}-\frac {d \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{6}-2 c \,\textit {\_Z}^{3}+c^{2}+d^{2}\right )}{\sum }\frac {\textit {\_R}^{3} \ln \left (\left (c +d \tan \left (f x +e \right )\right )^{\frac {1}{3}}-\textit {\_R} \right )}{\textit {\_R}^{5}-\textit {\_R}^{2} c}\right )}{2}}{f}\) \(79\)
default \(\frac {\frac {3 \left (c +d \tan \left (f x +e \right )\right )^{\frac {4}{3}}}{4 d}-\frac {d \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{6}-2 c \,\textit {\_Z}^{3}+c^{2}+d^{2}\right )}{\sum }\frac {\textit {\_R}^{3} \ln \left (\left (c +d \tan \left (f x +e \right )\right )^{\frac {1}{3}}-\textit {\_R} \right )}{\textit {\_R}^{5}-\textit {\_R}^{2} c}\right )}{2}}{f}\) \(79\)

Input:

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

Output:

1/f*(3/4/d*(c+d*tan(f*x+e))^(4/3)-1/2*d*sum(_R^3/(_R^5-_R^2*c)*ln((c+d*tan 
(f*x+e))^(1/3)-_R),_R=RootOf(_Z^6-2*_Z^3*c+c^2+d^2)))
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 582, normalized size of antiderivative = 1.33 \[ \int \tan ^2(e+f x) \sqrt [3]{c+d \tan (e+f x)} \, dx =\text {Too large to display} \] Input:

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

Output:

1/4*(2*d*f*((f^3*sqrt(-c^2/f^6) + d)/f^3)^(1/3)*log(-f^4*((f^3*sqrt(-c^2/f 
^6) + d)/f^3)^(1/3)*sqrt(-c^2/f^6) + (d*tan(f*x + e) + c)^(1/3)*c) + 2*d*f 
*(-(f^3*sqrt(-c^2/f^6) - d)/f^3)^(1/3)*log(f^4*(-(f^3*sqrt(-c^2/f^6) - d)/ 
f^3)^(1/3)*sqrt(-c^2/f^6) + (d*tan(f*x + e) + c)^(1/3)*c) - (sqrt(-3)*d*f 
+ d*f)*((f^3*sqrt(-c^2/f^6) + d)/f^3)^(1/3)*log(1/2*(sqrt(-3)*f^4 + f^4)*( 
(f^3*sqrt(-c^2/f^6) + d)/f^3)^(1/3)*sqrt(-c^2/f^6) + (d*tan(f*x + e) + c)^ 
(1/3)*c) + (sqrt(-3)*d*f - d*f)*((f^3*sqrt(-c^2/f^6) + d)/f^3)^(1/3)*log(- 
1/2*(sqrt(-3)*f^4 - f^4)*((f^3*sqrt(-c^2/f^6) + d)/f^3)^(1/3)*sqrt(-c^2/f^ 
6) + (d*tan(f*x + e) + c)^(1/3)*c) - (sqrt(-3)*d*f + d*f)*(-(f^3*sqrt(-c^2 
/f^6) - d)/f^3)^(1/3)*log(-1/2*(sqrt(-3)*f^4 + f^4)*(-(f^3*sqrt(-c^2/f^6) 
- d)/f^3)^(1/3)*sqrt(-c^2/f^6) + (d*tan(f*x + e) + c)^(1/3)*c) + (sqrt(-3) 
*d*f - d*f)*(-(f^3*sqrt(-c^2/f^6) - d)/f^3)^(1/3)*log(1/2*(sqrt(-3)*f^4 - 
f^4)*(-(f^3*sqrt(-c^2/f^6) - d)/f^3)^(1/3)*sqrt(-c^2/f^6) + (d*tan(f*x + e 
) + c)^(1/3)*c) + 3*(d*tan(f*x + e) + c)^(4/3))/(d*f)
 

Sympy [F]

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

integrate(tan(f*x+e)**2*(c+d*tan(f*x+e))**(1/3),x)
 

Output:

Integral((c + d*tan(e + f*x))**(1/3)*tan(e + f*x)**2, x)
 

Maxima [F]

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

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

Output:

integrate((d*tan(f*x + e) + c)^(1/3)*tan(f*x + e)^2, x)
 

Giac [F]

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

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

Output:

undef
 

Mupad [B] (verification not implemented)

Time = 5.98 (sec) , antiderivative size = 881, normalized size of antiderivative = 2.01 \[ \int \tan ^2(e+f x) \sqrt [3]{c+d \tan (e+f x)} \, dx=\text {Too large to display} \] Input:

int(tan(e + f*x)^2*(c + d*tan(e + f*x))^(1/3),x)
 

Output:

log(f*(-(c*1i - d)/f^3)^(1/3)*1i + (c + d*tan(e + f*x))^(1/3))*(-(c*1i - d 
)/(8*f^3))^(1/3) + log(c*(c + d*tan(e + f*x))^(1/3) + d*(c + d*tan(e + f*x 
))^(1/3)*1i - f^4*((c*1i + d)/f^3)^(4/3) + 2*d*f*((c*1i + d)/f^3)^(1/3))*( 
(c*1i + d)/(8*f^3))^(1/3) + log(- (486*(d^8 - c^4*d^4)*(c + d*tan(e + f*x) 
)^(1/3))/f^4 - ((-(c*1i - d)/f^3)^(1/3)*((3^(1/2)*1i)/2 - 1/2)*(((-(c*1i - 
 d)/f^3)^(2/3)*((3^(1/2)*1i)/2 + 1/2)*((3888*d^5*(c^2 + d^2)*(c + d*tan(e 
+ f*x))^(1/3))/f - 3888*c*d^4*(-(c*1i - d)/f^3)^(1/3)*((3^(1/2)*1i)/2 - 1/ 
2)*(c^2 + d^2)))/4 - (1944*c*d^5*(c^2 + d^2))/f^3))/2)*((3^(1/2)*1i)/2 - 1 
/2)*(-(c*1i - d)/(8*f^3))^(1/3) - log((486*(d^8 - c^4*d^4)*(c + d*tan(e + 
f*x))^(1/3))/f^4 + ((-(c*1i - d)/f^3)^(1/3)*((3^(1/2)*1i)/2 + 1/2)*(((-(c* 
1i - d)/f^3)^(2/3)*((3^(1/2)*1i)/2 - 1/2)*((3888*d^5*(c^2 + d^2)*(c + d*ta 
n(e + f*x))^(1/3))/f + 3888*c*d^4*(-(c*1i - d)/f^3)^(1/3)*((3^(1/2)*1i)/2 
+ 1/2)*(c^2 + d^2)))/4 + (1944*c*d^5*(c^2 + d^2))/f^3))/2)*((3^(1/2)*1i)/2 
 + 1/2)*(-(c*1i - d)/(8*f^3))^(1/3) + (3*(c + d*tan(e + f*x))^(4/3))/(4*d* 
f) + log(- (486*(d^8 - c^4*d^4)*(c + d*tan(e + f*x))^(1/3))/f^4 - (((3^(1/ 
2)*1i)/2 - 1/2)*((((3888*d^5*(c^2 + d^2)*(c + d*tan(e + f*x))^(1/3))/f - 3 
888*c*d^4*((3^(1/2)*1i)/2 - 1/2)*((c*1i + d)/f^3)^(1/3)*(c^2 + d^2))*((3^( 
1/2)*1i)/2 + 1/2)*((c*1i + d)/f^3)^(2/3))/4 - (1944*c*d^5*(c^2 + d^2))/f^3 
)*((c*1i + d)/f^3)^(1/3))/2)*((3^(1/2)*1i)/2 - 1/2)*((c*1i + d)/(8*f^3))^( 
1/3) - log((486*(d^8 - c^4*d^4)*(c + d*tan(e + f*x))^(1/3))/f^4 + (((3^...
 

Reduce [F]

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

int(tan(f*x+e)^2*(c+d*tan(f*x+e))^(1/3),x)
 

Output:

int((tan(e + f*x)*d + c)**(1/3)*tan(e + f*x)**2,x)