\(\int \tan ^2(e+f x) \sqrt {1+\tan (e+f x)} \, dx\) [385]

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

Optimal result

Integrand size = 21, antiderivative size = 204 \[ \int \tan ^2(e+f x) \sqrt {1+\tan (e+f x)} \, dx=\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \arctan \left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {1+\tan (e+f x)}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )}{f}-\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \arctan \left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+\tan (e+f x)}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )}{f}+\frac {\text {arctanh}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+\tan (e+f x)}}{1+\sqrt {2}+\tan (e+f x)}\right )}{\sqrt {2 \left (1+\sqrt {2}\right )} f}+\frac {2 (1+\tan (e+f x))^{3/2}}{3 f} \] Output:

1/2*(2+2*2^(1/2))^(1/2)*arctan(((2+2*2^(1/2))^(1/2)-2*(1+tan(f*x+e))^(1/2) 
)/(-2+2*2^(1/2))^(1/2))/f-1/2*(2+2*2^(1/2))^(1/2)*arctan(((2+2*2^(1/2))^(1 
/2)+2*(1+tan(f*x+e))^(1/2))/(-2+2*2^(1/2))^(1/2))/f+arctanh((2+2*2^(1/2))^ 
(1/2)*(1+tan(f*x+e))^(1/2)/(1+2^(1/2)+tan(f*x+e)))/(2+2*2^(1/2))^(1/2)/f+2 
/3*(1+tan(f*x+e))^(3/2)/f
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.12 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.42 \[ \int \tan ^2(e+f x) \sqrt {1+\tan (e+f x)} \, dx=\frac {3 i \sqrt {1-i} \text {arctanh}\left (\frac {\sqrt {1+\tan (e+f x)}}{\sqrt {1-i}}\right )-3 i \sqrt {1+i} \text {arctanh}\left (\frac {\sqrt {1+\tan (e+f x)}}{\sqrt {1+i}}\right )+2 (1+\tan (e+f x))^{3/2}}{3 f} \] Input:

Integrate[Tan[e + f*x]^2*Sqrt[1 + Tan[e + f*x]],x]
 

Output:

((3*I)*Sqrt[1 - I]*ArcTanh[Sqrt[1 + Tan[e + f*x]]/Sqrt[1 - I]] - (3*I)*Sqr 
t[1 + I]*ArcTanh[Sqrt[1 + Tan[e + f*x]]/Sqrt[1 + I]] + 2*(1 + Tan[e + f*x] 
)^(3/2))/(3*f)
 

Rubi [A] (verified)

Time = 0.53 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.31, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.619, Rules used = {3042, 4026, 25, 3042, 3966, 483, 1447, 1475, 1083, 217, 1478, 25, 1103}

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 {\tan (e+f x)+1} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \tan (e+f x)^2 \sqrt {\tan (e+f x)+1}dx\)

\(\Big \downarrow \) 4026

\(\displaystyle \int -\sqrt {\tan (e+f x)+1}dx+\frac {2 (\tan (e+f x)+1)^{3/2}}{3 f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {2 (\tan (e+f x)+1)^{3/2}}{3 f}-\int \sqrt {\tan (e+f x)+1}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 (\tan (e+f x)+1)^{3/2}}{3 f}-\int \sqrt {\tan (e+f x)+1}dx\)

\(\Big \downarrow \) 3966

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

\(\Big \downarrow \) 483

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

\(\Big \downarrow \) 1447

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

\(\Big \downarrow \) 1475

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

\(\Big \downarrow \) 1083

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

\(\Big \downarrow \) 217

\(\displaystyle \frac {2 (\tan (e+f x)+1)^{3/2}}{3 f}-\frac {2 \left (\frac {1}{2} \left (\frac {\arctan \left (\frac {2 \sqrt {\tan (e+f x)+1}-\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{\sqrt {2 \left (\sqrt {2}-1\right )}}+\frac {\arctan \left (\frac {2 \sqrt {\tan (e+f x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )-\frac {1}{2} \int \frac {-\tan (e+f x)+\sqrt {2}-1}{(\tan (e+f x)+1)^2-2 (\tan (e+f x)+1)+2}d\sqrt {\tan (e+f x)+1}\right )}{f}\)

\(\Big \downarrow \) 1478

\(\displaystyle \frac {2 (\tan (e+f x)+1)^{3/2}}{3 f}-\frac {2 \left (\frac {1}{2} \left (\frac {\int -\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {\tan (e+f x)+1}}{\tan (e+f x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\tan (e+f x)+1}+\sqrt {2}+1}d\sqrt {\tan (e+f x)+1}}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}+\frac {\int -\frac {2 \sqrt {\tan (e+f x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\tan (e+f x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\tan (e+f x)+1}+\sqrt {2}+1}d\sqrt {\tan (e+f x)+1}}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}\right )+\frac {1}{2} \left (\frac {\arctan \left (\frac {2 \sqrt {\tan (e+f x)+1}-\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{\sqrt {2 \left (\sqrt {2}-1\right )}}+\frac {\arctan \left (\frac {2 \sqrt {\tan (e+f x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )\right )}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {2 (\tan (e+f x)+1)^{3/2}}{3 f}-\frac {2 \left (\frac {1}{2} \left (-\frac {\int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {\tan (e+f x)+1}}{\tan (e+f x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\tan (e+f x)+1}+\sqrt {2}+1}d\sqrt {\tan (e+f x)+1}}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}-\frac {\int \frac {2 \sqrt {\tan (e+f x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\tan (e+f x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\tan (e+f x)+1}+\sqrt {2}+1}d\sqrt {\tan (e+f x)+1}}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}\right )+\frac {1}{2} \left (\frac {\arctan \left (\frac {2 \sqrt {\tan (e+f x)+1}-\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{\sqrt {2 \left (\sqrt {2}-1\right )}}+\frac {\arctan \left (\frac {2 \sqrt {\tan (e+f x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )\right )}{f}\)

\(\Big \downarrow \) 1103

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

Input:

Int[Tan[e + f*x]^2*Sqrt[1 + Tan[e + f*x]],x]
 

Output:

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

Defintions of rubi rules used

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

rule 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( 
-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & 
& (LtQ[a, 0] || LtQ[b, 0])
 

rule 483
Int[Sqrt[(c_) + (d_.)*(x_)]/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[2*d 
Subst[Int[x^2/(b*c^2 + a*d^2 - 2*b*c*x^2 + b*x^4), x], x, Sqrt[c + d*x]], x 
] /; FreeQ[{a, b, c, d}, x]
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1103
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, 
e}, x] && EqQ[2*c*d - b*e, 0]
 

rule 1447
Int[(x_)^2/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ 
a/c, 2]}, Simp[1/2   Int[(q + x^2)/(a + b*x^2 + c*x^4), x], x] - Simp[1/2 
 Int[(q - x^2)/(a + b*x^2 + c*x^4), x], x]] /; FreeQ[{a, b, c}, x] && LtQ[b 
^2 - 4*a*c, 0] && PosQ[a*c]
 

rule 1475
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[2*(d/e) - b/c, 2]}, Simp[e/(2*c)   Int[1/Simp[d/e + q*x + x^ 
2, x], x], x] + Simp[e/(2*c)   Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; F 
reeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && 
 (GtQ[2*(d/e) - b/c, 0] || ( !LtQ[2*(d/e) - b/c, 0] && EqQ[d - e*Rt[a/c, 2] 
, 0]))
 

rule 1478
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[-2*(d/e) - b/c, 2]}, Simp[e/(2*c*q)   Int[(q - 2*x)/Simp[d/e 
 + q*x - x^2, x], x], x] + Simp[e/(2*c*q)   Int[(q + 2*x)/Simp[d/e - q*x - 
x^2, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ 
[c*d^2 - a*e^2, 0] &&  !GtQ[b^2 - 4*a*c, 0]
 

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 [A] (verified)

Time = 1.05 (sec) , antiderivative size = 305, normalized size of antiderivative = 1.50

method result size
derivativedivides \(\frac {2 \left (\tan \left (f x +e \right )+1\right )^{\frac {3}{2}}}{3 f}+\frac {\sqrt {2 \sqrt {2}+2}\, \sqrt {2}\, \ln \left (\tan \left (f x +e \right )+1+\sqrt {\tan \left (f x +e \right )+1}\, \sqrt {2 \sqrt {2}+2}+\sqrt {2}\right )}{4 f}-\frac {\arctan \left (\frac {\sqrt {2 \sqrt {2}+2}+2 \sqrt {\tan \left (f x +e \right )+1}}{\sqrt {-2+2 \sqrt {2}}}\right )}{f \sqrt {-2+2 \sqrt {2}}}-\frac {\sqrt {2 \sqrt {2}+2}\, \ln \left (\tan \left (f x +e \right )+1+\sqrt {\tan \left (f x +e \right )+1}\, \sqrt {2 \sqrt {2}+2}+\sqrt {2}\right )}{4 f}-\frac {\sqrt {2 \sqrt {2}+2}\, \sqrt {2}\, \ln \left (\tan \left (f x +e \right )+1-\sqrt {\tan \left (f x +e \right )+1}\, \sqrt {2 \sqrt {2}+2}+\sqrt {2}\right )}{4 f}-\frac {\arctan \left (\frac {2 \sqrt {\tan \left (f x +e \right )+1}-\sqrt {2 \sqrt {2}+2}}{\sqrt {-2+2 \sqrt {2}}}\right )}{f \sqrt {-2+2 \sqrt {2}}}+\frac {\sqrt {2 \sqrt {2}+2}\, \ln \left (\tan \left (f x +e \right )+1-\sqrt {\tan \left (f x +e \right )+1}\, \sqrt {2 \sqrt {2}+2}+\sqrt {2}\right )}{4 f}\) \(305\)
default \(\frac {2 \left (\tan \left (f x +e \right )+1\right )^{\frac {3}{2}}}{3 f}+\frac {\sqrt {2 \sqrt {2}+2}\, \sqrt {2}\, \ln \left (\tan \left (f x +e \right )+1+\sqrt {\tan \left (f x +e \right )+1}\, \sqrt {2 \sqrt {2}+2}+\sqrt {2}\right )}{4 f}-\frac {\arctan \left (\frac {\sqrt {2 \sqrt {2}+2}+2 \sqrt {\tan \left (f x +e \right )+1}}{\sqrt {-2+2 \sqrt {2}}}\right )}{f \sqrt {-2+2 \sqrt {2}}}-\frac {\sqrt {2 \sqrt {2}+2}\, \ln \left (\tan \left (f x +e \right )+1+\sqrt {\tan \left (f x +e \right )+1}\, \sqrt {2 \sqrt {2}+2}+\sqrt {2}\right )}{4 f}-\frac {\sqrt {2 \sqrt {2}+2}\, \sqrt {2}\, \ln \left (\tan \left (f x +e \right )+1-\sqrt {\tan \left (f x +e \right )+1}\, \sqrt {2 \sqrt {2}+2}+\sqrt {2}\right )}{4 f}-\frac {\arctan \left (\frac {2 \sqrt {\tan \left (f x +e \right )+1}-\sqrt {2 \sqrt {2}+2}}{\sqrt {-2+2 \sqrt {2}}}\right )}{f \sqrt {-2+2 \sqrt {2}}}+\frac {\sqrt {2 \sqrt {2}+2}\, \ln \left (\tan \left (f x +e \right )+1-\sqrt {\tan \left (f x +e \right )+1}\, \sqrt {2 \sqrt {2}+2}+\sqrt {2}\right )}{4 f}\) \(305\)

Input:

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

Output:

2/3*(tan(f*x+e)+1)^(3/2)/f+1/4/f*(2*2^(1/2)+2)^(1/2)*2^(1/2)*ln(tan(f*x+e) 
+1+(tan(f*x+e)+1)^(1/2)*(2*2^(1/2)+2)^(1/2)+2^(1/2))-1/f/(-2+2*2^(1/2))^(1 
/2)*arctan(((2*2^(1/2)+2)^(1/2)+2*(tan(f*x+e)+1)^(1/2))/(-2+2*2^(1/2))^(1/ 
2))-1/4/f*(2*2^(1/2)+2)^(1/2)*ln(tan(f*x+e)+1+(tan(f*x+e)+1)^(1/2)*(2*2^(1 
/2)+2)^(1/2)+2^(1/2))-1/4/f*(2*2^(1/2)+2)^(1/2)*2^(1/2)*ln(tan(f*x+e)+1-(t 
an(f*x+e)+1)^(1/2)*(2*2^(1/2)+2)^(1/2)+2^(1/2))-1/f/(-2+2*2^(1/2))^(1/2)*a 
rctan((2*(tan(f*x+e)+1)^(1/2)-(2*2^(1/2)+2)^(1/2))/(-2+2*2^(1/2))^(1/2))+1 
/4/f*(2*2^(1/2)+2)^(1/2)*ln(tan(f*x+e)+1-(tan(f*x+e)+1)^(1/2)*(2*2^(1/2)+2 
)^(1/2)+2^(1/2))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 280, normalized size of antiderivative = 1.37 \[ \int \tan ^2(e+f x) \sqrt {1+\tan (e+f x)} \, dx=\frac {3 \, f \sqrt {-\frac {f^{2} \sqrt {-\frac {1}{f^{4}}} + 1}{f^{2}}} \log \left (f^{3} \sqrt {-\frac {f^{2} \sqrt {-\frac {1}{f^{4}}} + 1}{f^{2}}} \sqrt {-\frac {1}{f^{4}}} + \sqrt {\tan \left (f x + e\right ) + 1}\right ) - 3 \, f \sqrt {-\frac {f^{2} \sqrt {-\frac {1}{f^{4}}} + 1}{f^{2}}} \log \left (-f^{3} \sqrt {-\frac {f^{2} \sqrt {-\frac {1}{f^{4}}} + 1}{f^{2}}} \sqrt {-\frac {1}{f^{4}}} + \sqrt {\tan \left (f x + e\right ) + 1}\right ) - 3 \, f \sqrt {\frac {f^{2} \sqrt {-\frac {1}{f^{4}}} - 1}{f^{2}}} \log \left (f^{3} \sqrt {\frac {f^{2} \sqrt {-\frac {1}{f^{4}}} - 1}{f^{2}}} \sqrt {-\frac {1}{f^{4}}} + \sqrt {\tan \left (f x + e\right ) + 1}\right ) + 3 \, f \sqrt {\frac {f^{2} \sqrt {-\frac {1}{f^{4}}} - 1}{f^{2}}} \log \left (-f^{3} \sqrt {\frac {f^{2} \sqrt {-\frac {1}{f^{4}}} - 1}{f^{2}}} \sqrt {-\frac {1}{f^{4}}} + \sqrt {\tan \left (f x + e\right ) + 1}\right ) + 4 \, {\left (\tan \left (f x + e\right ) + 1\right )}^{\frac {3}{2}}}{6 \, f} \] Input:

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

Output:

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

Sympy [F]

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

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

Output:

Integral(sqrt(tan(e + f*x) + 1)*tan(e + f*x)**2, x)
 

Maxima [F]

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

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

Output:

integrate(sqrt(tan(f*x + e) + 1)*tan(f*x + e)^2, x)
 

Giac [F(-2)]

Exception generated. \[ \int \tan ^2(e+f x) \sqrt {1+\tan (e+f x)} \, dx=\text {Exception raised: TypeError} \] Input:

integrate(tan(f*x+e)^2*(1+tan(f*x+e))^(1/2),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,[14]%%%}+%%%{6,[12]%%%}+%%%{15,[10]%%%}+%%%{20,[8]%% 
%}+%%%{15
 

Mupad [B] (verification not implemented)

Time = 1.38 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.43 \[ \int \tan ^2(e+f x) \sqrt {1+\tan (e+f x)} \, dx=\frac {2\,{\left (\mathrm {tan}\left (e+f\,x\right )+1\right )}^{3/2}}{3\,f}-2\,\mathrm {atanh}\left (4\,f^3\,{\left (\frac {-\frac {1}{4}+\frac {1}{4}{}\mathrm {i}}{f^2}\right )}^{3/2}\,\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}\right )\,\sqrt {\frac {-\frac {1}{4}+\frac {1}{4}{}\mathrm {i}}{f^2}}-2\,\mathrm {atanh}\left (4\,f^3\,{\left (\frac {-\frac {1}{4}-\frac {1}{4}{}\mathrm {i}}{f^2}\right )}^{3/2}\,\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}\right )\,\sqrt {\frac {-\frac {1}{4}-\frac {1}{4}{}\mathrm {i}}{f^2}} \] Input:

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

Output:

(2*(tan(e + f*x) + 1)^(3/2))/(3*f) - 2*atanh(4*f^3*((- 1/4 + 1i/4)/f^2)^(3 
/2)*(tan(e + f*x) + 1)^(1/2))*((- 1/4 + 1i/4)/f^2)^(1/2) - 2*atanh(4*f^3*( 
(- 1/4 - 1i/4)/f^2)^(3/2)*(tan(e + f*x) + 1)^(1/2))*((- 1/4 - 1i/4)/f^2)^( 
1/2)
 

Reduce [F]

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

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

Output:

int(sqrt(tan(e + f*x) + 1)*tan(e + f*x)**2,x)